patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [dpdk-dev] [PATCH] net/bnxt: fix to not bring link down during reset recovery
@ 2020-09-22  5:34 Somnath Kotur
  2020-09-23  4:28 ` Ajit Khaparde
  0 siblings, 1 reply; 2+ messages in thread
From: Somnath Kotur @ 2020-09-22  5:34 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Kalesh AP, stable, Somnath Kotur

From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

Driver should not send the phy_cfg request to bring link down
during reset recovery. If the driver sends the phy_cfg request
in recovery process, then FW needs to re-establish the link which
in turn increases the recovery time based on PHY type and link partners.

Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 05e9a6a..e0afaac 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1323,7 +1323,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
 
 	bnxt_cancel_fw_health_check(bp);
 
-	bnxt_dev_set_link_down_op(eth_dev);
+	/* Do not bring link down during reset recovery */
+	if (!is_bnxt_in_error(bp))
+		bnxt_dev_set_link_down_op(eth_dev);
 
 	/* Wait for link to be reset and the async notification to process.
 	 * During reset recovery, there is no need to wait and
@@ -4377,7 +4379,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index)
 
 static void bnxt_dev_cleanup(struct bnxt *bp)
 {
-	bnxt_set_hwrm_link_config(bp, false);
+	bp->eth_dev->data->dev_link.link_status = 0;
 	bp->link_info->link_up = 0;
 	if (bp->eth_dev->data->dev_started)
 		bnxt_dev_stop_op(bp->eth_dev);
-- 
2.10.1


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/bnxt: fix to not bring link down during reset recovery
  2020-09-22  5:34 [dpdk-stable] [dpdk-dev] [PATCH] net/bnxt: fix to not bring link down during reset recovery Somnath Kotur
@ 2020-09-23  4:28 ` Ajit Khaparde
  0 siblings, 0 replies; 2+ messages in thread
From: Ajit Khaparde @ 2020-09-23  4:28 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: dpdk-dev, Ferruh Yigit, Kalesh AP, dpdk stable

On Mon, Sep 21, 2020 at 10:41 PM Somnath Kotur <somnath.kotur@broadcom.com>
wrote:

> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>
> Driver should not send the phy_cfg request to bring link down
> during reset recovery. If the driver sends the phy_cfg request
> in recovery process, then FW needs to re-establish the link which
> in turn increases the recovery time based on PHY type and link partners.
>
> Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
> Cc: stable@dpdk.org
>
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
>
Patch applied to dpdk-next-net-brcm. Thanks


> ---
>  drivers/net/bnxt/bnxt_ethdev.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> b/drivers/net/bnxt/bnxt_ethdev.c
> index 05e9a6a..e0afaac 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -1323,7 +1323,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev
> *eth_dev)
>
>         bnxt_cancel_fw_health_check(bp);
>
> -       bnxt_dev_set_link_down_op(eth_dev);
> +       /* Do not bring link down during reset recovery */
> +       if (!is_bnxt_in_error(bp))
> +               bnxt_dev_set_link_down_op(eth_dev);
>
>         /* Wait for link to be reset and the async notification to process.
>          * During reset recovery, there is no need to wait and
> @@ -4377,7 +4379,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp,
> uint32_t index)
>
>  static void bnxt_dev_cleanup(struct bnxt *bp)
>  {
> -       bnxt_set_hwrm_link_config(bp, false);
> +       bp->eth_dev->data->dev_link.link_status = 0;
>         bp->link_info->link_up = 0;
>         if (bp->eth_dev->data->dev_started)
>                 bnxt_dev_stop_op(bp->eth_dev);
> --
> 2.10.1
>
>

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

end of thread, other threads:[~2020-09-23  4:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22  5:34 [dpdk-stable] [dpdk-dev] [PATCH] net/bnxt: fix to not bring link down during reset recovery Somnath Kotur
2020-09-23  4:28 ` Ajit Khaparde

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git