Thread (6 messages) 6 messages, 2 authors, 2004-12-09

Re: netdev ioctl & dev_base_lock : bad idea ?

From: "David S. Miller" <davem@davemloft.net>
Date: 2004-12-09 07:13:31

On Thu, 09 Dec 2004 17:22:13 +1100
Benjamin Herrenschmidt [off-list ref] wrote:
Right, and I missed the fact that we did indeed take the semaphore and
not the lock in the _set_ functions which is just fine, we can actually
schedule.... except in set_multicast...

Is there any reason we actually _need_ to get the xmit lock in this one
specifically ?
Since we implement NETIF_F_LLTX, the core packet transmit routines do
no locking, the driver does it all.

So if we don't hold the tx lock in the set multicast routine, any other
cpu can come into our hard_start_xmit function and poke at the hardware.

Upon further consideration, it seems that it may be OK to drop that tx
lock right after we do the netif_stop_queue().  But we should regrab
the tx lock when we do the subsequent netif_wake_queue().
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help