Re: [PATCH v5 net-next 1/5] net: add napi_id and hash

2013-05-28 Thread Eliezer Tamir
On 28/05/2013 16:38, Eric Dumazet wrote: On Tue, 2013-05-28 at 11:03 +0300, Eliezer Tamir wrote: With an atomic we don't need the RTNL in any of the napi_id functions. One less thing to worry about when we try to remove the RTNL. OK but we'll need something to protect the lists against

Re: [PATCH v5 net-next 1/5] net: add napi_id and hash

2013-05-28 Thread Eric Dumazet
On Tue, 2013-05-28 at 11:03 +0300, Eliezer Tamir wrote: > With an atomic we don't need the RTNL in any of the napi_id functions. > One less thing to worry about when we try to remove the RTNL. OK but we'll need something to protect the lists against concurrent insert/deletes. A spinlock or a

Re: [PATCH v5 net-next 1/5] net: add napi_id and hash

2013-05-28 Thread Eliezer Tamir
On 28/05/2013 03:28, Eric Dumazet wrote: On Mon, 2013-05-27 at 10:44 +0300, Eliezer Tamir wrote: +extern void napi_hash_add(struct napi_struct *napi); + +/** + * napi_hash_del - remove a NAPI from blobal table global Thank you (my typing is almost as bad as my spelling, please don't

Re: [PATCH v5 net-next 1/5] net: add napi_id and hash

2013-05-28 Thread Eliezer Tamir
On 28/05/2013 03:28, Eric Dumazet wrote: On Mon, 2013-05-27 at 10:44 +0300, Eliezer Tamir wrote: +extern void napi_hash_add(struct napi_struct *napi); + +/** + * napi_hash_del - remove a NAPI from blobal table global Thank you (my typing is almost as bad as my spelling, please don't

Re: [PATCH v5 net-next 1/5] net: add napi_id and hash

2013-05-28 Thread Eric Dumazet
On Tue, 2013-05-28 at 11:03 +0300, Eliezer Tamir wrote: With an atomic we don't need the RTNL in any of the napi_id functions. One less thing to worry about when we try to remove the RTNL. OK but we'll need something to protect the lists against concurrent insert/deletes. A spinlock or a

Re: [PATCH v5 net-next 1/5] net: add napi_id and hash

2013-05-28 Thread Eliezer Tamir
On 28/05/2013 16:38, Eric Dumazet wrote: On Tue, 2013-05-28 at 11:03 +0300, Eliezer Tamir wrote: With an atomic we don't need the RTNL in any of the napi_id functions. One less thing to worry about when we try to remove the RTNL. OK but we'll need something to protect the lists against

Re: [PATCH v5 net-next 1/5] net: add napi_id and hash

2013-05-27 Thread Eric Dumazet
On Mon, 2013-05-27 at 10:44 +0300, Eliezer Tamir wrote: > Adds a napi_id and a hashing mechanism to lookup a napi by id. > This will be used by subsequent patches to implement low latency > Ethernet device polling. > Based on a code sample by Eric Dumazet. > > Signed-off-by: Eliezer Tamir > ---

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

2013-05-27 Thread Eliezer Tamir
Adds a napi_id and a hashing mechanism to lookup a napi by id. This will be used by subsequent patches to implement low latency Ethernet device polling. Based on a code sample by Eric Dumazet. Signed-off-by: Eliezer Tamir --- include/linux/netdevice.h | 29 +

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

2013-05-27 Thread Eliezer Tamir
Adds a napi_id and a hashing mechanism to lookup a napi by id. This will be used by subsequent patches to implement low latency Ethernet device polling. Based on a code sample by Eric Dumazet. Signed-off-by: Eliezer Tamir eliezer.ta...@linux.intel.com --- include/linux/netdevice.h | 29

Re: [PATCH v5 net-next 1/5] net: add napi_id and hash

2013-05-27 Thread Eric Dumazet
On Mon, 2013-05-27 at 10:44 +0300, Eliezer Tamir wrote: Adds a napi_id and a hashing mechanism to lookup a napi by id. This will be used by subsequent patches to implement low latency Ethernet device polling. Based on a code sample by Eric Dumazet. Signed-off-by: Eliezer Tamir