Searched refs:bpf_htons (Results 26 - 50 of 62) sorted by last modified time

123

/linux-master/tools/testing/selftests/bpf/progs/
H A Dtest_cls_redirect.c212 uint16_t frag_off = ip->frag_off & bpf_htons(IP_OFFSET_MASK);
213 return (ip->frag_off & bpf_htons(IP_MF)) != 0 || frag_off > 0;
390 encap->eth.h_proto = bpf_htons(ETH_P_IPV6);
521 bpf_htons(bpf_ntohs(encap_gre->ip.tot_len) + delta);
523 encap_gre->gre.protocol = bpf_htons(proto);
947 if (skb->protocol != bpf_htons(ETH_P_IP)) {
H A Dtest_cls_redirect_dynptr.c121 uint16_t frag_off = ip->frag_off & bpf_htons(IP_OFFSET_MASK);
122 return (ip->frag_off & bpf_htons(IP_MF)) != 0 || frag_off > 0;
282 encap->eth.h_proto = bpf_htons(ETH_P_IPV6);
409 bpf_htons(bpf_ntohs(encap_gre->ip.tot_len) + delta);
411 encap_gre->gre.protocol = bpf_htons(proto);
857 if (skb->protocol != bpf_htons(ETH_P_IP))
H A Dxdp_metadata.c46 if (eth->h_proto == bpf_htons(ETH_P_IP)) {
51 if (eth->h_proto == bpf_htons(ETH_P_IPV6)) {
64 if (udp->dest != bpf_htons(8080))
H A Dxdp_hw_metadata.c42 if (eth + 1 < data_end && (eth->h_proto == bpf_htons(ETH_P_8021AD) ||
43 eth->h_proto == bpf_htons(ETH_P_8021Q)))
46 if (eth + 1 < data_end && eth->h_proto == bpf_htons(ETH_P_8021Q))
50 if (eth->h_proto == bpf_htons(ETH_P_IP)) {
55 if (eth->h_proto == bpf_htons(ETH_P_IPV6)) {
70 if (udp->dest != bpf_htons(9091)) {
H A Dtest_tc_link.c30 seen_eth = eth.h_proto == bpf_htons(ETH_P_IP);
H A Dtest_assign_reuse.c86 if (!th->syn || th->ack || th->dest != bpf_htons(dest_port))
99 if (uh->dest != bpf_htons(dest_port))
117 if (eth->h_proto == bpf_htons(ETH_P_IP)) {
H A Dcgroup_tcp_skb.c29 if (skb->protocol != bpf_htons(ETH_P_IPV6))
40 if (tcph->source != bpf_htons(g_sock_port) &&
41 tcph->dest != bpf_htons(g_sock_port))
H A Dvrf_socket_lookup.c29 if (eth->h_proto != bpf_htons(ETH_P_IP))
H A Dxdpwall.c265 if (udp->dest != bpf_htons(6666))
334 if (proto != bpf_htons(ETH_P_IPV6))
H A Dxdp_features.c77 if (eh->h_proto == bpf_htons(ETH_P_IP)) {
98 } else if (eh->h_proto == bpf_htons(ETH_P_IPV6)) {
124 if (port != bpf_htons(DUT_ECHO_PORT))
131 return bpf_htons(tlv->type) == CMD_ECHO ? 0 : -EINVAL;
H A Dverifier_netfilter_ctx.c118 return th->dest == bpf_htons(22) ? NF_ACCEPT : NF_DROP;
H A Dtest_select_reuseport_kern.c83 if (data_check.eth_protocol == bpf_htons(ETH_P_IP)) {
H A Dtest_sk_lookup.c67 static const __u16 SRC_PORT = bpf_htons(8008);
H A Dtest_sk_lookup_kern.c29 if (eth_proto == bpf_htons(ETH_P_IP)) {
38 } else if (eth_proto == bpf_htons(ETH_P_IPV6)) {
H A Dtest_sk_assign.c68 if (eth->h_proto == bpf_htons(ETH_P_IP)) {
80 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) {
119 if (dport != bpf_htons(4321))
153 if (dport != bpf_htons(4321))
H A Dtest_pkt_access.c115 if (eth->h_proto == bpf_htons(ETH_P_IP)) {
123 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) {
H A Dtest_l4lb_noinline_dynptr.c474 if (eth_proto == bpf_htons(ETH_P_IP))
476 else if (eth_proto == bpf_htons(ETH_P_IPV6))
H A Dtest_bpf_nf.c181 tuple->dst.u.all == bpf_htons(sport))
184 tuple->src.u.all == bpf_htons(dport))
H A Drecvmsg6_prog.c41 ctx->user_port = bpf_htons(SERV6_PORT);
H A Drecvmsg4_prog.c35 ctx->user_port = bpf_htons(SERV4_PORT);
H A Dcgroup_skb_sk_lookup_kern.c72 if (skb->protocol != bpf_htons(ETH_P_IPV6))
H A Dbpf_flow.c121 case bpf_htons(ETH_P_IP):
124 case bpf_htons(ETH_P_IPV6):
127 case bpf_htons(ETH_P_MPLS_MC):
128 case bpf_htons(ETH_P_MPLS_UC):
131 case bpf_htons(ETH_P_8021Q):
132 case bpf_htons(ETH_P_8021AD):
148 if (keys->n_proto == bpf_htons(ETH_P_IP)) {
186 return parse_eth_proto(skb, bpf_htons(ETH_P_IP));
192 return parse_eth_proto(skb, bpf_htons(ETH_P_IPV6));
198 if (bpf_htons(gr
[all...]
/linux-master/samples/bpf/
H A Dnet_shared.h25 #define bpf_htons(x) __builtin_bswap16(x) macro
29 #define bpf_htons(x) (x) macro
H A Dtest_lwt_bpf.c171 ehdr.h_proto = bpf_htons(ETH_P_IP);
H A Dtest_cgrp2_tc.bpf.c42 if (eth->h_proto != bpf_htons(ETH_P_IPV6) ||

Completed in 486 milliseconds

123