DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix RSS queue types validation
@ 2020-11-18  9:24 Dekel Peled
  2020-11-18 15:34 ` Raslan Darawsheh
  0 siblings, 1 reply; 3+ messages in thread
From: Dekel Peled @ 2020-11-18  9:24 UTC (permalink / raw)
  To: viacheslavo, shahafs, matan; +Cc: 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 <dekelp@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Jack Min <jackmin@nvidia.com>
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix RSS queue types validation
  2020-11-18  9:24 [dpdk-dev] [PATCH] net/mlx5: fix RSS queue types validation Dekel Peled
@ 2020-11-18 15:34 ` Raslan Darawsheh
  2020-11-20 11:24   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Raslan Darawsheh @ 2020-11-18 15:34 UTC (permalink / raw)
  To: Dekel Peled, Slava Ovsiienko, Shahaf Shuler, Matan Azrad; +Cc: dev

Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Dekel Peled
> Sent: Wednesday, November 18, 2020 11:24 AM
> To: Slava Ovsiienko <viacheslavo@nvidia.com>; Shahaf Shuler
> <shahafs@nvidia.com>; Matan Azrad <matan@nvidia.com>
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix RSS queue types validation
> 
> 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 <dekelp@nvidia.com>
> Acked-by: Ori Kam <orika@nvidia.com>
> Acked-by: Jack Min <jackmin@nvidia.com>
> ---

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix RSS queue types validation
  2020-11-18 15:34 ` Raslan Darawsheh
@ 2020-11-20 11:24   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2020-11-20 11:24 UTC (permalink / raw)
  To: Raslan Darawsheh, Dekel Peled, Slava Ovsiienko, Shahaf Shuler,
	Matan Azrad
  Cc: dev

On 11/18/2020 3:34 PM, Raslan Darawsheh wrote:
> Hi,
> 
>> -----Original Message-----
>> From: dev <dev-bounces@dpdk.org> On Behalf Of Dekel Peled
>> Sent: Wednesday, November 18, 2020 11:24 AM
>> To: Slava Ovsiienko <viacheslavo@nvidia.com>; Shahaf Shuler
>> <shahafs@nvidia.com>; Matan Azrad <matan@nvidia.com>
>> Cc: dev@dpdk.org
>> Subject: [dpdk-dev] [PATCH] net/mlx5: fix RSS queue types validation
>>
>> 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 <dekelp@nvidia.com>
>> Acked-by: Ori Kam <orika@nvidia.com>
>> Acked-by: Jack Min <jackmin@nvidia.com>
>> ---
> 
> Patch applied to next-net-mlx,
> 

Squashed into relevant commit in next-net, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18  9:24 [dpdk-dev] [PATCH] net/mlx5: fix RSS queue types validation Dekel Peled
2020-11-18 15:34 ` Raslan Darawsheh
2020-11-20 11:24   ` Ferruh Yigit

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox