Re: [RFC] [PATCH] net: Add support for ndo_select_queue() functions to cache the queue mapping
From: David Miller <davem@davemloft.net>
Date: 2010-02-04 01:47:23
From: David Miller <davem@davemloft.net>
Date: 2010-02-04 01:47:23
From: Ben Hutchings <redacted> Date: Thu, 28 Jan 2010 18:34:34 +0000
On Thu, 2010-01-28 at 10:00 -0800, Stephen Hemminger wrote:quoted
Therefore the transmit hash and receiver hash will be different.The intent here is to make it worthwhile to calculate that expensive hash on the TX side.
I would rather something like this be implemented in a way which is device hash agnostic. And I believe it is possible to do this. Anyways, why can't you just propagate the RX queue used by the flow to the socket TX hash? We already store the RX queue in the SKB on receive, the socket packet receive handling can simply propagate that to the TX queue selector. This would avoid having to do anything special in the driver's select queue method. In any event, overriding the queue selection method, while not absolutely forbidden, is very much discouraged. And if this new scheme of yours creates another reason drivers will start to override it, that's another negative in my book. But most importantly, the last thing we want to do is calculate something insane like Toeplitz, even if it's just once per connection.