Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1213475
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net] net: dsa: fix EDSA frame from hwaccel frame |
| Date | 2015-08-26 03:30 +0200 |
| Message-ID | <q1xHj-7wd-11@gated-at.bofh.it> (permalink) |
| References | <pTE3f-2tK-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 <vivien.didelot@savoirfairelinux.com> > --- > 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 <linux/etherdevice.h> > +#include <linux/if_vlan.h> > #include <linux/list.h> > #include <linux/slab.h> > #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/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH net] net: dsa: fix EDSA frame from hwaccel frame Florian Fainelli <f.fainelli@gmail.com> - 2015-08-26 03:30 +0200 Re: [PATCH net] net: dsa: fix EDSA frame from hwaccel frame Guenter Roeck <linux@roeck-us.net> - 2015-08-26 03:40 +0200
csiph-web