Re: [PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-14 Thread Marek Vasut
On 12/07/2018 06:43 PM, Marek Vasut wrote: > Make sure to cater even for network packets with VLAN tags in them, > increase the minimal packets size to account for those. > > Signed-off-by: Marek Vasut > Cc: Vivien Didelot > Cc: Woojung Huh > Cc: David S. Miller > Cc: Tristram Ha > --- > net

Re: [PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-10 Thread Marek Vasut
On 12/10/2018 10:49 PM, tristram...@microchip.com wrote: >> I am not looking for a hack-around, I am looking for a proper solution. >> > > As you have the hardware you can try something to correct the problem. > > The change was introduced in commit 9421c9015047 on Nov 15. In the > net-next tree

RE: [PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-10 Thread Tristram.Ha
> I am not looking for a hack-around, I am looking for a proper solution. > As you have the hardware you can try something to correct the problem. The change was introduced in commit 9421c9015047 on Nov 15. In the net-next tree it is about -42 commits. git log -42 cpsw.c git diff f5b589488ea5

Re: [PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-10 Thread Florian Fainelli
On 12/10/18 12:04 PM, tristram...@microchip.com wrote: >> -padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len; >> +padlen = (skb->len >= VLAN_ETH_ZLEN) ? 0 : VLAN_ETH_ZLEN - skb- >>> len; >>> Oh so they add the internal VLAN at the end of the frame, not the >>> be

Re: [PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-10 Thread Marek Vasut
On 12/10/2018 09:04 PM, tristram...@microchip.com wrote: >> -padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len; >> +padlen = (skb->len >= VLAN_ETH_ZLEN) ? 0 : VLAN_ETH_ZLEN - skb- >>> len; >>> Oh so they add the internal VLAN at the end of the frame, not the >>>

RE: [PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-10 Thread Tristram.Ha
> -padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len; > +padlen = (skb->len >= VLAN_ETH_ZLEN) ? 0 : VLAN_ETH_ZLEN - skb- > > len; > > Oh so they add the internal VLAN at the end of the frame, not the > > beginning? That is quite surprising but that would not be

Re: [PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-10 Thread Marek Vasut
On 12/08/2018 06:35 PM, Florian Fainelli wrote: > Le 12/7/18 à 8:25 PM, Marek Vasut a écrit : >> On 12/08/2018 01:52 AM, tristram...@microchip.com wrote: - padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len; + padlen = (skb->len >= VLAN_ETH_ZLEN) ? 0 : VLAN_ETH_ZLEN - skb- >

Re: [PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-08 Thread Florian Fainelli
Le 12/7/18 à 8:25 PM, Marek Vasut a écrit : > On 12/08/2018 01:52 AM, tristram...@microchip.com wrote: >>> - padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len; >>> + padlen = (skb->len >= VLAN_ETH_ZLEN) ? 0 : VLAN_ETH_ZLEN - skb- len; >> >> The requirement is the tail tag should be

Re: [PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-07 Thread Marek Vasut
On 12/08/2018 01:52 AM, tristram...@microchip.com wrote: >> -padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len; >> +padlen = (skb->len >= VLAN_ETH_ZLEN) ? 0 : VLAN_ETH_ZLEN - skb- >>> len; > > The requirement is the tail tag should be at the end of frame before FCS. > When the leng

RE: [PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-07 Thread Tristram.Ha
> - padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len; > + padlen = (skb->len >= VLAN_ETH_ZLEN) ? 0 : VLAN_ETH_ZLEN - skb- > >len; The requirement is the tail tag should be at the end of frame before FCS. When the length is less than 60 the MAC controller will pad the frame to lega

[PATCH] net: dsa: ksz: Increase the tag alignment

2018-12-07 Thread Marek Vasut
Make sure to cater even for network packets with VLAN tags in them, increase the minimal packets size to account for those. Signed-off-by: Marek Vasut Cc: Vivien Didelot Cc: Woojung Huh Cc: David S. Miller Cc: Tristram Ha --- net/dsa/tag_ksz.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti