[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110525.180113.1194226831134092545.davem@davemloft.net>
Date: Wed, 25 May 2011 18:01:13 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: greearb@...delatech.com
Cc: netdev@...r.kernel.org
Subject: Re: [RFC] af-packet: Save reference to bound network device.
From: greearb@...delatech.com
Date: Wed, 25 May 2011 14:56:42 -0700
> From: Ben Greear <greearb@...delatech.com>
>
> This saves a network device lookup on each packet transmitted,
> for sockets that are bound to a network device.
>
> Signed-off-by: Ben Greear <greearb@...delatech.com>
You can't hold onto devices like this unless you also add a netdev
event notifier that will release it. Otherwise we'll hang on net
driver module unload until the packet socket is closed.
I don't think you really want to walk all pf-packet sockets on netdev
events just to do this.
dev_get_by_index(,_rcu}() is insanely cheap, I doubt it's showing up
on your profiles at all.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists