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>] [day] [month] [year] [list]
Date:	Thu, 29 May 2008 19:35:27 +0400
From:	Evgeniy Polyakov <johnpol@....mipt.ru>
To:	Keyur Chudgar <kchudgar@...c.com>
Cc:	David Miller <davem@...emloft.net>, kchudgar.linux@...il.com,
	netdev@...r.kernel.org
Subject: Re: Single packet receiving in multiple ring buffers

On Thu, May 29, 2008 at 08:06:25AM -0700, Keyur Chudgar (kchudgar@...c.com) wrote:
> > Does your hardware support MTU (or kind of that like e1000, which
> supports packets with size upto next power of two over > MTU)? 
> 
> Yes, it does support MTU. The problem I am discussing will be for jumbo
> frames only.

Then I do not exactly understand a problem, you allocate say 1500 bytes
skb and number of pages (use PAGE_SIZE for arch driver is being loaded),
depending on arch you can even use a single page for the whole packet.
Then install descriptors according to sizes (first one will have size
1500 bytes, second and third ones will be PAGE_SIZE).

With jumbo frames you will waste some descriptors and some pages, but
small-sized traffic will hit only descriptor associated with skb->data,
so you will detach page from skb and submit it to stack, allocate new
one and attach that pages to new skb. If size is too small you can
allocate new small skb and copy data there (I recalled, it is called
copybreak) and submit it to stack instead of one, where DMA was
completed.

> > Page size is different on each arch, for x86 it is 4k by default.
> OK.

You can check PAGE_SIZE for particular arch NIC is used.

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