diff options
author | David S. Miller <davem@davemloft.net> | 2019-08-31 01:12:05 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-31 01:12:05 +0300 |
commit | fd0f75d28da24349fdccee905cf4c32202d4d1a7 (patch) | |
tree | a4bb61e31a1cd2a8d2bf3dff653ef474634abdfe | |
parent | de8e1beb191912f94bcab46e72f247daaf664d15 (diff) | |
parent | daa664a5cdd599583fceb9018c49d783bc5a0d5d (diff) | |
download | linux-fd0f75d28da24349fdccee905cf4c32202d4d1a7.tar.xz |
Merge branch 'Fixes-for-unlocked-cls-hardware-offload-API-refactoring'
Vlad Buslov says:
====================
Fixes for unlocked cls hardware offload API refactoring
Two fixes for my "Refactor cls hardware offload API to support
rtnl-independent drivers" series.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 | ||||
-rw-r--r-- | net/sched/cls_matchall.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 9ff28e2d72cd..dadadf221087 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -3497,16 +3497,18 @@ static int mlx5e_setup_tc(struct net_device *dev, enum tc_setup_type type, void *type_data) { struct mlx5e_priv *priv = netdev_priv(dev); - struct flow_block_offload *f = type_data; switch (type) { #ifdef CONFIG_MLX5_ESWITCH - case TC_SETUP_BLOCK: + case TC_SETUP_BLOCK: { + struct flow_block_offload *f = type_data; + f->unlocked_driver_cb = true; return flow_block_cb_setup_simple(type_data, &mlx5e_block_cb_list, mlx5e_setup_tc_block_cb, priv, priv, true); + } #endif case TC_SETUP_QDISC_MQPRIO: return mlx5e_setup_tc_mqprio(priv, type_data); diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c index 3266f25011cc..7fc2eb62aa98 100644 --- a/net/sched/cls_matchall.c +++ b/net/sched/cls_matchall.c @@ -111,6 +111,7 @@ static int mall_replace_hw_filter(struct tcf_proto *tp, err = tc_setup_cb_add(block, tp, TC_SETUP_CLSMATCHALL, &cls_mall, skip_sw, &head->flags, &head->in_hw_count, true); + tc_cleanup_flow_action(&cls_mall.rule->action); kfree(cls_mall.rule); if (err) { @@ -313,6 +314,7 @@ static int mall_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb, err = tc_setup_cb_reoffload(block, tp, add, cb, TC_SETUP_CLSMATCHALL, &cls_mall, cb_priv, &head->flags, &head->in_hw_count); + tc_cleanup_flow_action(&cls_mall.rule->action); kfree(cls_mall.rule); if (err) |