Skip to content

Commit

Permalink
mlxsw: spectrum_qdisc: Pass extack to mlxsw_sp_qevent_entry_configure()
Browse files Browse the repository at this point in the history
This function will report a new failure in the following patches.
Pass extack so that the failure is explicable.

Signed-off-by: Petr Machata <[email protected]>
Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
pmachata authored and davem330 committed Oct 12, 2021
1 parent ff7f0e4 commit a34dda7
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1583,9 +1583,11 @@ static void mlxsw_sp_qevent_trap_deconfigure(struct mlxsw_sp *mlxsw_sp,
mlxsw_sp_qevent_span_deconfigure(mlxsw_sp, qevent_binding, mall_entry->trap.span_id);
}

static int mlxsw_sp_qevent_entry_configure(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_mall_entry *mall_entry,
struct mlxsw_sp_qevent_binding *qevent_binding)
static int
mlxsw_sp_qevent_entry_configure(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_mall_entry *mall_entry,
struct mlxsw_sp_qevent_binding *qevent_binding,
struct netlink_ext_ack *extack)
{
switch (mall_entry->type) {
case MLXSW_SP_MALL_ACTION_TYPE_MIRROR:
Expand Down Expand Up @@ -1614,15 +1616,17 @@ static void mlxsw_sp_qevent_entry_deconfigure(struct mlxsw_sp *mlxsw_sp,
}
}

static int mlxsw_sp_qevent_binding_configure(struct mlxsw_sp_qevent_block *qevent_block,
struct mlxsw_sp_qevent_binding *qevent_binding)
static int
mlxsw_sp_qevent_binding_configure(struct mlxsw_sp_qevent_block *qevent_block,
struct mlxsw_sp_qevent_binding *qevent_binding,
struct netlink_ext_ack *extack)
{
struct mlxsw_sp_mall_entry *mall_entry;
int err;

list_for_each_entry(mall_entry, &qevent_block->mall_entry_list, list) {
err = mlxsw_sp_qevent_entry_configure(qevent_block->mlxsw_sp, mall_entry,
qevent_binding);
qevent_binding, extack);
if (err)
goto err_entry_configure;
}
Expand All @@ -1646,13 +1650,17 @@ static void mlxsw_sp_qevent_binding_deconfigure(struct mlxsw_sp_qevent_block *qe
qevent_binding);
}

static int mlxsw_sp_qevent_block_configure(struct mlxsw_sp_qevent_block *qevent_block)
static int
mlxsw_sp_qevent_block_configure(struct mlxsw_sp_qevent_block *qevent_block,
struct netlink_ext_ack *extack)
{
struct mlxsw_sp_qevent_binding *qevent_binding;
int err;

list_for_each_entry(qevent_binding, &qevent_block->binding_list, list) {
err = mlxsw_sp_qevent_binding_configure(qevent_block, qevent_binding);
err = mlxsw_sp_qevent_binding_configure(qevent_block,
qevent_binding,
extack);
if (err)
goto err_binding_configure;
}
Expand Down Expand Up @@ -1737,7 +1745,7 @@ static int mlxsw_sp_qevent_mall_replace(struct mlxsw_sp *mlxsw_sp,

list_add_tail(&mall_entry->list, &qevent_block->mall_entry_list);

err = mlxsw_sp_qevent_block_configure(qevent_block);
err = mlxsw_sp_qevent_block_configure(qevent_block, f->common.extack);
if (err)
goto err_block_configure;

Expand Down Expand Up @@ -1911,7 +1919,8 @@ static int mlxsw_sp_setup_tc_block_qevent_bind(struct mlxsw_sp_port *mlxsw_sp_po
goto err_binding_create;
}

err = mlxsw_sp_qevent_binding_configure(qevent_block, qevent_binding);
err = mlxsw_sp_qevent_binding_configure(qevent_block, qevent_binding,
f->extack);
if (err)
goto err_binding_configure;

Expand Down

0 comments on commit a34dda7

Please sign in to comment.