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 8F1E9A0A02 for ; Thu, 14 Jan 2021 08:24:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 819E2140FA4; Thu, 14 Jan 2021 08:24:58 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 8ED70140F96 for ; Thu, 14 Jan 2021 08:24:54 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from jiaweiw@nvidia.com) with SMTP; 14 Jan 2021 09:24:48 +0200 Received: from nvidia.com (gen-l-vrt-281.mtl.labs.mlnx [10.237.44.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 10E7OmcW001294; Thu, 14 Jan 2021 09:24:48 +0200 From: Jiawei Wang To: ferruh.yigit@intel.com, viacheslavo@nvidia.com, matan@nvidia.com, orika@nvidia.com Cc: dev@dpdk.org, rasland@nvidia.com, stable@dpdk.org Date: Thu, 14 Jan 2021 09:24:46 +0200 Message-Id: <1610609088-204833-3-git-send-email-jiaweiw@nvidia.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1610609088-204833-1-git-send-email-jiaweiw@nvidia.com> References: <1610445689-389472-1-git-send-email-jiaweiw@nvidia.com> <1610609088-204833-1-git-send-email-jiaweiw@nvidia.com> Subject: [dpdk-stable] [PATCH v3 2/4] net/mlx5: fix the unnecessary checking for RSS action 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 Sender: "stable" RSS action is valid only in NIC-RX domain, this fix bypass the function that getting RSS action from the flow action list under no NIC-RX domain. Fixes: e745f90 ("net/mlx5: optimize flow RSS struct") Cc: stable@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 2a4073c..0670447 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -5278,7 +5278,7 @@ struct mlx5_hlist_entry * struct mlx5_priv *priv = dev->data->dev_private; struct rte_flow *flow = NULL; struct mlx5_flow *dev_flow; - const struct rte_flow_action_rss *rss; + const struct rte_flow_action_rss *rss = NULL; struct mlx5_translated_shared_action shared_actions[MLX5_MAX_SHARED_ACTIONS]; int shared_actions_n = MLX5_MAX_SHARED_ACTIONS; @@ -5356,7 +5356,9 @@ struct mlx5_hlist_entry * MLX5_ASSERT(flow->drv_type > MLX5_FLOW_TYPE_MIN && flow->drv_type < MLX5_FLOW_TYPE_MAX); memset(rss_desc, 0, offsetof(struct mlx5_flow_rss_desc, queue)); - rss = flow_get_rss_action(p_actions_rx); + /* RSS Action only works on NIC RX domain */ + if (attr->ingress && !attr->transfer) + rss = flow_get_rss_action(p_actions_rx); if (rss) { if (flow_rss_workspace_adjust(wks, rss_desc, rss->queue_num)) return 0; -- 1.8.3.1