Lines Matching full:tunnel

87 	/* 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
274 * ip6_tnl_create - create a new tunnel
276 * @p: tunnel parameters
279 * Create tunnel matching given parameters.
282 * created tunnel or error pointer
323 * ip6_tnl_locate - find or create tunnel matching given parameters
325 * @p: tunnel parameters
326 * @create: != 0 if allowed to create new tunnel if no match found
329 * ip6_tnl_locate() first tries to locate an existing tunnel
331 * tunnel device is created and registered for use.
334 * matching tunnel or error pointer
364 * ip6_tnl_dev_uninit - tunnel device uninitializer
368 * ip6_tnl_dev_uninit() removes tunnel from its list
466 /* ip6_tnl_err() should handle errors in the tunnel according to the
507 net_dbg_ratelimited("%s: Too small hop limit or routing loop in tunnel!\n", in ip6_tnl_err()
523 net_dbg_ratelimited("%s: Too small encapsulation limit or routing loop in tunnel!\n", in ip6_tnl_err()
805 static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, in __ip6_tnl_rcv() argument
816 if (test_bit(IP_TUNNEL_CSUM_BIT, tunnel->parms.i_flags) != in __ip6_tnl_rcv()
818 DEV_STATS_INC(tunnel->dev, rx_crc_errors); in __ip6_tnl_rcv()
819 DEV_STATS_INC(tunnel->dev, rx_errors); in __ip6_tnl_rcv()
823 if (test_bit(IP_TUNNEL_SEQ_BIT, tunnel->parms.i_flags)) { in __ip6_tnl_rcv()
825 (tunnel->i_seqno && in __ip6_tnl_rcv()
826 (s32)(ntohl(tpi->seq) - tunnel->i_seqno) < 0)) { in __ip6_tnl_rcv()
827 DEV_STATS_INC(tunnel->dev, rx_fifo_errors); in __ip6_tnl_rcv()
828 DEV_STATS_INC(tunnel->dev, rx_errors); in __ip6_tnl_rcv()
831 tunnel->i_seqno = ntohl(tpi->seq) + 1; in __ip6_tnl_rcv()
837 if (tunnel->dev->type == ARPHRD_ETHER) { in __ip6_tnl_rcv()
839 DEV_STATS_INC(tunnel->dev, rx_length_errors); in __ip6_tnl_rcv()
840 DEV_STATS_INC(tunnel->dev, rx_errors); in __ip6_tnl_rcv()
844 skb->protocol = eth_type_trans(skb, tunnel->dev); in __ip6_tnl_rcv()
847 skb->dev = tunnel->dev; in __ip6_tnl_rcv()
860 DEV_STATS_INC(tunnel->dev, rx_length_errors); in __ip6_tnl_rcv()
861 DEV_STATS_INC(tunnel->dev, rx_errors); in __ip6_tnl_rcv()
870 __skb_tunnel_rx(skb, tunnel->dev, tunnel->net); in __ip6_tnl_rcv()
872 err = dscp_ecn_decapsulate(tunnel, ipv6h, skb); in __ip6_tnl_rcv()
879 DEV_STATS_INC(tunnel->dev, rx_frame_errors); in __ip6_tnl_rcv()
880 DEV_STATS_INC(tunnel->dev, rx_errors); in __ip6_tnl_rcv()
885 dev_sw_netstats_rx_add(tunnel->dev, skb->len); in __ip6_tnl_rcv()
887 skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(tunnel->dev))); in __ip6_tnl_rcv()
892 gro_cells_receive(&tunnel->gro_cells, skb); in __ip6_tnl_rcv()
921 /* no tunnel info required for ipxip6. */
926 /* no tunnel info required for ipxip6. */
931 /* no tunnel info required for mplsip6. */
1020 * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own
1021 * @t: the outgoing tunnel device
1025 * Avoid trivial tunneling loop by checking that tunnel exit-point
1080 * @dev: the outgoing tunnel device
1125 /* NBMA tunnel */ in ip6_tnl_xmit()
1540 * ip6_tnl_change - update the tunnel parameters
1541 * @t: tunnel to be changed
1542 * @p: tunnel configuration parameters
1545 * ip6_tnl_change() updates the tunnel parameters
1624 * @dev: virtual device associated with tunnel
1634 * %SIOCGETTUNNEL: get tunnel parameters for device
1635 * %SIOCADDTUNNEL: add tunnel matching given tunnel parameters
1636 * %SIOCCHGTUNNEL: change tunnel parameters to those given
1637 * %SIOCDELTUNNEL: delete tunnel
1640 * initialization, can be used for creating other tunnel devices.
1646 * %-EINVAL if passed tunnel parameters are invalid,
1647 * %-EEXIST if changing a tunnel's parameters would cause a conflict
1748 * ip6_tnl_change_mtu - change mtu manually for tunnel device
1749 * @dev: virtual device associated with tunnel
1887 * ip6_tnl_dev_setup - setup virtual tunnel device
1888 * @dev: virtual device associated with tunnel
1918 * ip6_tnl_dev_init_gen - general initializer for all tunnel devices
1919 * @dev: virtual device associated with tunnel
1961 * ip6_tnl_dev_init - initializer for all non fallback tunnel devices
1962 * @dev: virtual device associated with tunnel
1979 * ip6_fb_tnl_dev_init - initializer for fallback tunnel device
2113 "Only protocol can be changed for fallback tunnel, not encap params"); in ip6_tnl_changelink()
2121 "Only protocol can be changed for fallback tunnel"); in ip6_tnl_changelink()
2194 struct ip6_tnl *tunnel = netdev_priv(dev); in ip6_tnl_fill_info() local
2195 struct __ip6_tnl_parm *parm = &tunnel->parms; in ip6_tnl_fill_info()
2208 if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || in ip6_tnl_fill_info()
2209 nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || in ip6_tnl_fill_info()
2210 nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || in ip6_tnl_fill_info()
2211 nla_put_u16(skb, IFLA_IPTUN_ENCAP_FLAGS, tunnel->encap.flags)) in ip6_tnl_fill_info()
2226 struct ip6_tnl *tunnel = netdev_priv(dev); in ip6_tnl_get_link_net() local
2228 return READ_ONCE(tunnel->net); in ip6_tnl_get_link_net()