Home
last modified time | relevance | path

Searched refs:l2_header_size (Results 1 – 4 of 4) sorted by relevance

/packages/modules/Connectivity/bpf_progs/
DdscpPolicy.c49 const int l2_header_size = sizeof(struct ethhdr); in DEFINE_BPF_MAP_GRW() local
52 if (data + l2_header_size > data_end) return; in DEFINE_BPF_MAP_GRW()
69 hdr_size = l2_header_size + sizeof(struct iphdr); in DEFINE_BPF_MAP_GRW()
90 hdr_size = l2_header_size + sizeof(struct ipv6hdr); in DEFINE_BPF_MAP_GRW()
134 bpf_l3_csum_replace(skb, IP4_OFFSET(check, l2_header_size), htons(tos), htons(newTos), in DEFINE_BPF_MAP_GRW()
136 bpf_skb_store_bytes(skb, IP4_OFFSET(tos, l2_header_size), &newTos, sizeof(newTos), 0); in DEFINE_BPF_MAP_GRW()
140 bpf_skb_store_bytes(skb, l2_header_size, &new_first_be32, sizeof(__be32), in DEFINE_BPF_MAP_GRW()
214 bpf_l3_csum_replace(skb, IP4_OFFSET(check, l2_header_size), htons(tos), htons(new_tos), 2); in DEFINE_BPF_MAP_GRW()
215 bpf_skb_store_bytes(skb, IP4_OFFSET(tos, l2_header_size), &new_tos, sizeof(new_tos), 0); in DEFINE_BPF_MAP_GRW()
218 bpf_skb_store_bytes(skb, l2_header_size, &new_first_be32, sizeof(__be32), in DEFINE_BPF_MAP_GRW()
Doffload.c139 const int l2_header_size = is_ethernet ? sizeof(struct ethhdr) : 0; local
145 try_make_writable(skb, l2_header_size + IP6_HLEN + TCP_HLEN);
153 if (data + l2_header_size + sizeof(*ip6) > data_end) return TC_ACT_PIPE;
171 if (data + l2_header_size + sizeof(*ip6) + sizeof(*tcph) > data_end)
235 uint64_t L3_bytes = skb->len - l2_header_size;
363 const int l2_header_size, void* data, const void* data_end, in do_forward4_bottom() argument
373 if (data + l2_header_size + sizeof(*ip) + sizeof(*tcph) > data_end) in do_forward4_bottom()
381 if (data + l2_header_size + sizeof(*ip) + sizeof(*udph) > data_end) in do_forward4_bottom()
454 uint64_t L3_bytes = skb->len - l2_header_size; in do_forward4_bottom()
569 const int l2_header_size = is_ethernet ? sizeof(struct ethhdr) : 0; in do_forward4() local
[all …]
Doffload@mainline.c139 const int l2_header_size = is_ethernet ? sizeof(struct ethhdr) : 0; local
145 try_make_writable(skb, l2_header_size + IP6_HLEN + TCP_HLEN);
153 if (data + l2_header_size + sizeof(*ip6) > data_end) return TC_ACT_PIPE;
171 if (data + l2_header_size + sizeof(*ip6) + sizeof(*tcph) > data_end)
235 uint64_t L3_bytes = skb->len - l2_header_size;
363 const int l2_header_size, void* data, const void* data_end, in do_forward4_bottom() argument
373 if (data + l2_header_size + sizeof(*ip) + sizeof(*tcph) > data_end) in do_forward4_bottom()
381 if (data + l2_header_size + sizeof(*ip) + sizeof(*udph) > data_end) in do_forward4_bottom()
454 uint64_t L3_bytes = skb->len - l2_header_size; in do_forward4_bottom()
569 const int l2_header_size = is_ethernet ? sizeof(struct ethhdr) : 0; in do_forward4() local
[all …]
Dclatd.c68 const int l2_header_size = is_ethernet ? sizeof(struct ethhdr) : 0; in nat64() local
73 try_make_writable(skb, l2_header_size + sizeof(struct ipv6hdr)); in nat64()
81 if (data + l2_header_size + sizeof(*ip6) > data_end) return TC_ACT_PIPE; in nat64()
123 if (data + l2_header_size + sizeof(*ip6) + sizeof(struct frag_hdr) > data_end) in nat64()
245 try_make_writable(skb, l2_header_size + sizeof(struct iphdr)); in nat64()
253 if (data + l2_header_size + sizeof(struct iphdr) > data_end) return TC_ACT_SHOT; in nat64()
270 __sync_fetch_and_add(&v->bytes, skb->len - l2_header_size); in nat64()