From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D9CB4A0032 for ; Fri, 18 Feb 2022 13:42:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D491940141; Fri, 18 Feb 2022 13:42:52 +0100 (CET) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mails.dpdk.org (Postfix) with ESMTP id 0D37A41151 for ; Fri, 18 Feb 2022 13:42:52 +0100 (CET) Received: by mail-wr1-f45.google.com with SMTP id d27so14381352wrc.6 for ; Fri, 18 Feb 2022 04:42:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S6Bcu0rJbMhYNBA7pHPWKoHcyqU2ipVln8ci0DjeZ4A=; b=XyDKMo8A0x6AqqhWI+QX4Wd1aCDsFWoXDvhJQ9fVPNFjaXY2PZwsBkezYAP+00bpD9 OlMM2Urk4SRChKoQpXYVcNgHqsLpnncfXMhe1JfCoOMYOiEJ08nPd7q8T3J1c/Vn3LD/ SVxiF0sAaaWfAI+VfcG/papL8MVYmB7Y7PQhzNwGet+q9DK/nHHqoEtCY0xRItKg9QWe n2aysFkVrJFixqK57sEsILLd+PnbR63I9WbOnGmccWNAnFmMSMfss5pKfD7GWvjezMT9 96cesPRHh8Yc02SaSJsBJ0kXhQ+1XSUpgCaysY8hdj5cIJSTSycE34/N/L4utqvrCRKa N+FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=S6Bcu0rJbMhYNBA7pHPWKoHcyqU2ipVln8ci0DjeZ4A=; b=jvgDKKspj13zFNcUNoEjmns/3/hC4uyHMid0SnUaFiDwwzPIpe1jXivw6KdK8iJBnU RkzkuQCMKFYUIRuCFEKkE304iOpeb7ISYZSEBLolCi/dgfmjuvIKCSjT5qYLb9S/yVpn NclGq/ZkTaTSEpSOWzHS3O+mpqf++EiY3uUhj0DRcXmeNptQJwKviSGFis6ipsAn8VrS LqUICrXPy5tB6y5tstG3ClJTGpmcBWQ6r1YwaS//lyiok9M7pKy3niUdW1vlWjQKnEY8 Gk77feKlWXijtKqIK1tVdTqt2ekfUyEs/CltOE7YRZI/7xVMDRx+fk+BwH0X29QuVk9L n3ag== X-Gm-Message-State: AOAM532XlXS/oqMLlikgr8U7BVxERdrkEZK0JJAm2WL6+ZLkzqVZqyQW GOiVG5frsqk59AUGs5XFrxsIUNiTlpRGkakf X-Google-Smtp-Source: ABdhPJx7o5DCDt6RKRtxYzve4QEPzHMO+rgcYXCGLmbtDCMIg6S/vLA4/vNrH+12vS8x6VSQEuzBVA== X-Received: by 2002:adf:d082:0:b0:1e3:16e2:d611 with SMTP id y2-20020adfd082000000b001e316e2d611mr6171985wrh.716.1645188171674; Fri, 18 Feb 2022 04:42:51 -0800 (PST) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id e3sm35037795wrr.94.2022.02.18.04.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:42:51 -0800 (PST) From: luca.boccassi@gmail.com To: Raja Zidane Cc: Matan Azrad , dpdk stable Subject: patch 'net/mlx5: fix mark enabling for Rx' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:38:34 +0000 Message-Id: <20220218123931.1749595-65-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/20/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/a133cd9add74162b2efc09169b910f863a41a6c1 Thanks. Luca Boccassi --- >From a133cd9add74162b2efc09169b910f863a41a6c1 Mon Sep 17 00:00:00 2001 From: Raja Zidane Date: Sun, 16 Jan 2022 15:23:47 +0000 Subject: [PATCH] net/mlx5: fix mark enabling for Rx [ upstream commit 082becbf1f35bda03a9ad80fcd7fe4afe3aea7be ] To optimize datapath, the mlx5 pmd checked for mark action on flow creation, and flagged possible destination rxqs (through queue/RSS actions), then it enabled the mark action logic only for flagged rxqs. Mark action didn't work if no queue/rss action was in the same flow, even when the user use multi-group logic to manage the flows. So, if mark action is performed in group X and the packet is moved to group Y > X when the packet is forwarded to Rx queues, SW did not get the mark ID to the mbuf. Flag Rx datapath to report mark action for any queue when the driver detects the first mark action after dev_start operation. Fixes: 8e61555657b2 ("net/mlx5: fix shared RSS and mark actions combination") Signed-off-by: Raja Zidane Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_flow.c | 54 ++++++++++++++++-------------- drivers/net/mlx5/mlx5_flow.h | 2 +- drivers/net/mlx5/mlx5_flow_dv.c | 6 ++-- drivers/net/mlx5/mlx5_flow_verbs.c | 4 +-- drivers/net/mlx5/mlx5_rxtx.h | 1 - 6 files changed, 36 insertions(+), 32 deletions(-) diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index a4880d01d9..93d9ad5e64 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -947,6 +947,7 @@ struct mlx5_priv { unsigned int mtr_reg_share:1; /* Whether support meter REG_C share. */ unsigned int sampler_en:1; /* Whether support sampler. */ unsigned int lb_used:1; /* Loopback queue is referred to. */ + uint32_t mark_enabled:1; /* If mark action is enabled on rxqs. */ uint16_t domain_id; /* Switch domain identifier. */ uint16_t vport_id; /* Associated VF vport index (if any). */ uint32_t vport_meta_tag; /* Used for vport index match ove VF LAG. */ diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 080731ca04..69f57605f8 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1171,7 +1171,6 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev, struct mlx5_flow_handle *dev_handle) { struct mlx5_priv *priv = dev->data->dev_private; - const int mark = dev_handle->mark; const int tunnel = !!(dev_handle->layers & MLX5_FLOW_LAYER_TUNNEL); struct mlx5_ind_table_obj *ind_tbl = NULL; unsigned int i; @@ -1205,15 +1204,6 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev, * this must be always enabled (metadata may arive * from other port - not from local flows only. */ - if (priv->config.dv_flow_en && - priv->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY && - mlx5_flow_ext_mreg_supported(dev)) { - rxq_ctrl->rxq.mark = 1; - rxq_ctrl->flow_mark_n = 1; - } else if (mark) { - rxq_ctrl->rxq.mark = 1; - rxq_ctrl->flow_mark_n++; - } if (tunnel) { unsigned int j; @@ -1231,6 +1221,20 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev, } } +static void +flow_rxq_mark_flag_set(struct rte_eth_dev *dev) +{ + struct mlx5_priv *priv = dev->data->dev_private; + struct mlx5_rxq_ctrl *rxq_ctrl; + + if (priv->mark_enabled) + return; + LIST_FOREACH(rxq_ctrl, &priv->rxqsctrl, next) { + rxq_ctrl->rxq.mark = 1; + } + priv->mark_enabled = 1; +} + /** * Set the Rx queue flags (Mark/Flag and Tunnel Ptypes) for a flow * @@ -1245,7 +1249,11 @@ flow_rxq_flags_set(struct rte_eth_dev *dev, struct rte_flow *flow) struct mlx5_priv *priv = dev->data->dev_private; uint32_t handle_idx; struct mlx5_flow_handle *dev_handle; + struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace(); + MLX5_ASSERT(wks); + if (wks->mark) + flow_rxq_mark_flag_set(dev); SILIST_FOREACH(priv->sh->ipool[MLX5_IPOOL_MLX5_FLOW], flow->dev_handles, handle_idx, dev_handle, next) flow_drv_rxq_flags_set(dev, dev_handle); @@ -1265,7 +1273,6 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev, struct mlx5_flow_handle *dev_handle) { struct mlx5_priv *priv = dev->data->dev_private; - const int mark = dev_handle->mark; const int tunnel = !!(dev_handle->layers & MLX5_FLOW_LAYER_TUNNEL); struct mlx5_ind_table_obj *ind_tbl = NULL; unsigned int i; @@ -1295,15 +1302,6 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev, container_of((*priv->rxqs)[idx], struct mlx5_rxq_ctrl, rxq); - if (priv->config.dv_flow_en && - priv->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY && - mlx5_flow_ext_mreg_supported(dev)) { - rxq_ctrl->rxq.mark = 1; - rxq_ctrl->flow_mark_n = 1; - } else if (mark) { - rxq_ctrl->flow_mark_n--; - rxq_ctrl->rxq.mark = !!rxq_ctrl->flow_mark_n; - } if (tunnel) { unsigned int j; @@ -1362,12 +1360,12 @@ flow_rxq_flags_clear(struct rte_eth_dev *dev) continue; rxq_ctrl = container_of((*priv->rxqs)[i], struct mlx5_rxq_ctrl, rxq); - rxq_ctrl->flow_mark_n = 0; rxq_ctrl->rxq.mark = 0; for (j = 0; j != MLX5_FLOW_TUNNEL; ++j) rxq_ctrl->flow_tunnels_n[j] = 0; rxq_ctrl->rxq.tunnel = 0; } + priv->mark_enabled = 0; } /** @@ -4272,6 +4270,7 @@ flow_create_split_inner(struct rte_eth_dev *dev, struct rte_flow_error *error) { struct mlx5_flow *dev_flow; + struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace(); dev_flow = flow_drv_prepare(dev, flow, attr, items, actions, flow_split_info->flow_idx, error); @@ -4290,8 +4289,10 @@ flow_create_split_inner(struct rte_eth_dev *dev, */ if (flow_split_info->prefix_layers) dev_flow->handle->layers = flow_split_info->prefix_layers; - if (flow_split_info->prefix_mark) - dev_flow->handle->mark = 1; + if (flow_split_info->prefix_mark) { + MLX5_ASSERT(wks); + wks->mark = 1; + } if (sub_flow) *sub_flow = dev_flow; return flow_drv_translate(dev, dev_flow, attr, items, actions, error); @@ -5091,6 +5092,7 @@ flow_create_split_meter(struct rte_eth_dev *dev, struct mlx5_flow_split_info *flow_split_info, struct rte_flow_error *error) { + struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace(); struct mlx5_priv *priv = dev->data->dev_private; struct rte_flow_action *sfx_actions = NULL; struct rte_flow_action *pre_actions = NULL; @@ -5146,7 +5148,7 @@ flow_create_split_meter(struct rte_eth_dev *dev, MLX5_FLOW_TABLE_LEVEL_SUFFIX; flow_split_info->prefix_layers = flow_get_prefix_layer_flags(dev_flow); - flow_split_info->prefix_mark |= dev_flow->handle->mark; + flow_split_info->prefix_mark |= wks->mark; } /* Add the prefix subflow. */ ret = flow_create_split_metadata(dev, flow, @@ -5212,6 +5214,7 @@ flow_create_split_sample(struct rte_eth_dev *dev, struct mlx5_flow_tbl_data_entry *sfx_tbl_data; struct mlx5_flow_tbl_resource *sfx_tbl; union mlx5_flow_tbl_key sfx_table_key; + struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace(); #endif size_t act_size; size_t item_size; @@ -5277,7 +5280,8 @@ flow_create_split_sample(struct rte_eth_dev *dev, sfx_table_key.table_id; flow_split_info->prefix_layers = flow_get_prefix_layer_flags(dev_flow); - flow_split_info->prefix_mark |= dev_flow->handle->mark; + MLX5_ASSERT(wks); + flow_split_info->prefix_mark |= wks->mark; /* Suffix group level already be scaled with factor, set * skip_scale to 1 to avoid scale again in translation. */ diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index ed5f94a9a0..fb11ae6b40 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -632,7 +632,6 @@ struct mlx5_flow_handle { /**< Bit-fields of present layers, see MLX5_FLOW_LAYER_*. */ void *drv_flow; /**< pointer to driver flow object. */ uint32_t split_flow_id:28; /**< Sub flow unique match flow id. */ - uint32_t mark:1; /**< Metadata rxq mark flag. */ uint32_t fate_action:3; /**< Fate action type. */ union { uint32_t rix_hrxq; /**< Hash Rx queue object index. */ @@ -1123,6 +1122,7 @@ struct mlx5_flow_workspace { struct mlx5_flow_rss_desc rss_desc; uint32_t rssq_num; /* Allocated queue num in rss_desc. */ uint32_t flow_idx; /* Intermediate device flow index. */ + uint32_t mark:1; /* Indicates if flow contains mark action. */ }; struct mlx5_flow_split_info { diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index c134e24c0e..977072ba32 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9200,7 +9200,7 @@ flow_dv_translate_action_sample(struct rte_eth_dev *dev, (((const struct rte_flow_action_mark *) (sub_actions->conf))->id); - dev_flow->handle->mark = 1; + wks->mark = 1; pre_rix = dev_flow->handle->dvh.rix_tag; /* Save the mark resource before sample */ pre_r = dev_flow->dv.tag_resource; @@ -9889,7 +9889,7 @@ flow_dv_translate(struct rte_eth_dev *dev, break; case RTE_FLOW_ACTION_TYPE_FLAG: action_flags |= MLX5_FLOW_ACTION_FLAG; - dev_flow->handle->mark = 1; + wks->mark = 1; if (dev_conf->dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) { struct rte_flow_action_mark mark = { .id = MLX5_FLOW_MARK_DEFAULT, @@ -9918,7 +9918,7 @@ flow_dv_translate(struct rte_eth_dev *dev, break; case RTE_FLOW_ACTION_TYPE_MARK: action_flags |= MLX5_FLOW_ACTION_MARK; - dev_flow->handle->mark = 1; + wks->mark = 1; if (dev_conf->dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) { const struct rte_flow_action_mark *mark = (const struct rte_flow_action_mark *) diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c index 9c2fc1b25e..fa7ba129fd 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c @@ -1736,12 +1736,12 @@ flow_verbs_translate(struct rte_eth_dev *dev, case RTE_FLOW_ACTION_TYPE_FLAG: flow_verbs_translate_action_flag(dev_flow, actions); action_flags |= MLX5_FLOW_ACTION_FLAG; - dev_flow->handle->mark = 1; + wks->mark = 1; break; case RTE_FLOW_ACTION_TYPE_MARK: flow_verbs_translate_action_mark(dev_flow, actions); action_flags |= MLX5_FLOW_ACTION_MARK; - dev_flow->handle->mark = 1; + wks->mark = 1; break; case RTE_FLOW_ACTION_TYPE_DROP: flow_verbs_translate_action_drop(dev_flow, actions); diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h index 630ab1d989..7157233e45 100644 --- a/drivers/net/mlx5/mlx5_rxtx.h +++ b/drivers/net/mlx5/mlx5_rxtx.h @@ -189,7 +189,6 @@ struct mlx5_rxq_ctrl { enum mlx5_rxq_type type; /* Rxq type. */ unsigned int socket; /* CPU socket ID for allocations. */ unsigned int irq:1; /* Whether IRQ is enabled. */ - uint32_t flow_mark_n; /* Number of Mark/Flag flows using this Queue. */ uint32_t flow_tunnels_n[MLX5_FLOW_TUNNEL]; /* Tunnels counters. */ uint32_t wqn; /* WQ number. */ uint16_t dump_file_n; /* Number of dump files. */ -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:40.467434797 +0000 +++ 0065-net-mlx5-fix-mark-enabling-for-Rx.patch 2022-02-18 12:37:37.726792724 +0000 @@ -1 +1 @@ -From 082becbf1f35bda03a9ad80fcd7fe4afe3aea7be Mon Sep 17 00:00:00 2001 +From a133cd9add74162b2efc09169b910f863a41a6c1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 082becbf1f35bda03a9ad80fcd7fe4afe3aea7be ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ - drivers/net/mlx5/mlx5_flow.c | 53 ++++++++++++++++-------------- + drivers/net/mlx5/mlx5_flow.c | 54 ++++++++++++++++-------------- @@ -28 +29 @@ - drivers/net/mlx5/mlx5_flow_dv.c | 14 +++++--- + drivers/net/mlx5/mlx5_flow_dv.c | 6 ++-- @@ -30,2 +31,2 @@ - drivers/net/mlx5/mlx5_rx.h | 1 - - 6 files changed, 41 insertions(+), 34 deletions(-) + drivers/net/mlx5/mlx5_rxtx.h | 1 - + 6 files changed, 36 insertions(+), 32 deletions(-) @@ -34 +35 @@ -index 9413e3397c..737ad6895c 100644 +index a4880d01d9..93d9ad5e64 100644 @@ -37,2 +38 @@ -@@ -1413,6 +1413,7 @@ struct mlx5_priv { - unsigned int mtr_en:1; /* Whether support meter. */ +@@ -947,6 +947,7 @@ struct mlx5_priv { @@ -39,0 +40 @@ + unsigned int sampler_en:1; /* Whether support sampler. */ @@ -46 +47 @@ -index 2cadf615ec..d7cb1eb89b 100644 +index 080731ca04..69f57605f8 100644 @@ -49 +50 @@ -@@ -1234,7 +1234,6 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev, +@@ -1171,7 +1171,6 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev, @@ -57 +58 @@ -@@ -1269,15 +1268,6 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev, +@@ -1205,15 +1204,6 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev, @@ -73 +74 @@ -@@ -1295,6 +1285,20 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev, +@@ -1231,6 +1221,20 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev, @@ -94 +95 @@ -@@ -1309,7 +1313,11 @@ flow_rxq_flags_set(struct rte_eth_dev *dev, struct rte_flow *flow) +@@ -1245,7 +1249,11 @@ flow_rxq_flags_set(struct rte_eth_dev *dev, struct rte_flow *flow) @@ -106 +107 @@ -@@ -1329,7 +1337,6 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev, +@@ -1265,7 +1273,6 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev, @@ -114,4 +115,4 @@ -@@ -1360,15 +1367,6 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev, - MLX5_ASSERT(rxq_ctrl != NULL); - if (rxq_ctrl == NULL) - continue; +@@ -1295,15 +1302,6 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev, + container_of((*priv->rxqs)[idx], + struct mlx5_rxq_ctrl, rxq); + @@ -130,3 +131 @@ -@@ -1425,12 +1423,12 @@ flow_rxq_flags_clear(struct rte_eth_dev *dev) - - if (rxq == NULL || rxq->ctrl == NULL) +@@ -1362,12 +1360,12 @@ flow_rxq_flags_clear(struct rte_eth_dev *dev) @@ -134,2 +133,4 @@ -- rxq->ctrl->flow_mark_n = 0; - rxq->ctrl->rxq.mark = 0; + rxq_ctrl = container_of((*priv->rxqs)[i], + struct mlx5_rxq_ctrl, rxq); +- rxq_ctrl->flow_mark_n = 0; + rxq_ctrl->rxq.mark = 0; @@ -137,2 +138,2 @@ - rxq->ctrl->flow_tunnels_n[j] = 0; - rxq->ctrl->rxq.tunnel = 0; + rxq_ctrl->flow_tunnels_n[j] = 0; + rxq_ctrl->rxq.tunnel = 0; @@ -144 +145 @@ -@@ -4811,6 +4809,7 @@ flow_create_split_inner(struct rte_eth_dev *dev, +@@ -4272,6 +4270,7 @@ flow_create_split_inner(struct rte_eth_dev *dev, @@ -152 +153 @@ -@@ -4829,8 +4828,10 @@ flow_create_split_inner(struct rte_eth_dev *dev, +@@ -4290,8 +4289,10 @@ flow_create_split_inner(struct rte_eth_dev *dev, @@ -164,3 +165,11 @@ - #ifdef HAVE_IBV_FLOW_DV_SUPPORT -@@ -6143,7 +6144,7 @@ flow_create_split_meter(struct rte_eth_dev *dev, - MLX5_FLOW_TABLE_LEVEL_METER; + return flow_drv_translate(dev, dev_flow, attr, items, actions, error); +@@ -5091,6 +5092,7 @@ flow_create_split_meter(struct rte_eth_dev *dev, + struct mlx5_flow_split_info *flow_split_info, + struct rte_flow_error *error) + { ++ struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace(); + struct mlx5_priv *priv = dev->data->dev_private; + struct rte_flow_action *sfx_actions = NULL; + struct rte_flow_action *pre_actions = NULL; +@@ -5146,7 +5148,7 @@ flow_create_split_meter(struct rte_eth_dev *dev, + MLX5_FLOW_TABLE_LEVEL_SUFFIX; @@ -171 +179,0 @@ - flow_split_info->table_id = MLX5_MTR_TABLE_ID_SUFFIX; @@ -174,2 +182,2 @@ -@@ -6209,6 +6210,7 @@ flow_create_split_sample(struct rte_eth_dev *dev, - struct mlx5_flow_dv_sample_resource *sample_res; + ret = flow_create_split_metadata(dev, flow, +@@ -5212,6 +5214,7 @@ flow_create_split_sample(struct rte_eth_dev *dev, @@ -177,0 +186 @@ + union mlx5_flow_tbl_key sfx_table_key; @@ -182,2 +191,2 @@ -@@ -6295,7 +6297,8 @@ flow_create_split_sample(struct rte_eth_dev *dev, - } +@@ -5277,7 +5280,8 @@ flow_create_split_sample(struct rte_eth_dev *dev, + sfx_table_key.table_id; @@ -190,2 +199,2 @@ - * MLX5_SCALE_FLOW_GROUP_BIT of skip_scale to 1 to avoid scale - * again in translation. + * skip_scale to 1 to avoid scale again in translation. + */ @@ -193 +202 @@ -index 125d85899c..7fec79afb3 100644 +index ed5f94a9a0..fb11ae6b40 100644 @@ -196 +205,2 @@ -@@ -697,7 +697,6 @@ struct mlx5_flow_handle { +@@ -632,7 +632,6 @@ struct mlx5_flow_handle { + /**< Bit-fields of present layers, see MLX5_FLOW_LAYER_*. */ @@ -198,2 +208 @@ - uint32_t split_flow_id:27; /**< Sub flow unique match flow id. */ - uint32_t is_meter_flow_id:1; /**< Indicate if flow_id is for meter. */ + uint32_t split_flow_id:28; /**< Sub flow unique match flow id. */ @@ -202 +210,0 @@ - uint32_t flex_item; /**< referenced Flex Item bitmask. */ @@ -204,4 +212,5 @@ -@@ -1108,6 +1107,7 @@ struct mlx5_flow_workspace { - /* The final policy when meter policy is hierarchy. */ - uint32_t skip_matcher_reg:1; - /* Indicates if need to skip matcher register in translate. */ + uint32_t rix_hrxq; /**< Hash Rx queue object index. */ +@@ -1123,6 +1122,7 @@ struct mlx5_flow_workspace { + struct mlx5_flow_rss_desc rss_desc; + uint32_t rssq_num; /* Allocated queue num in rss_desc. */ + uint32_t flow_idx; /* Intermediate device flow index. */ @@ -213 +222 @@ -index 0383976883..18992b1e26 100644 +index c134e24c0e..977072ba32 100644 @@ -216 +225 @@ -@@ -11646,7 +11646,7 @@ flow_dv_translate_action_sample(struct rte_eth_dev *dev, +@@ -9200,7 +9200,7 @@ flow_dv_translate_action_sample(struct rte_eth_dev *dev, @@ -225 +234 @@ -@@ -12806,7 +12806,7 @@ flow_dv_translate(struct rte_eth_dev *dev, +@@ -9889,7 +9889,7 @@ flow_dv_translate(struct rte_eth_dev *dev, @@ -234 +243 @@ -@@ -12835,7 +12835,7 @@ flow_dv_translate(struct rte_eth_dev *dev, +@@ -9918,7 +9918,7 @@ flow_dv_translate(struct rte_eth_dev *dev, @@ -243,38 +251,0 @@ -@@ -15403,7 +15403,9 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev, - (MLX5_MAX_MODIFY_NUM + 1)]; - } mhdr_dummy; - struct mlx5_flow_dv_modify_hdr_resource *mhdr_res = &mhdr_dummy.res; -+ struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace(); - -+ MLX5_ASSERT(wks); - egress = (domain == MLX5_MTR_DOMAIN_EGRESS) ? 1 : 0; - transfer = (domain == MLX5_MTR_DOMAIN_TRANSFER) ? 1 : 0; - memset(&dh, 0, sizeof(struct mlx5_flow_handle)); -@@ -15441,7 +15443,7 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev, - NULL, - "cannot create policy " - "mark action for this color"); -- dev_flow.handle->mark = 1; -+ wks->mark = 1; - if (flow_dv_tag_resource_register(dev, tag_be, - &dev_flow, &flow_err)) - return -rte_mtr_error_set(error, -@@ -16866,7 +16868,9 @@ __flow_dv_meter_get_rss_sub_policy(struct rte_eth_dev *dev, - struct mlx5_meter_policy_action_container *act_cnt; - uint32_t domain = MLX5_MTR_DOMAIN_INGRESS; - uint16_t sub_policy_num; -+ struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace(); - -+ MLX5_ASSERT(wks); - rte_spinlock_lock(&mtr_policy->sl); - for (i = 0; i < MLX5_MTR_RTE_COLORS; i++) { - if (!rss_desc[i]) -@@ -16940,7 +16944,7 @@ __flow_dv_meter_get_rss_sub_policy(struct rte_eth_dev *dev, - if (act_cnt->rix_mark || act_cnt->modify_hdr) { - memset(&dh, 0, sizeof(struct mlx5_flow_handle)); - if (act_cnt->rix_mark) -- dh.mark = 1; -+ wks->mark = 1; - dh.fate_action = MLX5_FLOW_FATE_QUEUE; - dh.rix_hrxq = hrxq_idx[i]; - flow_drv_rxq_flags_set(dev, &dh); @@ -282 +253 @@ -index 192a00d4fd..90ccb9aaff 100644 +index 9c2fc1b25e..fa7ba129fd 100644 @@ -285 +256 @@ -@@ -1693,12 +1693,12 @@ flow_verbs_translate(struct rte_eth_dev *dev, +@@ -1736,12 +1736,12 @@ flow_verbs_translate(struct rte_eth_dev *dev, @@ -300,7 +271,7 @@ -diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h -index c178f9a24b..cb5d51340d 100644 ---- a/drivers/net/mlx5/mlx5_rx.h -+++ b/drivers/net/mlx5/mlx5_rx.h -@@ -161,7 +161,6 @@ struct mlx5_rxq_ctrl { - uint16_t share_qid; /* Shared RxQ ID in group. */ - unsigned int started:1; /* Whether (shared) RXQ has been started. */ +diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h +index 630ab1d989..7157233e45 100644 +--- a/drivers/net/mlx5/mlx5_rxtx.h ++++ b/drivers/net/mlx5/mlx5_rxtx.h +@@ -189,7 +189,6 @@ struct mlx5_rxq_ctrl { + enum mlx5_rxq_type type; /* Rxq type. */ + unsigned int socket; /* CPU socket ID for allocations. */ @@ -311 +282 @@ - uint32_t rxseg_n; /* Number of split segment descriptions. */ + uint16_t dump_file_n; /* Number of dump files. */