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]
Date:	Wed, 11 Mar 2015 17:06:57 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Alexander Duyck' <alexander.h.duyck@...hat.com>,
	"Govindarajulu Varadarajan" <_govind@....com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:	"ssujith@...co.com" <ssujith@...co.com>,
	"benve@...co.com" <benve@...co.com>
Subject: RE: [PATCH net-next v3 1/2] net: implement dma cache skb allocator

From: Alexander Duyck
...
> The question I would have is do you actually need to have the 9k
> buffer?  Does the hardware support any sort of scatter-gather receive?
> If so that would be preferable as the 9k allocation per skb will have
> significant overhead when you start receiving small packets.
...

You don't necessarily need true scatter gather.

A lot of ethernet MAC continue long frames into the buffer
associated with the next ring entry.
So if you fill the ring with (say) 2k buffers you 'just' have
to piece the fragments together when a long frame is received.

I used to use a single 64k buffer split into 128 buffers of 512
bytes each (last was actually smaller for alignment).
All receive frames were copied into (the equivalent of) an skb
that was allocated after the receive completed.
The aligned copy (including the leading and trailing padding)
didn't actually cost enough to worry about.
(Without TCP checksum offload the data was heading for the cache.)

	David

--
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