From: David Miller Subject: Re: [PATCH v7 net] stmmac: added support for 802.1ad vlan stripping Date: Fri, 15 Jun 2018 09:06:20 -0700 (PDT) Message-ID: <20180615.090620.439725036796865207.davem@davemloft.net> References: <20180610.122918.824988605265684146.davem@davemloft.net> <82c9c00a-b1b7-bd16-0e9c-8b31291cb618@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: makita.toshiaki@lab.ntt.co.jp, Jose.Abreu@synopsys.com, f.fainelli@gmail.com, netdev@vger.kernel.org, peppe.cavallaro@st.com, alexandre.torgue@st.com To: eladv6@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:59452 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965999AbeFOQGX (ORCPT ); Fri, 15 Jun 2018 12:06:23 -0400 In-Reply-To: <82c9c00a-b1b7-bd16-0e9c-8b31291cb618@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Elad Nachman Date: Fri, 15 Jun 2018 09:57:39 +0300 > stmmac reception handler calls stmmac_rx_vlan() to strip the vlan before > calling napi_gro_receive(). > > The function assumes VLAN tagged frames are always tagged with > 802.1Q protocol, and assigns ETH_P_8021Q to the skb by hard-coding > the parameter on call to __vlan_hwaccel_put_tag() . > > This causes packets not to be passed to the VLAN slave if it was created > with 802.1AD protocol > (ip link add link eth0 eth0.100 type vlan proto 802.1ad id 100). > > This fix passes the protocol from the VLAN header into > __vlan_hwaccel_put_tag() instead of using the hard-coded value of > ETH_P_8021Q. > > NETIF_F_HW_VLAN_STAG_RX check was added and the strip action is now > dependent on the correct combination of features and the detected vlan tag. > > NETIF_F_HW_VLAN_STAG_RX feature was added to be in line with the driver > actual abilities. > > Signed-off-by: Elad Nachman Applied, thank you.