eventdev: fix error log in eth Rx adapter
authorNikhil Rao <nikhil.rao@intel.com>
Thu, 29 Nov 2018 08:00:17 +0000 (13:30 +0530)
committerJerin Jacob <jerinj@marvell.com>
Sun, 16 Dec 2018 16:22:14 +0000 (17:22 +0100)
strerror() input parameter should be > 0.

Coverity issue: 302864
Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_eventdev/rte_event_eth_rx_adapter.c

index 8831bc3..8d178be 100644 (file)
@@ -912,7 +912,7 @@ rxa_intr_ring_enqueue(struct rte_event_eth_rx_adapter *rx_adapter,
                 */
                if (err)
                        RTE_EDEV_LOG_ERR("Failed to enqueue interrupt"
-                               " to ring: %s", strerror(err));
+                               " to ring: %s", strerror(-err));
                else
                        rte_eth_dev_rx_intr_disable(port_id, queue);
        }