Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ronny Meeus <ronny.meeus@gmail.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: Question: How to configure the Ethernet receive buffer allocation (was: (no subject)).
Date: Sat, 13 Oct 2012 12:29:33 +0200	[thread overview]
Message-ID: <1350124173.21172.14017.camel@edumazet-glaptop> (raw)
In-Reply-To: <CAMJ=MEdu9EtYhYHFyXD04b7M4BseX6oDfmB=NB9CAfMo59pxow@mail.gmail.com>

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)

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

  reply	other threads:[~2012-10-13 10:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-13  8:39 Question: How to configure the Ethernet receive buffer allocation (was: (no subject)) Ronny Meeus
2012-10-13  8:58 ` Eric Dumazet
2012-10-13  9:10   ` Ronny Meeus
2012-10-13 10:14     ` Ronny Meeus
2012-10-13 10:29       ` Eric Dumazet [this message]
2012-10-13 11:18         ` Ronny Meeus

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=1350124173.21172.14017.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=ronny.meeus@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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