Re: [PATCH net-2.6.26 1/5][SOCK]: Enumerate struct proto-s to facilitate percpu inuse accounting.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Pavel Emelyanov <xemul@...>
Cc: Linux Netdev List <netdev@...>
Date: Friday, March 28, 2008 - 5:43 am

Pavel Emelyanov a écrit :
I believe some protocols can be registered, then unregistered, then 
re-registered (module loads, unloads, ...)

So you probably want to use a bitmap instead of a counter that will 
eventually reach PROTO_INUSE_NR

assign_proto_idx() should find a zero bit, and you should free this bit 
at proto_unregister() time





--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH net-2.6.26 1/5][SOCK]: Enumerate struct proto-s t..., Eric Dumazet, (Fri Mar 28, 5:43 am)