Lines Matching refs:tpi

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