Home
last modified time | relevance | path

Searched refs:h_proto (Results 1 – 15 of 15) sorted by relevance

/samples/bpf/
Dxdp1_kern.c50 u16 h_proto; in xdp_prog1() local
58 h_proto = eth->h_proto; in xdp_prog1()
61 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_prog1()
68 h_proto = vhdr->h_vlan_encapsulated_proto; in xdp_prog1()
71 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_prog1()
78 h_proto = vhdr->h_vlan_encapsulated_proto; in xdp_prog1()
81 if (h_proto == htons(ETH_P_IP)) in xdp_prog1()
83 else if (h_proto == htons(ETH_P_IPV6)) in xdp_prog1()
Dxdp2_kern.c66 u16 h_proto; in xdp_prog1() local
74 h_proto = eth->h_proto; in xdp_prog1()
77 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_prog1()
84 h_proto = vhdr->h_vlan_encapsulated_proto; in xdp_prog1()
87 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_prog1()
94 h_proto = vhdr->h_vlan_encapsulated_proto; in xdp_prog1()
97 if (h_proto == htons(ETH_P_IP)) in xdp_prog1()
99 else if (h_proto == htons(ETH_P_IPV6)) in xdp_prog1()
Dparse_varlen.c118 uint64_t h_proto, nh_off; in handle_ingress() local
124 h_proto = eth->h_proto; in handle_ingress()
126 if (h_proto == ETH_P_8021Q || h_proto == ETH_P_8021AD) { in handle_ingress()
133 h_proto = vhdr->h_vlan_encapsulated_proto; in handle_ingress()
135 if (h_proto == ETH_P_8021Q || h_proto == ETH_P_8021AD) { in handle_ingress()
142 h_proto = vhdr->h_vlan_encapsulated_proto; in handle_ingress()
144 if (h_proto == htons(ETH_P_IP)) in handle_ingress()
146 else if (h_proto == htons(ETH_P_IPV6)) in handle_ingress()
Dtc_l2_redirect_kern.c37 unsigned short h_proto; member
76 if (eth->h_proto == htons(ETH_P_IP)) { in _l2_to_iptun_ingress_forward()
89 } else if (eth->h_proto == htons(ETH_P_IPV6)) { in _l2_to_iptun_ingress_forward()
127 if (eth->h_proto == htons(ETH_P_IP)) { in _l2_to_iptun_ingress_redirect()
135 if (!is_vip_addr(eth->h_proto, daddr)) in _l2_to_iptun_ingress_redirect()
166 if (eth->h_proto == htons(ETH_P_IP)) { in _l2_to_ip6tun_ingress_redirect()
173 if (!is_vip_addr(eth->h_proto, iph->daddr)) in _l2_to_ip6tun_ingress_redirect()
178 } else if (eth->h_proto == htons(ETH_P_IPV6)) { in _l2_to_ip6tun_ingress_redirect()
185 if (!is_vip_addr(eth->h_proto, ip6h->daddr.s6_addr32[0])) in _l2_to_ip6tun_ingress_redirect()
216 if (eth->h_proto == htons(ETH_P_IP)) { in _drop_non_tun_vip()
[all …]
Dxdp_fwd_kern.c51 u16 h_proto; in xdp_fwd_flags() local
61 h_proto = eth->h_proto; in xdp_fwd_flags()
62 if (h_proto == htons(ETH_P_IP)) { in xdp_fwd_flags()
79 } else if (h_proto == htons(ETH_P_IPV6)) { in xdp_fwd_flags()
133 if (h_proto == htons(ETH_P_IP)) in xdp_fwd_flags()
135 else if (h_proto == htons(ETH_P_IPV6)) in xdp_fwd_flags()
Dxdp_router_ipv4_kern.c119 u16 h_proto; in xdp_router_ipv4_prog() local
127 h_proto = eth->h_proto; in xdp_router_ipv4_prog()
129 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_router_ipv4_prog()
136 h_proto = vhdr->h_vlan_encapsulated_proto; in xdp_router_ipv4_prog()
138 if (h_proto == htons(ETH_P_ARP)) { in xdp_router_ipv4_prog()
140 } else if (h_proto == htons(ETH_P_IP)) { in xdp_router_ipv4_prog()
Dxdp_adjust_tail_kern.c55 eth->h_proto = orig_eth->h_proto; in swap_mac()
142 __u16 h_proto; in _xdp_icmp() local
147 h_proto = eth->h_proto; in _xdp_icmp()
149 if (h_proto == htons(ETH_P_IP)) in _xdp_icmp()
Dtest_cgrp2_tc_kern.c19 unsigned short h_proto; member
56 if (eth->h_proto != htons(ETH_P_IPV6) || in handle_egress()
59 eth->h_proto, ip6h->nexthdr); in handle_egress()
Dxdp_tx_iptunnel_kern.c70 __be16 h_proto) in set_ethhdr() argument
74 new_eth->h_proto = h_proto; in set_ethhdr()
221 __u16 h_proto; in _xdp_tx_iptunnel() local
226 h_proto = eth->h_proto; in _xdp_tx_iptunnel()
228 if (h_proto == htons(ETH_P_IP)) in _xdp_tx_iptunnel()
230 else if (h_proto == htons(ETH_P_IPV6)) in _xdp_tx_iptunnel()
Dparse_simple.c23 unsigned short h_proto; member
39 if (eth->h_proto != htons(ETH_P_IP)) in handle_ingress()
Dparse_ldabs.c32 if (load_half(skb, offsetof(struct ethhdr, h_proto)) != ETH_P_IP) in handle_ingress()
Dxdp_rxq_info_kern.c127 if (ntohs(eth->h_proto) < ETH_P_802_3_MIN) in xdp_prognum0()
Dtest_lwt_bpf.c179 ehdr.h_proto = __constant_htons(ETH_P_IP); in __do_push_ll_and_redirect()
Dxdp_redirect_cpu.bpf.c62 eth_type = eth->h_proto; in parse_eth()
198 eth_type = eth->h_proto; in xdp_prognum1_touch_data()
Dxdpsock_user.c762 eth_hdr->h_proto = htons(ETH_P_IP); in gen_eth_hdr_data()