net/bnxt: fix to not overwrite error message
PATCH 1/1 net/bnxt: fix to not overwrite 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")
Signed-off-by Ajit Khaparde <[email protected]>
Reviewed-by Lance Richardson <[email protected]>
--- drivers/net/bnxt/bnxt_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/bnxt/bnxt_flow.c +2 -2
@@ -1485,7 +1485,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,if (rxq && !vnic->rx_queue_cnt) rxq->vnic = &bp->vnic_info[0 ]; } -return rc; +return -rte_errno; } static
@@ -1815,7 +1815,7 @@ bnxt_flow_create(struct rte_eth_dev *dev,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.");
Signature · 1 line
2.21.0 (Apple Git-122.2)
Quoted 9 lines · Ajit Khaparde
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")Signed-off-by Ajit Khaparde <[email protected]>Reviewed-by Lance Richardson <[email protected]>
Patch applied to dpdk-next-net-brcm
Quoted 31 lines
--- drivers/net/bnxt/bnxt_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/bnxt/bnxt_flow.c +2
-2@@ -1485,7 +1485,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,if (rxq && !vnic->rx_queue_cnt) rxq->vnic = &bp->vnic_info[0 ]; } -return rc; +return -rte_errno; } static@@ -1815,7 +1815,7 @@ bnxt_flow_create(struct rte_eth_dev *dev, 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.21.0 (Apple Git-122.2)