Re: [PATCH] net: usb: ax88179_178a: fix packet alignment padding

2020-06-17 Thread David Miller
From: Jeremy Kerr Date: Wed, 17 Jun 2020 08:56:39 +0800 > [If you have any hints for forcing clustered packets, I'll see if I can > probe the behaviour a little better to confirm] Probably it would involve having packets arrive back to back faster than some interval that either depends upon real

Re: [PATCH] net: usb: ax88179_178a: fix packet alignment padding

2020-06-17 Thread David Miller
From: Jeremy Kerr Date: Mon, 15 Jun 2020 10:54:56 +0800 > Using a AX88179 device (0b95:1790), I see two bytes of appended data on > every RX packet. For example, this 48-byte ping, using 0xff as a > payload byte: > > 04:20:22.528472 IP 192.168.1.1 > 192.168.1.2: ICMP echo request, id 2447, >

RE: [PATCH] net: usb: ax88179_178a: fix packet alignment padding

2020-06-17 Thread David Laight
From: Jeremy Kerr > Sent: 15 June 2020 03:55 While you are looking as this driver you might want to worry about what it sets skp->truesize to. > --- a/drivers/net/usb/ax88179_178a.c > +++ b/drivers/net/usb/ax88179_178a.c > @@ -1414,10 +1414,10 @@ static int ax88179_rx_fixup(struct usbnet *dev, >

Re: [PATCH] net: usb: ax88179_178a: fix packet alignment padding

2020-06-16 Thread Jeremy Kerr
Hi David, > It seems logical to me that what the chip does is align up the total > sub-packet length to a multiple of 4 or larger, and then add those two > prefix padding bytes. Otherwise the prefix padding won't necessarily > and reliably align the IP header after the link level header. Yep, th

Re: [PATCH] net: usb: ax88179_178a: fix packet alignment padding

2020-06-16 Thread David Miller
From: Jeremy Kerr Date: Tue, 16 Jun 2020 17:08:23 +0800 >> Because that code in this loop makes the same calculations: >> >> ax_skb = skb_clone(skb, GFP_ATOMIC); >> if (ax_skb) { >> ax_skb->len = pkt_len; >> ax_skb->

Re: [PATCH] net: usb: ax88179_178a: fix packet alignment padding

2020-06-16 Thread Jeremy Kerr
Hi David, > > Those last two bytes - 96 1f - aren't part of the original packet. > > Does this happen for non-tail packets in a multi-packet cluster? I believe so, yes. I haven't been able to reliably reproduce the multi- packet behaviour though, so input from ASIX would be good. > > Because t

RE: [PATCH] net: usb: ax88179_178a: fix packet alignment padding

2020-06-15 Thread ASIX_Allan [Office]
...@ozlabs.org Cc: netdev@vger.kernel.org; al...@asix.com.tw; fre...@asix.com.tw; pf...@christ-es.de; linux-...@vger.kernel.org Subject: Re: [PATCH] net: usb: ax88179_178a: fix packet alignment padding From: Jeremy Kerr Date: Mon, 15 Jun 2020 10:54:56 +0800 > Using a AX88179 device (0b95:1790), I

Re: [PATCH] net: usb: ax88179_178a: fix packet alignment padding

2020-06-15 Thread David Miller
From: Jeremy Kerr Date: Mon, 15 Jun 2020 10:54:56 +0800 > Using a AX88179 device (0b95:1790), I see two bytes of appended data on > every RX packet. For example, this 48-byte ping, using 0xff as a > payload byte: > > 04:20:22.528472 IP 192.168.1.1 > 192.168.1.2: ICMP echo request, id 2447, >