patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/bnxt: fix to not overwrite error message
@ 2019-12-21  2:42 Ajit Khaparde
  2019-12-21  2:51 ` [dpdk-stable] [dpdk-dev] " Ajit Khaparde
  0 siblings, 1 reply; 2+ messages in thread
From: Ajit Khaparde @ 2019-12-21  2:42 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, stable, Lance Richardson

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 <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 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 707aedcec..cde1fa41c 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -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)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/bnxt: fix to not overwrite error message
  2019-12-21  2:42 [dpdk-stable] [PATCH] net/bnxt: fix to not overwrite error message Ajit Khaparde
@ 2019-12-21  2:51 ` Ajit Khaparde
  0 siblings, 0 replies; 2+ messages in thread
From: Ajit Khaparde @ 2019-12-21  2:51 UTC (permalink / raw)
  To: dpdk-dev; +Cc: Ferruh Yigit, dpdk stable, Lance Richardson

On Fri, Dec 20, 2019 at 6:42 PM Ajit Khaparde <ajit.khaparde@broadcom.com>
wrote:

> 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 <ajit.khaparde@broadcom.com>
> Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
>
Patch applied to dpdk-next-net-brcm


> ---
>  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 707aedcec..cde1fa41c 100644
> --- a/drivers/net/bnxt/bnxt_flow.c
> +++ b/drivers/net/bnxt/bnxt_flow.c
> @@ -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)
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-21  2:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-21  2:42 [dpdk-stable] [PATCH] net/bnxt: fix to not overwrite error message Ajit Khaparde
2019-12-21  2:51 ` [dpdk-stable] [dpdk-dev] " Ajit Khaparde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).