summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2014-03-27 15:42:20 -0700
committerDavid S. Miller <davem@davemloft.net>2014-03-29 17:58:37 -0400
commit5efeac44cfca62f66a1b2919fc8ec7f7c726d15b (patch)
treeb4d7d338f3ace293b905014afc70afc3189a89ff /include/linux
parent080b3c19a4ffe4677d7449880f4d0cea07182474 (diff)
downloadlinux-5efeac44cfca62f66a1b2919fc8ec7f7c726d15b.tar.gz
linux-5efeac44cfca62f66a1b2919fc8ec7f7c726d15b.tar.bz2
linux-5efeac44cfca62f66a1b2919fc8ec7f7c726d15b.zip
netpoll: Respect NETIF_F_LLTX
Stop taking the transmit lock when a network device has specified NETIF_F_LLTX. If no locks needed to trasnmit a packet this is the ideal scenario for netpoll as all packets can be trasnmitted immediately. Even if some locks are needed in ndo_start_xmit skipping any unnecessary serialization is desirable for netpoll as it makes it more likely a debugging packet may be trasnmitted immediately instead of being deferred until later. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 0d8c8718980a..4cd5e9e13c87 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2909,6 +2909,11 @@ static inline void netif_tx_unlock_bh(struct net_device *dev)
} \
}
+#define HARD_TX_TRYLOCK(dev, txq) \
+ (((dev->features & NETIF_F_LLTX) == 0) ? \
+ __netif_tx_trylock(txq) : \
+ true )
+
#define HARD_TX_UNLOCK(dev, txq) { \
if ((dev->features & NETIF_F_LLTX) == 0) { \
__netif_tx_unlock(txq); \