提交 d60d7ed4 编写于 作者: J Jiri Pirko 提交者: David S. Miller

flow_offload: introduce "immediate" HW stats type and allow it in mlxsw

Introduce new type for immediate HW stats and allow the value in
mlxsw offload.
Signed-off-by: NJiri Pirko <jiri@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c4afd0c8
......@@ -30,7 +30,8 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
return -EOPNOTSUPP;
act = flow_action_first_entry_get(flow_action);
if (act->hw_stats_type == FLOW_ACTION_HW_STATS_TYPE_ANY) {
if (act->hw_stats_type == FLOW_ACTION_HW_STATS_TYPE_ANY ||
act->hw_stats_type == FLOW_ACTION_HW_STATS_TYPE_IMMEDIATE) {
/* Count action is inserted first */
err = mlxsw_sp_acl_rulei_act_count(mlxsw_sp, rulei, extack);
if (err)
......
......@@ -155,7 +155,8 @@ enum flow_action_mangle_base {
FLOW_ACT_MANGLE_HDR_TYPE_UDP,
};
#define FLOW_ACTION_HW_STATS_TYPE_ANY 0
#define FLOW_ACTION_HW_STATS_TYPE_IMMEDIATE BIT(0)
#define FLOW_ACTION_HW_STATS_TYPE_ANY FLOW_ACTION_HW_STATS_TYPE_IMMEDIATE
typedef void (*action_destr)(void *priv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册