Commit 064f3902 authored by David S. Miller's avatar David S. Miller

Merge branch 'sched-couple-of-ndo_setup_tc-fixes-and-adjustments'

Jiri Pirko says:

====================
net: sched: couple of ndo_setup_tc fixes and adjustments

This patchset includes couple of patches that fix or adjust default
cases and return values in ndo_setup_tc implementations in drivers.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 0ef8b456 246ab6f0
...@@ -1544,22 +1544,16 @@ void bnxt_tc_flow_stats_work(struct bnxt *bp) ...@@ -1544,22 +1544,16 @@ void bnxt_tc_flow_stats_work(struct bnxt *bp)
int bnxt_tc_setup_flower(struct bnxt *bp, u16 src_fid, int bnxt_tc_setup_flower(struct bnxt *bp, u16 src_fid,
struct tc_cls_flower_offload *cls_flower) struct tc_cls_flower_offload *cls_flower)
{ {
int rc = 0;
switch (cls_flower->command) { switch (cls_flower->command) {
case TC_CLSFLOWER_REPLACE: case TC_CLSFLOWER_REPLACE:
rc = bnxt_tc_add_flow(bp, src_fid, cls_flower); return bnxt_tc_add_flow(bp, src_fid, cls_flower);
break;
case TC_CLSFLOWER_DESTROY: case TC_CLSFLOWER_DESTROY:
rc = bnxt_tc_del_flow(bp, cls_flower); return bnxt_tc_del_flow(bp, cls_flower);
break;
case TC_CLSFLOWER_STATS: case TC_CLSFLOWER_STATS:
rc = bnxt_tc_get_flow_stats(bp, cls_flower); return bnxt_tc_get_flow_stats(bp, cls_flower);
break; default:
return -EOPNOTSUPP;
} }
return rc;
} }
static const struct rhashtable_params bnxt_tc_flow_ht_params = { static const struct rhashtable_params bnxt_tc_flow_ht_params = {
......
...@@ -7522,7 +7522,7 @@ static int i40e_setup_tc_cls_flower(struct i40e_netdev_priv *np, ...@@ -7522,7 +7522,7 @@ static int i40e_setup_tc_cls_flower(struct i40e_netdev_priv *np,
case TC_CLSFLOWER_STATS: case TC_CLSFLOWER_STATS:
return -EOPNOTSUPP; return -EOPNOTSUPP;
default: default:
return -EINVAL; return -EOPNOTSUPP;
} }
} }
......
...@@ -2884,7 +2884,7 @@ static int i40evf_setup_tc_cls_flower(struct i40evf_adapter *adapter, ...@@ -2884,7 +2884,7 @@ static int i40evf_setup_tc_cls_flower(struct i40evf_adapter *adapter,
case TC_CLSFLOWER_STATS: case TC_CLSFLOWER_STATS:
return -EOPNOTSUPP; return -EOPNOTSUPP;
default: default:
return -EINVAL; return -EOPNOTSUPP;
} }
} }
......
...@@ -2698,7 +2698,7 @@ static int igb_setup_tc_cls_flower(struct igb_adapter *adapter, ...@@ -2698,7 +2698,7 @@ static int igb_setup_tc_cls_flower(struct igb_adapter *adapter,
case TC_CLSFLOWER_STATS: case TC_CLSFLOWER_STATS:
return -EOPNOTSUPP; return -EOPNOTSUPP;
default: default:
return -EINVAL; return -EOPNOTSUPP;
} }
} }
......
...@@ -576,9 +576,9 @@ nfp_flower_repr_offload(struct nfp_app *app, struct net_device *netdev, ...@@ -576,9 +576,9 @@ nfp_flower_repr_offload(struct nfp_app *app, struct net_device *netdev,
return nfp_flower_del_offload(app, netdev, flower, egress); return nfp_flower_del_offload(app, netdev, flower, egress);
case TC_CLSFLOWER_STATS: case TC_CLSFLOWER_STATS:
return nfp_flower_get_stats(app, netdev, flower, egress); return nfp_flower_get_stats(app, netdev, flower, egress);
} default:
return -EOPNOTSUPP; return -EOPNOTSUPP;
}
} }
int nfp_flower_setup_tc_egress_cb(enum tc_setup_type type, void *type_data, int nfp_flower_setup_tc_egress_cb(enum tc_setup_type type, void *type_data,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment