From: Ajit Khaparde Date: Sat, 21 Dec 2019 02:42:18 +0000 (-0800) Subject: net/bnxt: fix overwriting error message X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=88d57889c9f8034e5075a299e4300a862da6449a;p=dpdk.git net/bnxt: fix overwriting error message In some cases when flow creation fails, we overwrite the specific error message with a generic error message. This patch fixes it. Fixes: d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde Reviewed-by: Lance Richardson --- diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index 707aedcec7..cde1fa41c4 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -1485,7 +1485,7 @@ ret: if (rxq && !vnic->rx_queue_cnt) rxq->vnic = &bp->vnic_info[0]; } - return rc; + return -rte_errno; } static @@ -1815,7 +1815,7 @@ free_flow: rte_flow_error_set(error, 0, RTE_FLOW_ERROR_TYPE_NONE, NULL, "Flow with pattern exists, updating destination queue"); - else + else if (!rte_errno) rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_HANDLE, NULL, "Failed to create flow.");