Lines Matching defs:tpi

123 		     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);
191 if (tpi->proto == htons(ETH_P_IPV6)) {
197 if (!ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4 + tpi->hdr_len,
238 struct tnl_ptk_info tpi;
240 if (gre_parse_header(skb, &tpi, NULL, htons(ETH_P_IP),
255 ipgre_err(skb, info, &tpi);
267 static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi,
281 ip_tunnel_flags_copy(flags, tpi->flags);
300 iph->saddr, iph->daddr, tpi->key);
324 __set_bit(IP_TUNNEL_KEY_BIT, tpi->flags);
325 ip_tunnel_flags_copy(flags, tpi->flags);
326 tun_id = key32_to_tunnel_id(tpi->key);
354 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error);
364 static int __ipgre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *tpi,
372 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags,
373 iph->saddr, iph->daddr, tpi->key);
378 if (__iptunnel_pull_header(skb, hdr_len, tpi->proto,
397 ip_tunnel_flags_and(flags, tpi->flags, flags);
399 tun_id = key32_to_tunnel_id(tpi->key);
405 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error);
415 static int ipgre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *tpi,
422 if (tpi->proto == htons(ETH_P_TEB))
427 res = __ipgre_rcv(skb, tpi, itn, hdr_len, false);
428 if (res == PACKET_NEXT && tpi->proto == htons(ETH_P_TEB)) {
433 res = __ipgre_rcv(skb, tpi, itn, hdr_len, true);
440 struct tnl_ptk_info tpi;
452 hdr_len = gre_parse_header(skb, &tpi, &csum_err, htons(ETH_P_IP), 0);
456 if (unlikely(tpi.proto == htons(ETH_P_ERSPAN) ||
457 tpi.proto == htons(ETH_P_ERSPAN2))) {
458 if (erspan_rcv(skb, &tpi, hdr_len) == PACKET_RCVD)
463 if (ipgre_rcv(skb, &tpi, hdr_len) == PACKET_RCVD)