FAILED: patch "[PATCH] net/mlx5e: Fix matchall police parameters validation" failed to apply to 5.18-stable tree
[email protected]
maintainerThe patch below does not apply to the 5.18-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 4d1e07d83ccc87f210e5b852b0a5ea812a2f191c Mon Sep 17 00:00:00 2001
From: Vlad Buslov <[email protected]>
Date: Mon, 4 Jul 2022 22:44:05 +0200
Subject: [PATCH] net/mlx5e: Fix matchall police parameters validation
Referenced commit prepared the code for upcoming extension that allows mlx5 to offload police action attached to flower classifier. However, with regard to existing matchall classifier offload validation should be reversed as FLOW_ACTION_CONTINUE is the only supported notexceed police action type. Fix the problem by allowing FLOW_ACTION_CONTINUE for police action and extend scan_tc_matchall_fdb_actions() to only allow such actions with matchall classifier.
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +6 -7
@@ -4529,13 +4529,6 @@ static int mlx5e_policer_validate(const struct flow_action *action,return -EOPNOTSUPP ; } -if (act->police.notexceed.act_id !=FLOW_ACTION_PIPE && - act->police.notexceed.act_id !=FLOW_ACTION_ACCEPT ) { -NL_SET_ERR_MSG_MOD (extack, -"Offload not supported when conform action is not pipe or ok" ); -return -EOPNOTSUPP ; - } -if (act->police.notexceed.act_id ==FLOW_ACTION_ACCEPT && !flow_action_is_last_entry (action, act)) { NL_SET_ERR_MSG_MOD(extack,
@@ -4586,6 +4579,12 @@ static int scan_tc_matchall_fdb_actions(struct mlx5e_priv *priv,flow_action_for_each (i, act, flow_action) {switch (act->id) {case FLOW_ACTION_POLICE : +if (act->police.notexceed.act_id !=FLOW_ACTION_CONTINUE ) { +NL_SET_ERR_MSG_MOD (extack, +"Offload not supported when conform action is not continue" ); +return -EOPNOTSUPP ; + } + err =mlx5e_policer_validate (flow_action, act, extack);if (err)return err;