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 68F8742D22; Thu, 22 Jun 2023 11:13:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FF1440EE1; Thu, 22 Jun 2023 11:13:07 +0200 (CEST) Received: from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80]) by mails.dpdk.org (Postfix) with ESMTP id 90F1A406B8 for ; Thu, 22 Jun 2023 11:13:04 +0200 (CEST) Received: from angrod.. (unknown [141.136.90.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by agw.arknetworks.am (Postfix) with ESMTPSA id 0FCE1E01C7; Thu, 22 Jun 2023 13:13:03 +0400 (+04) From: Artemii Morozov To: dev@dpdk.org Cc: Ferruh Yigit , Andrew Rybchenko , Andy Moreton Subject: [PATCH v3] common/sfc_efx/base: set return code in case of the error Date: Thu, 22 Jun 2023 13:13:01 +0400 Message-Id: <20230622091301.251330-1-artemii.morozov@arknetworks.am> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230531070810.93131-1-artemii.morozov@arknetworks.am> References: <20230531070810.93131-1-artemii.morozov@arknetworks.am> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org If the prefix for the rss hash was not chosen the ENOTSUP error should be returned. Before this patch the zero code was returned in case of an error. Fixes: f784cdc5cbb1 ("common/sfc_efx/base: provide control to deliver RSS hash") Signed-off-by: Artemii Morozov Reviewed-by: Andy Moreton --- 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