Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756502AbbHZB2i (ORCPT ); Tue, 25 Aug 2015 21:28:38 -0400 Received: from mail-oi0-f53.google.com ([209.85.218.53]:35925 "EHLO mail-oi0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965AbbHZB2h (ORCPT ); Tue, 25 Aug 2015 21:28:37 -0400 Message-ID: <55DD1642.2020301@gmail.com> Date: Tue, 25 Aug 2015 18:28:34 -0700 From: Florian Fainelli User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Vivien Didelot , netdev@vger.kernel.org CC: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Guenter Roeck , Andrew Lunn Subject: Re: [PATCH net] net: dsa: fix EDSA frame from hwaccel frame References: <1438670111-31051-1-git-send-email-vivien.didelot@savoirfairelinux.com> In-Reply-To: <1438670111-31051-1-git-send-email-vivien.didelot@savoirfairelinux.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1586 Lines: 53 Le 08/03/15 23:35, Vivien Didelot a écrit : > If the underlying network device features NETIF_F_HW_VLAN_CTAG_TX, > an EDSA frame is prepended with a 802.1q header once queued. > > To fix this, push the VLAN tag to the payload if present, before > checking the frame protocol. Makes sense, but you would want Andrew or Guenter to ack this patch. Thanks! > > [note: we may prefer to access directly VLAN TCI from hwaccel frames, > but this approach is simpler.] > > Signed-off-by: Vivien Didelot > --- > net/dsa/tag_edsa.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c > index 2288c80..3ada4eb 100644 > --- a/net/dsa/tag_edsa.c > +++ b/net/dsa/tag_edsa.c > @@ -9,6 +9,7 @@ > */ > > #include > +#include > #include > #include > #include "dsa_priv.h" > @@ -21,6 +22,10 @@ static struct sk_buff *edsa_xmit(struct sk_buff *skb, struct net_device *dev) > struct dsa_slave_priv *p = netdev_priv(dev); > u8 *edsa_header; > > + skb = vlan_hwaccel_push_inside(skb); > + if (unlikely(!skb)) > + return NULL; > + > /* > * Convert the outermost 802.1q tag to a DSA tag and prepend > * a DSA ethertype field is the packet is tagged, or insert > -- Florian -- 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/