summaryrefslogtreecommitdiffstats
path: root/include/linux/etherdevice.h
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2017-01-28 09:15:42 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-29 19:24:12 -0500
commit40be0dda0725886b623d67868db3219a2e74683b (patch)
tree20e4ab47bba12adbd70701e9d002ccb2599dae64 /include/linux/etherdevice.h
parent936f459bea07868723b057ece43d321446c82f0a (diff)
net: add devm version of alloc_etherdev_mqs function
This patch adds devm_alloc_etherdev_mqs function and devm_alloc_etherdev macro. These can be used for simpler netdev allocation without having to care about calling free_netdev. Thanks to this change drivers, their error paths and removal paths may get simpler by a bit. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/etherdevice.h')
-rw-r--r--include/linux/etherdevice.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index 42add77ae47d..c62b709b1ce0 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -54,6 +54,11 @@ struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
54#define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) 54#define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1)
55#define alloc_etherdev_mq(sizeof_priv, count) alloc_etherdev_mqs(sizeof_priv, count, count) 55#define alloc_etherdev_mq(sizeof_priv, count) alloc_etherdev_mqs(sizeof_priv, count, count)
56 56
57struct net_device *devm_alloc_etherdev_mqs(struct device *dev, int sizeof_priv,
58 unsigned int txqs,
59 unsigned int rxqs);
60#define devm_alloc_etherdev(dev, sizeof_priv) devm_alloc_etherdev_mqs(dev, sizeof_priv, 1, 1)
61
57struct sk_buff **eth_gro_receive(struct sk_buff **head, 62struct sk_buff **eth_gro_receive(struct sk_buff **head,
58 struct sk_buff *skb); 63 struct sk_buff *skb);
59int eth_gro_complete(struct sk_buff *skb, int nhoff); 64int eth_gro_complete(struct sk_buff *skb, int nhoff);