diff mbox series

[v4,11/19] net/ena: fix parsing of large LLQ header devarg

Message ID 20210511064554.10656-12-mk@semihalf.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series net/ena: update ENA PMD to v2.3.0 | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Michal Krawczyk May 11, 2021, 6:45 a.m. UTC
From: Igor Chauskin <igorch@amazon.com>

The code incorrectly checked the return value of comparison when parsing
the argument key name. The return value of strcmp should be compared
to 0 to identify a match.

Fixes: 8a7a73f26cc9 ("net/ena: support large LLQ headers")
Cc: stable@dpdk.org

Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
---
v4:
* Add release notes.
* Fix commit heading style.

 doc/guides/rel_notes/release_21_05.rst | 1 +
 drivers/net/ena/ena_ethdev.c           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Thomas Monjalon May 12, 2021, 5:48 p.m. UTC | #1
11/05/2021 08:45, Michal Krawczyk:
> From: Igor Chauskin <igorch@amazon.com>
> --- a/doc/guides/rel_notes/release_21_05.rst
> +++ b/doc/guides/rel_notes/release_21_05.rst
> @@ -209,6 +209,7 @@ New Features
>  
>    * Changed memcpy mapping to the dpdk-optimized version.
>    * Updated ena_com (HAL) to the latest version.
> +  * Fixed bugs when requesting large LLQ headers using the devargs.

Until now, we don't mention fixed bugs in the "New Features"
of the release notes.
I'll drop this one and the next one for consistency.
diff mbox series

Patch

diff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst
index 6e4fcde1bc..755d5fcd32 100644
--- a/doc/guides/rel_notes/release_21_05.rst
+++ b/doc/guides/rel_notes/release_21_05.rst
@@ -209,6 +209,7 @@  New Features
 
   * Changed memcpy mapping to the dpdk-optimized version.
   * Updated ena_com (HAL) to the latest version.
+  * Fixed bugs when requesting large LLQ headers using the devargs.
 
 * **Added support of multiple data-units in cryptodev API.**
 
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 3c9102cd19..cb8ad5c3d0 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2865,7 +2865,7 @@  static int ena_process_bool_devarg(const char *key,
 	}
 
 	/* Now, assign it to the proper adapter field. */
-	if (strcmp(key, ENA_DEVARG_LARGE_LLQ_HDR))
+	if (strcmp(key, ENA_DEVARG_LARGE_LLQ_HDR) == 0)
 		adapter->use_large_llq_hdr = bool_value;
 
 	return 0;