[12/15] net/ena: fix invalid return value check
Checks
Commit Message
From: Shai Brandes <shaibran@amazon.com>
Removed the sign inversion for when checking if
ena_com_set_host_attributes returns ENA_COM_UNSUPPORTED.
ENA_COM_UNSUPPORTED is defined as -EOPNOTSUPP, so the extra sign
inversion is wrong.
Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")
Cc: stable@dpdk.org
Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
doc/guides/rel_notes/release_24_07.rst | 1 +
drivers/net/ena/ena_ethdev.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
Comments
On 7/2/2024 3:46 PM, shaibran@amazon.com wrote:
> From: Shai Brandes <shaibran@amazon.com>
>
> Removed the sign inversion for when checking if
> ena_com_set_host_attributes returns ENA_COM_UNSUPPORTED.
> ENA_COM_UNSUPPORTED is defined as -EOPNOTSUPP, so the extra sign
> inversion is wrong.
>
> Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")
> Cc: stable@dpdk.org
>
> Signed-off-by: Shai Brandes <shaibran@amazon.com>
> ---
> doc/guides/rel_notes/release_24_07.rst | 1 +
> drivers/net/ena/ena_ethdev.c | 4 ++--
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst
> index f000dec54b..24bb91ad46 100644
> --- a/doc/guides/rel_notes/release_24_07.rst
> +++ b/doc/guides/rel_notes/release_24_07.rst
> @@ -79,6 +79,7 @@ New Features
> * Reworked the device uninitialization flow to ensure complete resource
> cleanup and lay the groundwork for hot-unplug support.
> * Removed an obsolete workaround for a false L4 bad Rx checksum indication.
> + * Fixed an invalid return value check.
>
Dropped this release notes update while merging, as it looks not
significant enough for the release notes.
@@ -79,6 +79,7 @@ New Features
* Reworked the device uninitialization flow to ensure complete resource
cleanup and lay the groundwork for hot-unplug support.
* Removed an obsolete workaround for a false L4 bad Rx checksum indication.
+ * Fixed an invalid return value check.
* **Update Tap PMD driver.**
@@ -812,7 +812,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
rc = ena_com_set_host_attributes(ena_dev);
if (rc) {
- if (rc == -ENA_COM_UNSUPPORTED)
+ if (rc == ENA_COM_UNSUPPORTED)
PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
else
PMD_DRV_LOG(ERR, "Cannot set host attributes\n");
@@ -856,7 +856,7 @@ static void ena_config_debug_area(struct ena_adapter *adapter)
rc = ena_com_set_host_attributes(&adapter->ena_dev);
if (rc) {
- if (rc == -ENA_COM_UNSUPPORTED)
+ if (rc == ENA_COM_UNSUPPORTED)
PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
else
PMD_DRV_LOG(ERR, "Cannot set host attributes\n");