tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: multiple rx/tx rings and interrupt delivery on newer nics



On Tue, Mar 24, 2009 at 05:46:38PM +0800, Sepherosa Ziehau wrote:
> On Thu, Jun 14, 2007 at 3:03 PM, Darren Reed <darrenr%fastmail.net@localhost> 
> wrote:
> >
> > I believe the standard matching for packets is a 5-tuple:
> > source address, destination address, protocol, source port, destination port
> 
> Nah, not 5 tuple.  And you will have a trouble time to figure out
> protocol of the packet, if the NIC does not provide it in the RX desc.

For many applications, just {saddr, daddr} is good enough to give you
reasonable distribution of input packets over CPUs, which is good enough
to let you get a lot of concurrency in the network stack with only a
single network interface.

The newer 8257x can actually go so far as to compute the TCP PCB hash
for us (well, this would require changing our PCB hash function, but
that's no big deal) allowing a ton of the logic in ip_input and tcp_input
to be skipped, as well as memory access even to the packet _headers_ until
quite late in the receive path, which is a neat trick indeed.

-- 
Thor Lancelot Simon                                        
tls%rek.tjls.com@localhost
    "Even experienced UNIX users occasionally enter rm *.* at the UNIX
     prompt only to realize too late that they have removed the wrong
     segment of the directory structure." - Microsoft WSS whitepaper


Home | Main Index | Thread Index | Old Index