From: Greg Kroah-Hartman Date: Sat, 14 Jan 2023 14:08:02 +0000 (+0100) Subject: 5.15-stable patches X-Git-Tag: v4.14.303~71 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=26facd4ba4ef5acc122a5c9d561a6c44a676afa4;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: net-mlx5e-set-action-fwd-flag-when-parsing-tc-action-goto.patch --- diff --git a/queue-5.15/net-mlx5e-set-action-fwd-flag-when-parsing-tc-action-goto.patch b/queue-5.15/net-mlx5e-set-action-fwd-flag-when-parsing-tc-action-goto.patch new file mode 100644 index 00000000000..daab26c2cf7 --- /dev/null +++ b/queue-5.15/net-mlx5e-set-action-fwd-flag-when-parsing-tc-action-goto.patch @@ -0,0 +1,95 @@ +From 7f8770c71646cf93abdf3fea8b7733aaec4c82a3 Mon Sep 17 00:00:00 2001 +From: Roi Dayan +Date: Wed, 11 Aug 2021 14:09:07 +0300 +Subject: net/mlx5e: Set action fwd flag when parsing tc action goto + +From: Roi Dayan + +commit 7f8770c71646cf93abdf3fea8b7733aaec4c82a3 upstream. + +Do it when parsing like in other actions instead of when +checking if goto is supported in current scenario. + +Signed-off-by: Roi Dayan +Reviewed-by: Maor Dickman +Signed-off-by: Saeed Mahameed +Cc: dann frazier +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 43 ++++++++++-------------- + 1 file changed, 18 insertions(+), 25 deletions(-) + +--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c ++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +@@ -3597,7 +3597,8 @@ static int parse_tc_nic_actions(struct m + if (err) + return err; + +- action |= MLX5_FLOW_CONTEXT_ACTION_COUNT; ++ action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST | ++ MLX5_FLOW_CONTEXT_ACTION_COUNT; + attr->dest_chain = act->chain_index; + break; + case FLOW_ACTION_CT: +@@ -3632,12 +3633,9 @@ static int parse_tc_nic_actions(struct m + + attr->action = action; + +- if (attr->dest_chain) { +- if (attr->action & MLX5_FLOW_CONTEXT_ACTION_FWD_DEST) { +- NL_SET_ERR_MSG(extack, "Mirroring goto chain rules isn't supported"); +- return -EOPNOTSUPP; +- } +- attr->action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST; ++ if (attr->dest_chain && parse_attr->mirred_ifindex[0]) { ++ NL_SET_ERR_MSG(extack, "Mirroring goto chain rules isn't supported"); ++ return -EOPNOTSUPP; + } + + if (attr->action & MLX5_FLOW_CONTEXT_ACTION_MOD_HDR) +@@ -4146,7 +4144,8 @@ static int parse_tc_fdb_actions(struct m + if (err) + return err; + +- action |= MLX5_FLOW_CONTEXT_ACTION_COUNT; ++ action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST | ++ MLX5_FLOW_CONTEXT_ACTION_COUNT; + attr->dest_chain = act->chain_index; + break; + case FLOW_ACTION_CT: +@@ -4218,24 +4217,18 @@ static int parse_tc_fdb_actions(struct m + if (!actions_match_supported(priv, flow_action, parse_attr, flow, extack)) + return -EOPNOTSUPP; + +- if (attr->dest_chain) { +- if (decap) { +- /* It can be supported if we'll create a mapping for +- * the tunnel device only (without tunnel), and set +- * this tunnel id with this decap flow. +- * +- * On restore (miss), we'll just set this saved tunnel +- * device. +- */ +- +- NL_SET_ERR_MSG(extack, +- "Decap with goto isn't supported"); +- netdev_warn(priv->netdev, +- "Decap with goto isn't supported"); +- return -EOPNOTSUPP; +- } ++ if (attr->dest_chain && decap) { ++ /* It can be supported if we'll create a mapping for ++ * the tunnel device only (without tunnel), and set ++ * this tunnel id with this decap flow. ++ * ++ * On restore (miss), we'll just set this saved tunnel ++ * device. ++ */ + +- attr->action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST; ++ NL_SET_ERR_MSG(extack, "Decap with goto isn't supported"); ++ netdev_warn(priv->netdev, "Decap with goto isn't supported"); ++ return -EOPNOTSUPP; + } + + if (esw_attr->split_count > 0 && !mlx5_esw_has_fwd_fdb(priv->mdev)) { diff --git a/queue-5.15/series b/queue-5.15/series index d12b63bd891..b0af4542ee1 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -15,3 +15,4 @@ s390-cpum_sf-add-read_once-semantics-to-compare-and-swap-loops.patch s390-percpu-add-read_once-to-arch_this_cpu_to_op_simple.patch drm-virtio-fix-gem-handle-creation-uaf.patch drm-i915-gt-reset-twice.patch +net-mlx5e-set-action-fwd-flag-when-parsing-tc-action-goto.patch