Lines Matching +full:sock +full:- +full:priv

1 /* SPDX-License-Identifier: GPL-2.0 */
16 /* Used only for kernel-created sockets */
58 if (cfg->family == AF_INET) in udp_sock_create()
61 if (cfg->family == AF_INET6) in udp_sock_create()
64 return -EPFNOSUPPORT; in udp_sock_create()
67 typedef int (*udp_tunnel_encap_rcv_t)(struct sock *sk, struct sk_buff *skb);
68 typedef int (*udp_tunnel_encap_err_lookup_t)(struct sock *sk,
70 typedef void (*udp_tunnel_encap_err_rcv_t)(struct sock *sk,
73 typedef void (*udp_tunnel_encap_destroy_t)(struct sock *sk);
74 typedef struct sk_buff *(*udp_tunnel_gro_receive_t)(struct sock *sk,
77 typedef int (*udp_tunnel_gro_complete_t)(struct sock *sk, struct sk_buff *skb,
92 /* Setup the given (UDP) sock to receive UDP encapsulated packets */
93 void setup_udp_tunnel_sock(struct net *net, struct socket *sock,
96 /* -- List of parsable UDP tunnel types --
114 UDP_TUNNEL_TYPE_GENEVE = BIT(1), /* draft-ietf-nvo3-geneve */
115 UDP_TUNNEL_TYPE_VXLAN_GPE = BIT(2), /* draft-ietf-nvo3-vxlan-gpe */
126 void udp_tunnel_push_rx_port(struct net_device *dev, struct socket *sock,
128 void udp_tunnel_drop_rx_port(struct net_device *dev, struct socket *sock,
130 void udp_tunnel_notify_add_rx_port(struct socket *sock, unsigned short type);
131 void udp_tunnel_notify_del_rx_port(struct socket *sock, unsigned short type);
136 if (!(dev->features & NETIF_F_RX_UDP_TUNNEL_PORT)) in udp_tunnel_get_rx_info()
144 if (!(dev->features & NETIF_F_RX_UDP_TUNNEL_PORT)) in udp_tunnel_drop_rx_info()
150 void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb,
155 int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk,
163 void udp_tunnel_sock_release(struct socket *sock);
175 struct socket *sock, int oif,
194 static inline void udp_tunnel_encap_enable(struct sock *sk) in udp_tunnel_encap_enable()
200 if (READ_ONCE(sk->sk_family) == PF_INET6) in udp_tunnel_encap_enable()
201 ipv6_stub->udpv6_encap_enable(); in udp_tunnel_encap_enable()
212 * will be removed before close and re-added after open.
217 /* Device has hard-coded the IANA VXLAN port (4789) as VXLAN.
240 * struct udp_tunnel_nic_info - driver UDP tunnel offload information
260 * - UDP tunnel port notifications are fundamentally best-effort -
262 * while not being a tunneled skb, and tunnel skbs from other ports -
263 * drivers should only use these ports for non-critical RX-side offloads,
265 * - none of the devices care about the socket family at present, so we don't
269 /* one-by-one */
304 unsigned int idx, u8 priv);
333 udp_tunnel_nic_ops->get_port(dev, table, idx, ti); in udp_tunnel_nic_get_port()
338 unsigned int idx, u8 priv) in udp_tunnel_nic_set_port_priv() argument
341 udp_tunnel_nic_ops->set_port_priv(dev, table, idx, priv); in udp_tunnel_nic_set_port_priv()
347 if (!(dev->features & NETIF_F_RX_UDP_TUNNEL_PORT)) in udp_tunnel_nic_add_port()
350 udp_tunnel_nic_ops->add_port(dev, ti); in udp_tunnel_nic_add_port()
356 if (!(dev->features & NETIF_F_RX_UDP_TUNNEL_PORT)) in udp_tunnel_nic_del_port()
359 udp_tunnel_nic_ops->del_port(dev, ti); in udp_tunnel_nic_del_port()
363 * udp_tunnel_nic_reset_ntf() - device-originating reset notification
377 udp_tunnel_nic_ops->reset_ntf(dev); in udp_tunnel_nic_reset_ntf()
385 return udp_tunnel_nic_ops->dump_size(dev, table); in udp_tunnel_nic_dump_size()
394 return udp_tunnel_nic_ops->dump_write(dev, table, skb); in udp_tunnel_nic_dump_write()