[v2] common/sfc_efx/base: set return code in case of the error

Message ID 20230601063042.11253-1-artemii.morozov@arknetworks.am (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series [v2] common/sfc_efx/base: set return code in case of the error |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-testing warning Testing issues
ci/intel-Testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS

Commit Message

Artemii Morozov June 1, 2023, 6:30 a.m. UTC
  If the prefix for the rss hash was not chosen the
ENOTSUP error should be returned.

Signed-off-by: Artemii Morozov <artemii.morozov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
v2: don't use capital letters in email

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

Comments

Ferruh Yigit June 1, 2023, 3:48 p.m. UTC | #1
On 6/1/2023 7:30 AM, Artemii Morozov wrote:
> If the prefix for the rss hash was not chosen the
> ENOTSUP error should be returned.
> 
> Signed-off-by: Artemii Morozov <artemii.morozov@arknetworks.am>
> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
> ---
> 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++;

This is fixing return code of the function, right? Before update success
was returned at this point event it failed.

If so, can you please update commit log as fix commit and add proper
fixes tags?
  

Patch

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++;