From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8CA39A04E6; Wed, 18 Nov 2020 10:25:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2C60A58C4; Wed, 18 Nov 2020 10:25:00 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 1759A4C90 for ; Wed, 18 Nov 2020 10:24:58 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@nvidia.com) with SMTP; 18 Nov 2020 11:24:55 +0200 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.228.134.250]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0AI9OtGN026039; Wed, 18 Nov 2020 11:24:55 +0200 From: Dekel Peled To: viacheslavo@nvidia.com, shahafs@nvidia.com, matan@nvidia.com Cc: dev@dpdk.org Date: Wed, 18 Nov 2020 11:24:11 +0200 Message-Id: <8e069ae0fd8b042051a81ee1227ac50e7d841200.1605691382.git.dekelp@nvidia.com> X-Mailer: git-send-email 1.7.1 Subject: [dpdk-dev] [PATCH] net/mlx5: fix RSS queue types validation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Recent patch fixed the RSS action validation, making sure hairpin queues and standard queues are not used together in the same RSS action. The variable used for comparison was declared and initialized within the check loop, making the queue type comparison wrong. This patch moves the variable declaration to the start of the function, outside of the check loop. Fixes: cb8a079aee5d ("net/mlx5: fix validate RSS queues types") Signed-off-by: Dekel Peled Acked-by: Ori Kam Acked-by: Jack Min --- drivers/net/mlx5/mlx5_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 33dbbd9eef..236610c8fc 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1411,6 +1411,7 @@ mlx5_validate_action_rss(struct rte_eth_dev *dev, { struct mlx5_priv *priv = dev->data->dev_private; const struct rte_flow_action_rss *rss = action->conf; + enum mlx5_rxq_type rxq_type = MLX5_RXQ_TYPE_UNDEFINED; unsigned int i; if (rss->func != RTE_ETH_HASH_FUNCTION_DEFAULT && @@ -1476,7 +1477,6 @@ mlx5_validate_action_rss(struct rte_eth_dev *dev, RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL, "No queues configured"); for (i = 0; i != rss->queue_num; ++i) { - enum mlx5_rxq_type rxq_type = MLX5_RXQ_TYPE_UNDEFINED; struct mlx5_rxq_ctrl *rxq_ctrl; if (rss->queue[i] >= priv->rxqs_n) -- 2.25.1