[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e780f13fdde89d03ef863618d8de3dd67ba53c72.camel@ozlabs.org>
Date: Tue, 16 Jun 2020 17:08:23 +0800
From: Jeremy Kerr <jk@...abs.org>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, allan@...x.com.tw, freddy@...x.com.tw,
pfink@...ist-es.de, linux-usb@...r.kernel.org, louis@...x.com.tw
Subject: Re: [PATCH] net: usb: ax88179_178a: fix packet alignment padding
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 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->data = skb->data + 2;
> skb_set_tail_pointer(ax_skb, pkt_len);
> ax_skb->truesize = pkt_len + sizeof(struct sk_buff);
> ax88179_rx_checksum(ax_skb, pkt_hdr);
> usbnet_skb_return(dev, ax_skb);
>
> So if your change is right, it should be applied to this code block
> as well.
Yep, my patch changes that block too (or did I miss something?)
> And do we know that it's two extra tail bytes always? Or some kind
> of alignment padding the chip performs for every sub-packet?
I've assumed it's a constant two bytes of prefix padding, as that's all
I've seen. But it would be great to have more detail from ASIX if
possible.
Cheers,
Jeremy
Powered by blists - more mailing lists