Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753905AbbDJBkc (ORCPT ); Thu, 9 Apr 2015 21:40:32 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:11479 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751755AbbDJBka (ORCPT ); Thu, 9 Apr 2015 21:40:30 -0400 Message-ID: <55272A08.6040105@huawei.com> Date: Fri, 10 Apr 2015 09:40:24 +0800 From: Zefan Li User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 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> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.18.230] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.55272A0C.009F,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 765c4bc70cccea9247c0249d63e1205a Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1071 Lines: 29 >> 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! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/