Re: [PATCH net-next 1/5] dsa: add support for Microchip KSZ tail tagging

2017-05-05 Thread Andrew Lunn
> +static struct sk_buff *ksz_xmit(struct sk_buff *skb, struct net_device *dev) > +{ > + struct dsa_slave_priv *p = netdev_priv(dev); > + struct sk_buff *nskb; > + int padlen; > + u8 *tag; > + > + padlen = 0; > + if (skb->len < 60) > + padlen = 60 - skb->len; > +

RE: [PATCH net-next 1/5] dsa: add support for Microchip KSZ tail tagging

2017-05-05 Thread Woojung.Huh
> > + padlen = 0; > > + if (skb->len < 60) > > + padlen = 60 - skb->len; > > Can you use ETH_ZLEN instead of 60 such that it is clear this is padding > to a minimum packet size (minus FCS)? > > > + > > + nskb = alloc_skb(NET_IP_ALIGN + skb->len + padlen + 2, > GFP_ATOMIC); > > Ca

Re: [PATCH net-next 1/5] dsa: add support for Microchip KSZ tail tagging

2017-05-05 Thread Florian Fainelli
On 05/05/2017 04:17 PM, woojung@microchip.com wrote: > From: Woojung Huh > > Adding support for the Microchip KSZ switch family tail tagging. > > Signed-off-by: Woojung Huh > --- > include/net/dsa.h | 1 + > net/dsa/Kconfig| 3 ++ > net/dsa/Makefile | 1 + > net/dsa/dsa.c |

[PATCH net-next 1/5] dsa: add support for Microchip KSZ tail tagging

2017-05-05 Thread Woojung.Huh
From: Woojung Huh Adding support for the Microchip KSZ switch family tail tagging. Signed-off-by: Woojung Huh --- include/net/dsa.h | 1 + net/dsa/Kconfig| 3 ++ net/dsa/Makefile | 1 + net/dsa/dsa.c | 3 ++ net/dsa/dsa_priv.h | 3 ++ net/dsa/tag_ksz.c | 98 ++