public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "ASIX_Allan [Office]" <allan@asix•com.tw>
To: "'David Miller'" <davem@davemloft•net>,
	jk@ozlabs•org, "ASIX Louis [蘇威陸]" <louis@asix•com.tw>
Cc: <netdev@vger•kernel.org>, <pfink@christ-es•de>,
	<linux-usb@vger•kernel.org>
Subject: RE: [PATCH] net: usb: ax88179_178a: fix packet alignment padding
Date: Tue, 16 Jun 2020 09:08:30 +0800	[thread overview]
Message-ID: <000f01d6437a$ab60b080$02221180$@asix.com.tw> (raw)
In-Reply-To: <20200615.125220.492630206908309571.davem@davemloft.net>

Added ASIX S/W, Louis in the CC loop. 

 
---
Best regards,
Allan Chou
ASIX Electronics Corporation
TEL: 886-3-5799500 ext.228
FAX: 886-3-5799558
E-mail: allan@asix•com.tw 
https://www.asix.com.tw/ 



-----Original Message-----
From: David Miller <davem@davemloft•net> 
Sent: Tuesday, June 16, 2020 3:52 AM
To: jk@ozlabs•org
Cc: netdev@vger•kernel.org; allan@asix•com.tw; freddy@asix•com.tw; pfink@christ-es•de; linux-usb@vger•kernel.org
Subject: Re: [PATCH] net: usb: ax88179_178a: fix packet alignment padding

From: Jeremy Kerr <jk@ozlabs•org>
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, seq 1, length 64
> 	0x0000:  000a cd35 ea50 000a cd35 ea4f 0800 4500
> 	0x0010:  0054 c116 4000 4001 f63e c0a8 0101 c0a8
> 	0x0020:  0102 0800 b633 098f 0001 87ea cd5e 0000
> 	0x0030:  0000 dcf2 0600 0000 0000 ffff ffff ffff
> 	0x0040:  ffff ffff ffff ffff ffff ffff ffff ffff
> 	0x0050:  ffff ffff ffff ffff ffff ffff ffff ffff
> 	0x0060:  ffff 961f
> 
> 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?

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.

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?


  reply	other threads:[~2020-06-16  1:12 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] [this message]
2020-06-16  9:08   ` Jeremy Kerr
2020-06-16 20:55     ` David Miller
2020-06-17  0:56       ` Jeremy Kerr
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='000f01d6437a$ab60b080$02221180$@asix.com.tw' \
    --to=allan@asix$(echo .)com.tw \
    --cc=davem@davemloft$(echo .)net \
    --cc=jk@ozlabs$(echo .)org \
    --cc=linux-usb@vger$(echo .)kernel.org \
    --cc=louis@asix$(echo .)com.tw \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pfink@christ-es$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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