Skip to content

Commit

Permalink
Merge branch 'Fixes-for-unlocked-cls-hardware-offload-API-refactoring'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Aug 30, 2019
2 parents de8e1be + daa664a commit fd0f75d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/mellanox/mlx5/core/en_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions net/sched/cls_matchall.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit fd0f75d

Please sign in to comment.