summaryrefslogtreecommitdiff
path: root/net/core/gro.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-11-09 09:57:59 +0000
committerJakub Kicinski <kuba@kernel.org>2022-11-11 18:18:05 -0800
commitbe3ed48683f0d7ed808783fd7d919459b58b5b6b (patch)
tree542a8919dcb1b09d58af22b33bb805435420e18a /net/core/gro.c
parent354259fa73e2aac92ae5e19522adb69a92c15b49 (diff)
net: gro: no longer use skb_vlan_tag_present()
We can remove a conditional test in gro_list_prepare() by comparing vlan_all fields of the two skbs. Notes: While comparing the vlan_proto is not strictly needed, because part of the following compare_ether_header() call, using 32bit word is actually faster than using 16bit values. napi_reuse_skb() makes sure to clear skb->vlan_all, as it already calls __vlan_hwaccel_clear_tag() Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Martin KaFai Lau <martin.lau@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/gro.c')
-rw-r--r--net/core/gro.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/core/gro.c b/net/core/gro.c
index 8e0fe85a647d..fd8c6a7e8d3e 100644
--- a/net/core/gro.c
+++ b/net/core/gro.c
@@ -370,9 +370,7 @@ static void gro_list_prepare(const struct list_head *head,
}
diffs = (unsigned long)p->dev ^ (unsigned long)skb->dev;
- diffs |= skb_vlan_tag_present(p) ^ skb_vlan_tag_present(skb);
- if (skb_vlan_tag_present(p))
- diffs |= skb_vlan_tag_get(p) ^ skb_vlan_tag_get(skb);
+ diffs |= p->vlan_all ^ skb->vlan_all;
diffs |= skb_metadata_differs(p, skb);
if (maclen == ETH_HLEN)
diffs |= compare_ether_header(skb_mac_header(p),