summaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2016-10-28 11:43:20 -0400
committerDavid S. Miller <davem@davemloft.net>2016-10-31 15:00:47 -0400
commit9cf1f6a8c4cbb7836b838b51b3b02ddf32c6c6a0 (patch)
tree95234f2b1432742b72108a587692635ba5a47be2 /include/linux/netdevice.h
parent20861f26e33d76a4f3587bcc866fa1dab3e01094 (diff)
downloadop-kernel-dev-9cf1f6a8c4cbb7836b838b51b3b02ddf32c6c6a0.zip
op-kernel-dev-9cf1f6a8c4cbb7836b838b51b3b02ddf32c6c6a0.tar.gz
net: Move functions for configuring traffic classes out of inline headers
The functions for configuring the traffic class to queue mappings have other effects that need to be addressed. Instead of trying to export a bunch of new functions just relocate the functions so that we can instrument them directly with the functionality they will need. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h31
1 files changed, 3 insertions, 28 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 20ce8df..e05ab3b 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1920,34 +1920,9 @@ int netdev_set_prio_tc_map(struct net_device *dev, u8 prio, u8 tc)
return 0;
}
-static inline
-void netdev_reset_tc(struct net_device *dev)
-{
- dev->num_tc = 0;
- memset(dev->tc_to_txq, 0, sizeof(dev->tc_to_txq));
- memset(dev->prio_tc_map, 0, sizeof(dev->prio_tc_map));
-}
-
-static inline
-int netdev_set_tc_queue(struct net_device *dev, u8 tc, u16 count, u16 offset)
-{
- if (tc >= dev->num_tc)
- return -EINVAL;
-
- dev->tc_to_txq[tc].count = count;
- dev->tc_to_txq[tc].offset = offset;
- return 0;
-}
-
-static inline
-int netdev_set_num_tc(struct net_device *dev, u8 num_tc)
-{
- if (num_tc > TC_MAX_QUEUE)
- return -EINVAL;
-
- dev->num_tc = num_tc;
- return 0;
-}
+void netdev_reset_tc(struct net_device *dev);
+int netdev_set_tc_queue(struct net_device *dev, u8 tc, u16 count, u16 offset);
+int netdev_set_num_tc(struct net_device *dev, u8 num_tc);
static inline
int netdev_get_num_tc(struct net_device *dev)
OpenPOWER on IntegriCloud