RE: [PATCH v6 net-next 1/5] net: add napi_id and hash

From: Eric Dumazet
Date: Wed May 29 2013 - 09:43:54 EST


On Wed, 2013-05-29 at 14:09 +0100, David Laight wrote:
> > > Adds a napi_id and a hashing mechanism to lookup a napi by id.
>
> Is this one of the places where the 'id' can be selected
> so that the 'hash' lookup never collides?

Very few devices will ever call napi_hash_add()

[ Real NIC RX queues, not virtual devices ]

We use a hash table with 256 slots, the chance of collision is about 0%

Lets not over engineer the thing before its even used.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/