DPDK patches and discussions
 help / color / mirror / Atom feed
From: Artemii Morozov <artemii.morozov@arknetworks.am>
To: dev@dpdk.org
Cc: Ferruh Yigit <ferruh.yigit@amd.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	stable@dpdk.org, Andy Moreton <amoreton@xilinx.com>
Subject: [PATCH v5] common/sfc_efx/base: fix Rx queue creation without RSS hash prefix
Date: Thu, 22 Jun 2023 16:31:36 +0400	[thread overview]
Message-ID: <20230622123136.264482-1-artemii.morozov@arknetworks.am> (raw)
In-Reply-To: <20230531070810.93131-1-artemii.morozov@arknetworks.am>

If the prefix for the RSS hash was not chosen the ENOTSUP error should
be returned.

Before this patch success was returned for this case causing Rx queue
creation to fail.

Fixing return value to indicate failure.

Fixes: f784cdc5cbb1 ("common/sfc_efx/base: provide control to deliver RSS hash")
Cc: stable@dpdk.org

Signed-off-by: Artemii Morozov <artemii.morozov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
v5: update commit message

v4: add Cc: stable@dpdk.org and transform rss to RSS
  
v3: update commit log as fix commit

v2: don't use capital letters in email

 drivers/common/sfc_efx/base/efx_rx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/common/sfc_efx/base/efx_rx.c b/drivers/common/sfc_efx/base/efx_rx.c
index 68f42f5cac..61726a9f0b 100644
--- a/drivers/common/sfc_efx/base/efx_rx.c
+++ b/drivers/common/sfc_efx/base/efx_rx.c
@@ -937,8 +937,10 @@ efx_rx_qcreate_internal(
 
 		rss_hash_field =
 		    &erplp->erpl_fields[EFX_RX_PREFIX_FIELD_RSS_HASH];
-		if (rss_hash_field->erpfi_width_bits == 0)
+		if (rss_hash_field->erpfi_width_bits == 0) {
+			rc = ENOTSUP;
 			goto fail5;
+		}
 	}
 
 	enp->en_rx_qcount++;
-- 
2.34.1


  parent reply	other threads:[~2023-06-22 12:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31  7:08 [PATCH] common/sfc_efx/base: set return code in case of the error Artemii Morozov
2023-06-01  6:30 ` [PATCH v2] " Artemii Morozov
2023-06-01 15:48   ` Ferruh Yigit
2023-06-22  9:13 ` [PATCH v3] " Artemii Morozov
2023-06-22  9:25   ` Andrew Rybchenko
2023-06-22  9:31 ` [PATCH v4] " Artemii Morozov
2023-06-22 11:27   ` Ferruh Yigit
2023-06-22 12:31 ` Artemii Morozov [this message]
2023-06-22 13:13   ` [PATCH v5] common/sfc_efx/base: fix Rx queue creation without RSS hash prefix Ferruh Yigit
2023-06-22 13:52     ` Artemii Morozov
2023-06-22 15:06   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230622123136.264482-1-artemii.morozov@arknetworks.am \
    --to=artemii.morozov@arknetworks.am \
    --cc=amoreton@xilinx.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).