From: David Miller <davem@davemloft.net>
To: johnpol@2ka.mipt.ru
Cc: netdev@vger.kernel.org
Subject: Re: [1/1 take 2] Unified socket storage. (with small bench).
Date: Wed, 09 May 2007 02:44:45 -0700 (PDT) [thread overview]
Message-ID: <20070509.024445.71552569.davem@davemloft.net> (raw)
In-Reply-To: <20070509093443.GA10028@2ka.mipt.ru>
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Date: Wed, 9 May 2007 13:34:43 +0400
> On Tue, May 08, 2007 at 11:48:28PM -0700, David Miller (davem@davemloft.net) wrote:
> > One thing that will need to be adjust for current tree is the UDP
> > hashing mechanism. But as far as I can tell your code should be able
> > to handle the new scheme (we now hash UDP by saddr+port when
> > possible, and this reminds me that IPV6 is broken and needs some
> > repairs).
>
> Yes, udp with multicast can be a problem, but it can be solved exactly
> the same way I implemented netlink broadcast (simple solution) -
> multicast sockets are placed into own list/hash table/trie with special
> bit in key/whatever and accessed when needed.
Actually, I am not talking about multicast. :)
In 2.6.22 what happens now in UDP is that if a non-wildcard rcv_saddr
is specified, we try to hash using the rcv_saddr and the port. But
when binding we have to check first if an existing port+wildcard bind
exists.
See __udp_lib_get_port() in Linus's current tree.
> > What exactly does the 'stages' arg mean? Is this a method to handle
> > partially bound sockets?
>
> It is a fallback to select a listening socket, which has remote
> addr/port as zero, so when socket it selected from tree, lookup wants to
> first get established socket with given remote identity and if this
> fails, it tries to select a wildcard one.
This kind of logic also has implications for UDP. :-)
next prev parent reply other threads:[~2007-05-09 9:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 17:43 [1/1 take 2] Unified socket storage. (with small bench) Evgeniy Polyakov
2007-05-09 6:48 ` David Miller
2007-05-09 9:34 ` Evgeniy Polyakov
2007-05-09 9:44 ` David Miller [this message]
2007-05-09 9:57 ` Evgeniy Polyakov
2007-05-09 10:02 ` David Miller
2007-05-09 10:22 ` Evgeniy Polyakov
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=20070509.024445.71552569.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=johnpol@2ka.mipt.ru \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.