From: Jeremy Kerr <jk@ozlabs.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, allan@asix.com.tw, freddy@asix.com.tw,
pfink@christ-es.de, linux-usb@vger.kernel.org, louis@asix.com.tw
Subject: Re: [PATCH] net: usb: ax88179_178a: fix packet alignment padding
Date: Wed, 17 Jun 2020 08:56:39 +0800 [thread overview]
Message-ID: <ac9ac673933f0e8383c6ab538302058ba2469192.camel@ozlabs.org> (raw)
In-Reply-To: <20200616.135535.379478681934951754.davem@davemloft.net>
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, that makes sense, and is what the driver is currently doing;
between clustered packets, the header is aligned (up) to 8 bytes, then
the 2-byte padding is added to that.
For this change, I have assumed that the packet length behaviour (ie,
describing the un-padded length) is consistent between clustered
packets.
[If you have any hints for forcing clustered packets, I'll see if I can
probe the behaviour a little better to confirm]
Cheers,
Jeremy
next prev parent reply other threads:[~2020-06-17 0:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 2:54 [PATCH] net: usb: ax88179_178a: fix packet alignment padding Jeremy Kerr
2020-06-15 19:52 ` David Miller
2020-06-16 1:08 ` ASIX_Allan [Office]
2020-06-16 9:08 ` Jeremy Kerr
2020-06-16 20:55 ` David Miller
2020-06-17 0:56 ` Jeremy Kerr [this message]
2020-06-17 22:00 ` David Miller
2020-06-17 14:39 ` David Laight
2020-06-17 21:59 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ac9ac673933f0e8383c6ab538302058ba2469192.camel@ozlabs.org \
--to=jk@ozlabs.org \
--cc=allan@asix.com.tw \
--cc=davem@davemloft.net \
--cc=freddy@asix.com.tw \
--cc=linux-usb@vger.kernel.org \
--cc=louis@asix.com.tw \
--cc=netdev@vger.kernel.org \
--cc=pfink@christ-es.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).