Andrew Gallatin wrote:
> Hi,
>
> I'm looking for advice on how how to handle a NIC which has multiple
> hardware rings and which hashes incoming traffic to different rings
> based on IP address and/or port number.
>
> How should the driver decide which transmit ring to use for an
> outgoing frame?  Should it use the same hashing mechanism as the NIC
> to decide?  Should it just hash to a ring based on CPU id and try to
> keep abreast of which rings are bound to which CPUs?
>   

Come crossbow, you won't have to think about this.  You'll just expose 
each TX resource up to the mac layer.

In the meantime, you could use the same hashing alg that the RX hardware 
uses.

Hashing based on CPU id at first blush sounds like a good idea, except 
that it isn't entirely clear that you won't see packets arriving for the 
same stream from separate CPUs.  The main problem here is thread 
mobility, and the tx logic in TCP... so you could suffer some packet 
reordering.

I'd play with it though, and maybe offer it as a tunable.  Hashing on 
the CPUid will be alot faster than looking at the headers, I expect.

    -- Garrett
> Thanks,
>
> Drew
>
> _______________________________________________
> networking-discuss mailing list
> [email protected]
>   

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to