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

From: Eliezer Tamir
Date: Tue May 28 2013 - 04:03:28 EST


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 tell my mom)

@@ -166,6 +167,10 @@ static struct list_head offload_base __read_mostly;
DEFINE_RWLOCK(dev_base_lock);
EXPORT_SYMBOL(dev_base_lock);

+atomic_t napi_gen_id;

Not sure we need an atomic, we are protected by RTNL anyway.

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.

-Eliezer
--
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/