net/ena: fix parsing of large LLQ header device argument
authorIgor Chauskin <igorch@amazon.com>
Tue, 11 May 2021 06:45:46 +0000 (08:45 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 11 May 2021 13:00:44 +0000 (15:00 +0200)
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>
drivers/net/ena/ena_ethdev.c

index 5b07365..53647cc 100644 (file)
@@ -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;