net: sched: get rid of struct tc_to_netdev
Get rid of struct tc_to_netdev which is now just unnecessary container and rather pass per-type structures down to drivers directly. Along with that, consolidate the naming of per-type structure variables in cls_*. 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>
This commit is contained in:
committed by
David S. Miller
parent
38cf0426e5
commit
de4784ca03
@@ -771,9 +771,6 @@ static inline bool netdev_phys_item_id_same(struct netdev_phys_item_id *a,
|
||||
typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
|
||||
struct sk_buff *skb);
|
||||
|
||||
/* These structures hold the attributes of qdisc and classifiers
|
||||
* that are being passed to the netdevice through the setup_tc op.
|
||||
*/
|
||||
enum tc_setup_type {
|
||||
TC_SETUP_MQPRIO,
|
||||
TC_SETUP_CLSU32,
|
||||
@@ -782,18 +779,6 @@ enum tc_setup_type {
|
||||
TC_SETUP_CLSBPF,
|
||||
};
|
||||
|
||||
struct tc_cls_u32_offload;
|
||||
|
||||
struct tc_to_netdev {
|
||||
union {
|
||||
struct tc_cls_u32_offload *cls_u32;
|
||||
struct tc_cls_flower_offload *cls_flower;
|
||||
struct tc_cls_matchall_offload *cls_mall;
|
||||
struct tc_cls_bpf_offload *cls_bpf;
|
||||
struct tc_mqprio_qopt *mqprio;
|
||||
};
|
||||
};
|
||||
|
||||
/* These structures hold the attributes of xdp state that are being passed
|
||||
* to the netdevice through the xdp op.
|
||||
*/
|
||||
@@ -977,7 +962,7 @@ struct xfrmdev_ops {
|
||||
* 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, enum tc_setup_type type,
|
||||
* struct tc_to_netdev *tc);
|
||||
* void *type_data);
|
||||
* 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
|
||||
@@ -1226,7 +1211,7 @@ struct net_device_ops {
|
||||
int vf, bool setting);
|
||||
int (*ndo_setup_tc)(struct net_device *dev,
|
||||
enum tc_setup_type type,
|
||||
struct tc_to_netdev *tc);
|
||||
void *type_data);
|
||||
#if IS_ENABLED(CONFIG_FCOE)
|
||||
int (*ndo_fcoe_enable)(struct net_device *dev);
|
||||
int (*ndo_fcoe_disable)(struct net_device *dev);
|
||||
|
||||
Reference in New Issue
Block a user