eventdev/eth_rx: fix telemetry Rx stats reset
authorDavid Marchand <david.marchand@redhat.com>
Thu, 24 Mar 2022 15:28:30 +0000 (16:28 +0100)
committerJerin Jacob <jerinj@marvell.com>
Tue, 17 May 2022 14:42:23 +0000 (16:42 +0200)
commitb450a990b07e008077377a6dfa45a562b3f9a496
tree078cc2e26a5e94cb26d5020fbccd60d189fc4eb0
parentfe45ccd20552f03fa62843e44d37cf6e2bf639b5
eventdev/eth_rx: fix telemetry Rx stats reset

Caught by covscan:

1. dpdk-21.11/lib/eventdev/rte_event_eth_rx_adapter.c:3279:
logical_vs_bitwise: "~(*__ctype_b_loc()[(int)*params] & 2048 /*
(unsigned short)_ISdigit */)" is always 1/true regardless of the values
of its operand. This occurs as the logical second operand of "||".
2. dpdk-21.11/lib/eventdev/rte_event_eth_rx_adapter.c:3279: remediation:
Did you intend to use "!" rather than "~"?

While isdigit return value should be compared as an int to 0,
prefer ! since all of this file uses this convention.

Fixes: 814d01709328 ("eventdev/eth_rx: support telemetry")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
lib/eventdev/rte_event_eth_rx_adapter.c