Lines Matching refs:tpi

122 		     const struct tnl_ptk_info *tpi)  in ipgre_err()  argument
146 if (tpi->proto == htons(ETH_P_TEB)) in ipgre_err()
148 else if (tpi->proto == htons(ETH_P_ERSPAN) || in ipgre_err()
149 tpi->proto == htons(ETH_P_ERSPAN2)) in ipgre_err()
155 t = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in ipgre_err()
156 iph->daddr, iph->saddr, tpi->key); in ipgre_err()
192 if (tpi->proto == htons(ETH_P_IPV6) && in ipgre_err()
193 !ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4 + tpi->hdr_len, in ipgre_err()
233 struct tnl_ptk_info tpi; in gre_err() local
235 if (gre_parse_header(skb, &tpi, NULL, htons(ETH_P_IP), in gre_err()
250 ipgre_err(skb, info, &tpi); in gre_err()
262 static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi, in erspan_rcv() argument
280 tpi->flags | TUNNEL_NO_KEY, in erspan_rcv()
286 tpi->flags | TUNNEL_KEY, in erspan_rcv()
287 iph->saddr, iph->daddr, tpi->key); in erspan_rcv()
312 tpi->flags |= TUNNEL_KEY; in erspan_rcv()
313 flags = tpi->flags; in erspan_rcv()
314 tun_id = key32_to_tunnel_id(tpi->key); in erspan_rcv()
341 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in erspan_rcv()
351 static int __ipgre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *tpi, in __ipgre_rcv() argument
359 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in __ipgre_rcv()
360 iph->saddr, iph->daddr, tpi->key); in __ipgre_rcv()
365 if (__iptunnel_pull_header(skb, hdr_len, tpi->proto, in __ipgre_rcv()
382 flags = tpi->flags & (TUNNEL_CSUM | TUNNEL_KEY); in __ipgre_rcv()
383 tun_id = key32_to_tunnel_id(tpi->key); in __ipgre_rcv()
389 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in __ipgre_rcv()
399 static int ipgre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *tpi, in ipgre_rcv() argument
406 if (tpi->proto == htons(ETH_P_TEB)) in ipgre_rcv()
411 res = __ipgre_rcv(skb, tpi, itn, hdr_len, false); in ipgre_rcv()
412 if (res == PACKET_NEXT && tpi->proto == htons(ETH_P_TEB)) { in ipgre_rcv()
417 res = __ipgre_rcv(skb, tpi, itn, hdr_len, true); in ipgre_rcv()
424 struct tnl_ptk_info tpi; in gre_rcv() local
436 hdr_len = gre_parse_header(skb, &tpi, &csum_err, htons(ETH_P_IP), 0); in gre_rcv()
440 if (unlikely(tpi.proto == htons(ETH_P_ERSPAN) || in gre_rcv()
441 tpi.proto == htons(ETH_P_ERSPAN2))) { in gre_rcv()
442 if (erspan_rcv(skb, &tpi, hdr_len) == PACKET_RCVD) in gre_rcv()
447 if (ipgre_rcv(skb, &tpi, hdr_len) == PACKET_RCVD) in gre_rcv()