Message ID | 20210111104221.3451-1-dong.menglong@zte.com.cn (mailing list archive) |
---|---|
State | Accepted |
Commit | 324cefaf1c723625e93f703d6e6d78e28996b315 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] net: core: use eth_type_vlan in __netif_receive_skb_core | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 11 of 11 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 10 this patch: 10 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 18 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 10 this patch: 10 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Mon, 11 Jan 2021 02:42:21 -0800 you wrote: > From: Menglong Dong <dong.menglong@zte.com.cn> > > Replace the check for ETH_P_8021Q and ETH_P_8021AD in > __netif_receive_skb_core with eth_type_vlan. > > Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn> > > [...] Here is the summary with links: - [net-next] net: core: use eth_type_vlan in __netif_receive_skb_core https://git.kernel.org/netdev/net-next/c/324cefaf1c72 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/net/core/dev.c b/net/core/dev.c index e4d77c8abe76..267c4a8daa55 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5151,8 +5151,7 @@ static int __netif_receive_skb_core(struct sk_buff **pskb, bool pfmemalloc, skb_reset_mac_len(skb); } - if (skb->protocol == cpu_to_be16(ETH_P_8021Q) || - skb->protocol == cpu_to_be16(ETH_P_8021AD)) { + if (eth_type_vlan(skb->protocol)) { skb = skb_vlan_untag(skb); if (unlikely(!skb)) goto out; @@ -5236,8 +5235,7 @@ static int __netif_receive_skb_core(struct sk_buff **pskb, bool pfmemalloc, * find vlan device. */ skb->pkt_type = PACKET_OTHERHOST; - } else if (skb->protocol == cpu_to_be16(ETH_P_8021Q) || - skb->protocol == cpu_to_be16(ETH_P_8021AD)) { + } else if (eth_type_vlan(skb->protocol)) { /* Outer header is 802.1P with vlan 0, inner header is * 802.1Q or 802.1AD and vlan_do_receive() above could * not find vlan dev for vlan id 0.