Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vlan: Make vlan_remove_tag return nothing

All callers ignore the return value.

Prepare to reorder memmove() after skb_pull() which is a common pattern.

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20251105-skb-meta-rx-path-v4-4-5ceb08a9b37b@cloudflare.com

authored by

Jakub Sitnicki and committed by
Martin KaFai Lau
b85be58e f38499ff

+2 -4
+2 -4
include/linux/if_vlan.h
··· 731 731 * 732 732 * Expects the skb to contain a VLAN tag in the payload, and to have skb->data 733 733 * pointing at the MAC header. 734 - * 735 - * Returns: a new pointer to skb->data, or NULL on failure to pull. 736 734 */ 737 - static inline void *vlan_remove_tag(struct sk_buff *skb, u16 *vlan_tci) 735 + static inline void vlan_remove_tag(struct sk_buff *skb, u16 *vlan_tci) 738 736 { 739 737 struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data + ETH_HLEN); 740 738 ··· 740 742 741 743 memmove(skb->data + VLAN_HLEN, skb->data, 2 * ETH_ALEN); 742 744 vlan_set_encap_proto(skb, vhdr); 743 - return __skb_pull(skb, VLAN_HLEN); 745 + __skb_pull(skb, VLAN_HLEN); 744 746 } 745 747 746 748 /**