Subject: Re: ixgbe: [RFC] [PATCH] Fix return of invalid txq

From: Peter P Waskiewicz Jr <[email-masked]>
Date: Fri, 15 Jan 2010 01:00:20 -0800

On Fri, 2010-01-15 at 00:44 -0800, David Miller wrote:
> From: "Waskiewicz Jr, Peter P" <[email-masked]>
> Date: Thu, 14 Jan 2010 23:58:17 -0800
> 
> > I've been trying to find time to add something like igb has, with a
> > tiny Tx lookup table that maps CPUs into a smaller set of Tx queues.
> 
> Why do you need "tables"?  Just modulo the it, with whatever
> optimizations you can come up with.
> 
> Or do we not have enough data references in the TX path already?
> :-/
> 
> I would suggest getting rid of the table in IGB too.
> 
> Either "tables" are a good idea (I think they definitely are not)
> or they are not.  And whatever the decision is we should do it
> consistently.  net/core/dev.c doesn't use tables, it does the
> subtraction modulo thing like Krishna does.

What I've been thinking of is more for the NUMA allocations per port.
If we have, say 2 sockets, 8 cores a piece, then we have 16 CPUs.  If we
assign a port to socket 0, I think the best use of resources is to
allocate 8 Rx/Tx queues, one per core in that socket.  If an application
comes from the other socket, we can have a table to map the other 8
cores from that socket into the 8 queues, instead of piling them all
into one of the Tx queues.

Cheers,
-PJ