Lines Matching refs:tpi

120 		     const struct tnl_ptk_info *tpi)
144 if (tpi->proto == htons(ETH_P_TEB))
146 else if (tpi->proto == htons(ETH_P_ERSPAN) ||
147 tpi->proto == htons(ETH_P_ERSPAN2))
153 t = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags,
154 iph->daddr, iph->saddr, tpi->key);
190 if (tpi->proto == htons(ETH_P_IPV6) &&
191 !ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4 + tpi->hdr_len,
231 struct tnl_ptk_info tpi;
233 if (gre_parse_header(skb, &tpi, NULL, htons(ETH_P_IP),
248 ipgre_err(skb, info, &tpi);
260 static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi,
278 tpi->flags | TUNNEL_NO_KEY,
284 tpi->flags | TUNNEL_KEY,
285 iph->saddr, iph->daddr, tpi->key);
310 tpi->flags |= TUNNEL_KEY;
311 flags = tpi->flags;
312 tun_id = key32_to_tunnel_id(tpi->key);
339 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error);
349 static int __ipgre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *tpi,
357 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags,
358 iph->saddr, iph->daddr, tpi->key);
363 if (__iptunnel_pull_header(skb, hdr_len, tpi->proto,
377 flags = tpi->flags & (TUNNEL_CSUM | TUNNEL_KEY);
378 tun_id = key32_to_tunnel_id(tpi->key);
384 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error);
394 static int ipgre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *tpi,
401 if (tpi->proto == htons(ETH_P_TEB))
406 res = __ipgre_rcv(skb, tpi, itn, hdr_len, false);
407 if (res == PACKET_NEXT && tpi->proto == htons(ETH_P_TEB)) {
412 res = __ipgre_rcv(skb, tpi, itn, hdr_len, true);
419 struct tnl_ptk_info tpi;
431 hdr_len = gre_parse_header(skb, &tpi, &csum_err, htons(ETH_P_IP), 0);
435 if (unlikely(tpi.proto == htons(ETH_P_ERSPAN) ||
436 tpi.proto == htons(ETH_P_ERSPAN2))) {
437 if (erspan_rcv(skb, &tpi, hdr_len) == PACKET_RCVD)
442 if (ipgre_rcv(skb, &tpi, hdr_len) == PACKET_RCVD)