From 88d57889c9f8034e5075a299e4300a862da6449a Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Fri, 20 Dec 2019 18:42:18 -0800 Subject: [PATCH] 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 --- drivers/net/bnxt/bnxt_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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."); -- 2.20.1