From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <55272A08.6040105@huawei.com> Date: Fri, 10 Apr 2015 09:40:24 +0800 From: Zefan Li MIME-Version: 1.0 To: Toshiaki Makita CC: , , , "David S. Miller" Subject: Re: [PATCH 3.4 077/176] net: Fix stacked vlan offload features computation References: <1428569028-23762-1-git-send-email-lizf@kernel.org> <1428569224-23820-77-git-send-email-lizf@kernel.org> <55271E36.5050309@lab.ntt.co.jp> In-Reply-To: <55271E36.5050309@lab.ntt.co.jp> Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: >> diff --git a/net/core/dev.c b/net/core/dev.c >> index 0770364..f783dd3 100644 >> --- a/net/core/dev.c >> +++ b/net/core/dev.c >> @@ -2149,6 +2149,14 @@ netdev_features_t netif_skb_features(struct sk_buff *skb) >> } else if (!vlan_tx_tag_present(skb)) { >> return harmonize_features(skb, protocol, features); >> } >> + if (!vlan_tx_tag_present(skb)) { >> + if (unlikely(protocol == htons(ETH_P_8021Q))) { >> + struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data; >> + protocol = veh->h_vlan_encapsulated_proto; >> + } else { >> + return harmonize_features(skb, protocol, features); >> + } >> + } > > This does not look like a correct fix. > We need to replace the existing check rather than add a new check, like > this: > https://lkml.org/lkml/2015/2/16/649 Will fix. Thanks for the review!