summaryrefslogtreecommitdiffstats
path: root/lib/test_bpf.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-11-09 10:57:58 +0100
committerJakub Kicinski <kuba@kernel.org>2022-11-12 03:18:05 +0100
commit354259fa73e2aac92ae5e19522adb69a92c15b49 (patch)
tree2b9067c141413e5f6755501a3be4004985bd7ec3 /lib/test_bpf.c
parentMerge branch 'ptp-adjfreq-copnvert' (diff)
downloadlinux-354259fa73e2aac92ae5e19522adb69a92c15b49.tar.xz
linux-354259fa73e2aac92ae5e19522adb69a92c15b49.zip
net: remove skb->vlan_present
skb->vlan_present seems redundant. We can instead derive it from this boolean expression: vlan_present = skb->vlan_proto != 0 || skb->vlan_tci != 0 Add a new union, to access both fields in a single load/store when possible. union { u32 vlan_all; struct { __be16 vlan_proto; __u16 vlan_tci; }; }; This allows following patch to remove a conditional test in GRO stack. Note: We move remcsum_offload to keep TC_AT_INGRESS_MASK and SKB_MONO_DELIVERY_TIME_MASK unchanged. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Yonghong Song <yhs@fb.com> Acked-by: Martin KaFai Lau <martin.lau@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'lib/test_bpf.c')
-rw-r--r--lib/test_bpf.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index 5820704165a6..ade9ac672adb 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -14346,7 +14346,6 @@ static struct sk_buff *populate_skb(char *buf, int size)
skb->hash = SKB_HASH;
skb->queue_mapping = SKB_QUEUE_MAP;
skb->vlan_tci = SKB_VLAN_TCI;
- skb->vlan_present = SKB_VLAN_PRESENT;
skb->vlan_proto = htons(ETH_P_IP);
dev_net_set(&dev, &init_net);
skb->dev = &dev;