Does libnl support multihtreaded apps ?

Thomas Graf tgraf at infradead.org
Thu May 12 06:53:05 EDT 2011


On Thu, May 12, 2011 at 12:44:58PM +0200, Romary Sonrier wrote:
> 
> So i checked into the var sk->s_local ( my process pid is 6808)
> Thread that doesn't get any error : s_local = {nl_family = 16, nl_pad =
> 0, nl_pid = 6808, nl_groups = 0},
> Thread that does get an error : s_local = {nl_family = 16, nl_pad = 0,
> nl_pid = 4201112, nl_groups = 0},
> 
> I didn't took time to understand the function  generate_local_port(),
> but it seems realy obscure to me.
> As far a I understood generate_local_port(), the bit mapping seeme to be
> correct:
>  6808 :                   00000000001101010011000
>  4201112:              10000000001101010011000
> 
> So the question is for me : Does libnl support multihtreaded apps ?
> 
> Does someone hase any idea ?

In general libnl does support multithreaded apps. There are a few remaining
problem areas, one of them is the above mentioned generate_local_port().
There is a patch from NetworkManager which introduces proper locking. I
just haven't gotten around merging it yet.



More information about the libnl mailing list