lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1386774802.30495.369.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Wed, 11 Dec 2013 07:13:22 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	David Laight <David.Laight@...LAB.COM>
Cc:	Dean Jenkins <Dean_Jenkins@...tor.com>, netdev@...r.kernel.org,
	davem@...emloft.net
Subject: RE: [PATCH 4/4] asix: C1 DUB-E100 double rx_urb_size to 4096

On Wed, 2013-12-11 at 11:30 +0000, David Laight wrote:

> I don't think this will help - you've only moved the error.
> If the hardware manages to feed over 4k of ethernet frame data
> into a single usb bulk data frame it will still go wrong.

Yep, I feel this way too.

> 
> The rx code needs to keep the partial ethernet frame until the
> next usb bulk data urb arrives.
> (This only applies if the urb is a multiple of the usb packet size
> and isn't known to have been terminated by a zero length block.)
> 
> This should work provided the urb size is a multiple of the usb
> packet size - I don't know if a 1536 (3*512) skb fits into a 4k page.
> If it doesn't you should probably allocate a 5k skb (8k memory).
> (I don't believe there is any point allocating a size inbetween?)


skb allocated on RX path have skb->head as a fragment from a page.

We try to use high order pages, so using a size in between is totally
worth it.

Check __netdev_alloc_frag() for details.

For example, using 1536 bytes, we can fit 21 frames per 32 KB page.

If we were rounding do 2048 bytes, we would fit 16 frames per 32KB page.

I fear that doubling rx_urb_size is artificially doubling the skb
truesize (or not, and this would be a bug), and this has
an impact on general performance of TCP stack.




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ