[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1380748118.19002.125.camel@edumazet-glaptop.roam.corp.google.com>
Date: Wed, 02 Oct 2013 14:08:38 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Shawn Bohrer <sbohrer@...advisors.com>
Cc: David Miller <davem@...emloft.net>, tomk@...advisors.com,
netdev <netdev@...r.kernel.org>
Subject: Re: [net-next 2/3] udp: Add udp early demux
On Wed, 2013-10-02 at 15:35 -0500, Shawn Bohrer wrote:
> Sorry, I must be a little slow today. I understand what you are
> suggesting but I don't see how to implement it with a score. Or at
> least not without potentially changing existing behavior. For example
> I could make the inet->inet_daddr case add +100 to the score and I
> would know that a score >= 100 was connected. However, this would
> unfairly favor that one case making a socket that only had a matching
> inet_daddr be better than one that only had a matching inet_dport,
> sk_bound_dev_if, and inet_rcv_saddr.
>
If early demux has to increment a socket refcount, then decrementing it
because it found a non connected socket, this will be too expensive.
Also, keep in mind UDP chains can be long, so you should limit the early
lookup to say a single socket.
TCP ehash is mostly empty (0 or 1 socket per bucket), so early demux
really makes sense, but for UDP, there is no such property.
--
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