Skip to content

Commit

Permalink
net/ena: fix parsing of large LLQ header device argument
Browse files Browse the repository at this point in the history
[ upstream commit 9b312ad ]

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: 8a7a73f ("net/ena: support large LLQ headers")

Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
  • Loading branch information
Igor Chauskin authored and steevenlee committed Jun 8, 2021
1 parent 1c44277 commit a5c0cca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ena/ena_ethdev.c
Expand Up @@ -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;
Expand Down

0 comments on commit a5c0cca

Please sign in to comment.