net/mlx5: fix return value in Rx interrupts code
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Wed, 14 Jun 2017 11:49:16 +0000 (13:49 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 6 Jul 2017 13:00:56 +0000 (15:00 +0200)
A negative return value is documented for that function in case of error.

Fixes: 3c7d44af252a ("net/mlx5: support user space Rx interrupt event")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
drivers/net/mlx5/mlx5_rxq.c

index 4ed2d9d..43a7756 100644 (file)
@@ -1448,7 +1448,7 @@ mlx5_rx_intr_enable(struct rte_eth_dev *dev, uint16_t rx_queue_id)
        ret = ibv_req_notify_cq(cq, 0);
        if (ret)
                WARN("unable to arm interrupt on rx queue %d", rx_queue_id);
-       return ret;
+       return -ret;
 }
 
 /**