netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: victor@inliniac.net, netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] packet: Add fanout support.
Date: Mon, 04 Jul 2011 21:36:13 -0700 (PDT)	[thread overview]
Message-ID: <20110704.213613.685614847140856200.davem@davemloft.net> (raw)
In-Reply-To: <1309840429.2720.26.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 05 Jul 2011 06:33:49 +0200

> Le lundi 04 juillet 2011 à 21:20 -0700, David Miller a écrit :
>> +#define PACKET_FANOUT_MAX	2048
 ...
>> +	struct sock		*arr[PACKET_FANOUT_MAX];
> 
> Thats about 16Kbytes, yet you use kzalloc()
> 
>> +	spinlock_t		lock;
>> +	atomic_t		sk_ref;
>> +	struct packet_type	prot_hook ____cacheline_aligned_in_smp;
>> +};
>> +
> 
> Maybe use a dynamic array ? I suspect most uses wont even reach 16
> sockets anyway...

True.  Another option, for now, is to just make PACKET_FANOUT_MAX more
reasonable.  I'll make it something like 256.

Thanks!


  reply	other threads:[~2011-07-05  4:36 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05  4:20 [PATCH 2/2] packet: Add fanout support David Miller
2011-07-05  4:33 ` Eric Dumazet
2011-07-05  4:36   ` David Miller [this message]
2011-07-05  6:21 ` Eric Dumazet
2011-07-05  6:56   ` Victor Julien
2011-07-05  7:00     ` Eric Dumazet
2011-07-05  7:06       ` Victor Julien
2011-07-05  7:50       ` David Miller
2011-07-05  7:52         ` Victor Julien
2011-07-05  8:02           ` David Miller
2011-07-05  8:47             ` Hagen Paul Pfeifer
2011-07-05  8:48             ` Victor Julien
2011-07-05  9:01               ` David Miller
2011-07-05 16:03       ` Loke, Chetan
2011-07-05 16:08         ` David Miller
2011-07-05 16:16         ` Eric Dumazet
2011-07-05 16:21           ` Victor Julien
2011-07-05 16:23             ` Eric Dumazet
2011-07-05 17:15               ` Victor Julien
2011-07-05 18:26                 ` Eric Dumazet
2011-07-05 18:34                   ` Victor Julien
2011-07-05 17:35           ` Loke, Chetan
2011-07-05 18:20             ` Eric Dumazet
2011-07-05 21:10               ` Loke, Chetan
2011-07-05  7:48     ` David Miller
2011-07-05  7:46   ` David Miller
2011-07-05  9:50     ` Eric Dumazet
2011-07-05 10:07       ` David Miller

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=20110704.213613.685614847140856200.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=victor@inliniac.net \
    /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;
as well as URLs for NNTP newsgroup(s).