summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-08-07 10:15:17 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-07 09:42:35 -0700
commit2572ac53c46f58e500b9d8d0f99785666038c590 (patch)
treead615f1fdda541358540a2d1dd5a385fc39332bc /include
parent1afec92be0d7b516a79f4c548a81d17460c8ba73 (diff)
downloadlinux-2572ac53c46f58e500b9d8d0f99785666038c590.tar.gz
linux-2572ac53c46f58e500b9d8d0f99785666038c590.tar.bz2
linux-2572ac53c46f58e500b9d8d0f99785666038c590.zip
net: sched: make type an argument for ndo_setup_tc
Since the type is always present, push it to be a separate argument to ndo_setup_tc. On the way, name the type enum and use it for arg type. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 3a3cdc1b1f31..e4238e540544 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -774,7 +774,7 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
/* These structures hold the attributes of qdisc and classifiers
* that are being passed to the netdevice through the setup_tc op.
*/
-enum {
+enum tc_setup_type {
TC_SETUP_MQPRIO,
TC_SETUP_CLSU32,
TC_SETUP_CLSFLOWER,
@@ -785,7 +785,6 @@ enum {
struct tc_cls_u32_offload;
struct tc_to_netdev {
- unsigned int type;
union {
struct tc_cls_u32_offload *cls_u32;
struct tc_cls_flower_offload *cls_flower;
@@ -978,8 +977,9 @@ struct xfrmdev_ops {
* with PF and querying it may introduce a theoretical security risk.
* int (*ndo_set_vf_rss_query_en)(struct net_device *dev, int vf, bool setting);
* int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb);
- * int (*ndo_setup_tc)(struct net_device *dev, u32 handle, u32 chain_index,
- * __be16 protocol, struct tc_to_netdev *tc);
+ * int (*ndo_setup_tc)(struct net_device *dev, enum tc_setup_type type,
+ * u32 handle, u32 chain_index, __be16 protocol,
+ * struct tc_to_netdev *tc);
* Called to setup any 'tc' scheduler, classifier or action on @dev.
* This is always called from the stack with the rtnl lock held and netif
* tx queues stopped. This allows the netdevice to perform queue
@@ -1227,6 +1227,7 @@ struct net_device_ops {
struct net_device *dev,
int vf, bool setting);
int (*ndo_setup_tc)(struct net_device *dev,
+ enum tc_setup_type type,
u32 handle, u32 chain_index,
__be16 protocol,
struct tc_to_netdev *tc);