Skip to content
Commit 354259fa authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski
Browse files

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: default avatarEric Dumazet <edumazet@google.com>
Acked-by: default avatarYonghong Song <yhs@fb.com>
Acked-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2cf7e87f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment