Commit 48855479 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

flow_offload: introduce "delayed" HW stats type and allow it in mlx5



Introduce new type for delayed HW stats and allow the value in
mlx5 offload.

Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d60d7ed4
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2878,7 +2878,8 @@ static int parse_tc_nic_actions(struct mlx5e_priv *priv,
	if (!flow_action_has_entries(flow_action))
		return -EINVAL;

	if (!flow_action_basic_hw_stats_types_check(flow_action, extack))
	if (!flow_action_hw_stats_types_check(flow_action, extack,
					      FLOW_ACTION_HW_STATS_TYPE_DELAYED))
		return -EOPNOTSUPP;

	attr->flow_tag = MLX5_FS_DEFAULT_FLOW_TAG;
@@ -3333,7 +3334,8 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
	if (!flow_action_has_entries(flow_action))
		return -EINVAL;

	if (!flow_action_basic_hw_stats_types_check(flow_action, extack))
	if (!flow_action_hw_stats_types_check(flow_action, extack,
					      FLOW_ACTION_HW_STATS_TYPE_DELAYED))
		return -EOPNOTSUPP;

	flow_action_for_each(i, act, flow_action) {
+3 −1
Original line number Diff line number Diff line
@@ -156,7 +156,9 @@ enum flow_action_mangle_base {
};

#define FLOW_ACTION_HW_STATS_TYPE_IMMEDIATE BIT(0)
#define FLOW_ACTION_HW_STATS_TYPE_ANY FLOW_ACTION_HW_STATS_TYPE_IMMEDIATE
#define FLOW_ACTION_HW_STATS_TYPE_DELAYED BIT(1)
#define FLOW_ACTION_HW_STATS_TYPE_ANY (FLOW_ACTION_HW_STATS_TYPE_IMMEDIATE | \
				       FLOW_ACTION_HW_STATS_TYPE_DELAYED)

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