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] [day] [month] [year] [list]
Date:	Sat, 13 Oct 2012 13:18:00 +0200
From:	Ronny Meeus <ronny.meeus@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: Question: How to configure the Ethernet receive buffer allocation
 (was: (no subject)).

On Sat, Oct 13, 2012 at 12:29 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Sat, 2012-10-13 at 12:14 +0200, Ronny Meeus wrote:
>
>> The ideal solution would be to have a solution were we use a packet
>> ring to store the packets in but use a standard socket to receive the
>> packets from this ring. In this way we can combine the ideal memory
>> usage of the packet ring solution (in fact almost no overhead)
>> combined with the virtual memory that must not be wasted in the
>> application space.
>>
>> I have no clue whether this is possible ...
>
> But how do you know before receiving packet from network that its size
> will be 1000 instead of 1500 ?
>
> Packet ring is nice when you have the right size, or else you need to
> add a copy of packets. Or you dedicate an ethernet device for an
> application (direct delivery to user land, no skbs at all)

This is in fact the case. This is a dedicated interface and the
packets will not be bigger than 1000 bytes.

>
> 2.6.32 kernel is a bit old for us on netdev.
>
> If you try latest kernel (Linus tree), you'll discover we no longer use
> one kmalloc-4096 entry to store a packet.
>
> However, with MTU=1500, we still consume around 2048 bytes per packet
> (including overhead)
>
> If you really cant change packet size and stay at 1000, you could try :
> reducing device mtu, to lower wasted ram per packet
>

In the mean time I use 64K pages for the kernel and then I see that 2K
buffers are getting used, so I gained already a large amount of
memory.
By reducing the MTU to 1000, it consumes buffers of 2048bytes.

Still not clear to me whether it is possible to combine the packet
ring only in kernel space and receive packets from it using a normal
socket operation?
--
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