From: Ciara Power Date: Tue, 4 Feb 2020 16:00:06 +0000 (+0000) Subject: examples/ioat: fix failure check for ioat dequeue X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=579fb0b2c33a0946f37d120c4e3837a0a3817a7d examples/ioat: fix failure check for ioat dequeue The nb_dq return value from the ioat dequeue is negative in failure cases, however the variable was an unsigned int, causing the condition where nb_dq <= 0 to never be true. This is now cast to a signed int, which will successfully reflect the -1 value to be used in this conditional check. Coverity issue: 350342 Coverity issue: 350349 Fixes: 92c981637ffc ("examples/ioat: handle failure case for ioat dequeue") Cc: stable@dpdk.org Signed-off-by: Ciara Power Acked-by: Bruce Richardson --- diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c index b39a098ec0..8a6076828d 100644 --- a/examples/ioat/ioatfwd.c +++ b/examples/ioat/ioatfwd.c @@ -460,7 +460,7 @@ ioat_tx_port(struct rxtx_port_config *tx_config) MAX_PKT_BURST, NULL); } - if (nb_dq <= 0) + if ((int32_t) nb_dq <= 0) return; if (copy_mode == COPY_MODE_IOAT_NUM)