Lines Matching full:tunnel

84 	/* the IPv6 tunnel fallback device */
102 * ip6_tnl_lookup - fetch tunnel matching the end-point addresses
105 * @remote: the address of the tunnel exit-point
106 * @local: the address of the tunnel entry-point
109 * tunnel matching given end-points if found,
110 * else fallback tunnel if its device is up,
177 * ip6_tnl_bucket - get head of list matching given tunnel parameters
179 * @p: parameters containing tunnel end-points
185 * Return: head of IPv6 tunnel list
204 * ip6_tnl_link - add tunnel to hash table
206 * @t: tunnel to be added
221 * ip6_tnl_unlink - remove tunnel from hash table
223 * @t: tunnel to be removed
275 * ip6_tnl_create - create a new tunnel
277 * @p: tunnel parameters
280 * Create tunnel matching given parameters.
283 * created tunnel or error pointer
324 * ip6_tnl_locate - find or create tunnel matching given parameters
326 * @p: tunnel parameters
327 * @create: != 0 if allowed to create new tunnel if no match found
330 * ip6_tnl_locate() first tries to locate an existing tunnel
332 * tunnel device is created and registered for use.
335 * matching tunnel or error pointer
365 * ip6_tnl_dev_uninit - tunnel device uninitializer
369 * ip6_tnl_dev_uninit() removes tunnel from its list
459 /* ip6_tnl_err() should handle errors in the tunnel according to the
500 net_dbg_ratelimited("%s: Too small hop limit or routing loop in tunnel!\n", in ip6_tnl_err()
516 net_dbg_ratelimited("%s: Too small encapsulation limit or routing loop in tunnel!\n", in ip6_tnl_err()
793 static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, in __ip6_tnl_rcv() argument
804 if (test_bit(IP_TUNNEL_CSUM_BIT, tunnel->parms.i_flags) != in __ip6_tnl_rcv()
806 DEV_STATS_INC(tunnel->dev, rx_crc_errors); in __ip6_tnl_rcv()
807 DEV_STATS_INC(tunnel->dev, rx_errors); in __ip6_tnl_rcv()
811 if (test_bit(IP_TUNNEL_SEQ_BIT, tunnel->parms.i_flags)) { in __ip6_tnl_rcv()
813 (tunnel->i_seqno && in __ip6_tnl_rcv()
814 (s32)(ntohl(tpi->seq) - tunnel->i_seqno) < 0)) { in __ip6_tnl_rcv()
815 DEV_STATS_INC(tunnel->dev, rx_fifo_errors); in __ip6_tnl_rcv()
816 DEV_STATS_INC(tunnel->dev, rx_errors); in __ip6_tnl_rcv()
819 tunnel->i_seqno = ntohl(tpi->seq) + 1; in __ip6_tnl_rcv()
825 if (tunnel->dev->type == ARPHRD_ETHER) { in __ip6_tnl_rcv()
827 DEV_STATS_INC(tunnel->dev, rx_length_errors); in __ip6_tnl_rcv()
828 DEV_STATS_INC(tunnel->dev, rx_errors); in __ip6_tnl_rcv()
832 skb->protocol = eth_type_trans(skb, tunnel->dev); in __ip6_tnl_rcv()
835 skb->dev = tunnel->dev; in __ip6_tnl_rcv()
848 DEV_STATS_INC(tunnel->dev, rx_length_errors); in __ip6_tnl_rcv()
849 DEV_STATS_INC(tunnel->dev, rx_errors); in __ip6_tnl_rcv()
858 __skb_tunnel_rx(skb, tunnel->dev, tunnel->net); in __ip6_tnl_rcv()
860 err = dscp_ecn_decapsulate(tunnel, ipv6h, skb); in __ip6_tnl_rcv()
867 DEV_STATS_INC(tunnel->dev, rx_frame_errors); in __ip6_tnl_rcv()
868 DEV_STATS_INC(tunnel->dev, rx_errors); in __ip6_tnl_rcv()
873 dev_sw_netstats_rx_add(tunnel->dev, skb->len); in __ip6_tnl_rcv()
875 skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(tunnel->dev))); in __ip6_tnl_rcv()
880 gro_cells_receive(&tunnel->gro_cells, skb); in __ip6_tnl_rcv()
909 /* no tunnel info required for ipxip6. */
914 /* no tunnel info required for ipxip6. */
919 /* no tunnel info required for mplsip6. */
1008 * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own
1009 * @t: the outgoing tunnel device
1013 * Avoid trivial tunneling loop by checking that tunnel exit-point
1068 * @dev: the outgoing tunnel device
1113 /* NBMA tunnel */ in ip6_tnl_xmit()
1529 * ip6_tnl_change - update the tunnel parameters
1530 * @t: tunnel to be changed
1531 * @p: tunnel configuration parameters
1534 * ip6_tnl_change() updates the tunnel parameters
1602 * @dev: virtual device associated with tunnel
1612 * %SIOCGETTUNNEL: get tunnel parameters for device
1613 * %SIOCADDTUNNEL: add tunnel matching given tunnel parameters
1614 * %SIOCCHGTUNNEL: change tunnel parameters to those given
1615 * %SIOCDELTUNNEL: delete tunnel
1618 * initialization, can be used for creating other tunnel devices.
1624 * %-EINVAL if passed tunnel parameters are invalid,
1625 * %-EEXIST if changing a tunnel's parameters would cause a conflict
1726 * ip6_tnl_change_mtu - change mtu manually for tunnel device
1727 * @dev: virtual device associated with tunnel
1838 * ip6_tnl_dev_setup - setup virtual tunnel device
1839 * @dev: virtual device associated with tunnel
1869 * ip6_tnl_dev_init_gen - general initializer for all tunnel devices
1870 * @dev: virtual device associated with tunnel
1913 * ip6_tnl_dev_init - initializer for all non fallback tunnel devices
1914 * @dev: virtual device associated with tunnel
1931 * ip6_fb_tnl_dev_init - initializer for fallback tunnel device
2120 struct ip6_tnl *tunnel = netdev_priv(dev); in ip6_tnl_fill_info() local
2121 struct __ip6_tnl_parm *parm = &tunnel->parms; in ip6_tnl_fill_info()
2134 if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || in ip6_tnl_fill_info()
2135 nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || in ip6_tnl_fill_info()
2136 nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || in ip6_tnl_fill_info()
2137 nla_put_u16(skb, IFLA_IPTUN_ENCAP_FLAGS, tunnel->encap.flags)) in ip6_tnl_fill_info()
2152 struct ip6_tnl *tunnel = netdev_priv(dev); in ip6_tnl_get_link_net() local
2154 return READ_ONCE(tunnel->net); in ip6_tnl_get_link_net()