summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-03-29 18:00:37 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-29 18:00:37 -0400
commit587daaf38296244d216a8dd354e6ab743b075fb8 (patch)
treeb4d7d338f3ace293b905014afc70afc3189a89ff /include
parent3f705f73a0ab345321ef6e5a293c04bf7e9df818 (diff)
parent5efeac44cfca62f66a1b2919fc8ec7f7c726d15b (diff)
downloadcachepc-linux-587daaf38296244d216a8dd354e6ab743b075fb8.tar.gz
cachepc-linux-587daaf38296244d216a8dd354e6ab743b075fb8.zip
Merge branch 'netpoll-next'
Eric W. Biederman says: ==================== netpoll: Cleanups and fixes This should be a small set of safe cleanups and fixes to netpoll. The fixes are vlan headers are now always inserted when needed, and napi polling is always avoided when network devices are closed. There are a bunch of little cleanups removing unnecessary code, fixing function naming, not taking unnecessary locks and removing general silliness. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h8
-rw-r--r--include/linux/netpoll.h10
2 files changed, 11 insertions, 7 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 159c7e7945f8..4cd5e9e13c87 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1037,8 +1037,7 @@ struct net_device_ops {
#ifdef CONFIG_NET_POLL_CONTROLLER
void (*ndo_poll_controller)(struct net_device *dev);
int (*ndo_netpoll_setup)(struct net_device *dev,
- struct netpoll_info *info,
- gfp_t gfp);
+ struct netpoll_info *info);
void (*ndo_netpoll_cleanup)(struct net_device *dev);
#endif
#ifdef CONFIG_NET_RX_BUSY_POLL
@@ -2910,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); \
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 1b475a5a7239..b25ee9ffdbe6 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -47,17 +47,17 @@ struct netpoll_info {
};
#ifdef CONFIG_NETPOLL
-extern void netpoll_rx_disable(struct net_device *dev);
-extern void netpoll_rx_enable(struct net_device *dev);
+extern void netpoll_poll_disable(struct net_device *dev);
+extern void netpoll_poll_enable(struct net_device *dev);
#else
-static inline void netpoll_rx_disable(struct net_device *dev) { return; }
-static inline void netpoll_rx_enable(struct net_device *dev) { return; }
+static inline void netpoll_poll_disable(struct net_device *dev) { return; }
+static inline void netpoll_poll_enable(struct net_device *dev) { return; }
#endif
void netpoll_send_udp(struct netpoll *np, const char *msg, int len);
void netpoll_print_options(struct netpoll *np);
int netpoll_parse_options(struct netpoll *np, char *opt);
-int __netpoll_setup(struct netpoll *np, struct net_device *ndev, gfp_t gfp);
+int __netpoll_setup(struct netpoll *np, struct net_device *ndev);
int netpoll_setup(struct netpoll *np);
void __netpoll_cleanup(struct netpoll *np);
void __netpoll_free_async(struct netpoll *np);