Skip to content

Commit d7cb1e3

Browse files
jpirkodavem330
authored andcommitted
flow_offload: introduce "disabled" HW stats type and allow it in mlxsw
Introduce new type for disabled HW stats and allow the value in mlxsw offload. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f16e7f6 commit d7cb1e3

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
3636
err = mlxsw_sp_acl_rulei_act_count(mlxsw_sp, rulei, extack);
3737
if (err)
3838
return err;
39-
} else {
39+
} else if (act->hw_stats_type != FLOW_ACTION_HW_STATS_TYPE_DISABLED) {
4040
NL_SET_ERR_MSG_MOD(extack, "Unsupported action HW stats type");
4141
return -EOPNOTSUPP;
4242
}

‎include/net/flow_offload.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ enum flow_action_mangle_base {
159159
#define FLOW_ACTION_HW_STATS_TYPE_DELAYED BIT(1)
160160
#define FLOW_ACTION_HW_STATS_TYPE_ANY (FLOW_ACTION_HW_STATS_TYPE_IMMEDIATE | \
161161
FLOW_ACTION_HW_STATS_TYPE_DELAYED)
162+
#define FLOW_ACTION_HW_STATS_TYPE_DISABLED 0
162163

163164
typedef void (*action_destr)(void *priv);
164165

0 commit comments

Comments
 (0)