* Doubt about locking in ixgb driver
@ 2006-08-09 13:24 Mithlesh Thukral
0 siblings, 0 replies; only message in thread
From: Mithlesh Thukral @ 2006-08-09 13:24 UTC (permalink / raw)
To: netdev
hi all,
The transmit functions of ethernet drivers (dev->hard_start_xmit) are
protected to prevent multiple execution of transmits going in parallel. The
general scheme used by most of driver is :
1. Reset NETIF_F_LLTX flag in dev->features and then use kernel locking given
through HARD_TX_LOCK (net/core/dev.c:3417)
OR
2. Use a internal lock of driver generally kept in adapter to prevent multiple
accesses.
In ixgb driver (drivers/net/ixgb/), there is a lock in adapter of driver
(adapter->tx_lock). But this is left before the ixgb_xmit_frame() function
returns. The access to adapter->tx_ring.next_to_use which i suppose will be
the index of next element to use from tx_ring is accessed outside the area
where lock is held. What will prevent race condition during accessing
adapter->tx_ring.next_to_use ?
How does multiple instances of xmit not run or multiple instances of xmit
running is fine ?
Regards,
Mithlesh Thukral
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-10 11:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-09 13:24 Doubt about locking in ixgb driver Mithlesh Thukral
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.