* [dpdk-dev] [PATCH] net/bnxt: fix to release lock in error path of stop and close op
@ 2021-01-13 4:30 Somnath Kotur
2021-01-14 2:27 ` [dpdk-dev] [PATCH v2] net/bnxt: fix lock handling in stop and close Ajit Khaparde
0 siblings, 1 reply; 4+ messages in thread
From: Somnath Kotur @ 2021-01-13 4:30 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, Somnath Kotur
err_recovery_lock needs to be released before returning in
stop and close_op if FW_RESET flag is set.
Fixes: 647ca0b35830 ("net/bnxt: check chip reset in dev stop and close")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 74b0f3d1dc..4d6c0a15cd 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1374,6 +1374,7 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
if (bp->flags & BNXT_FLAG_FW_RESET) {
PMD_DRV_LOG(ERR,
"Adapter recovering from error..Please retry\n");
+ pthread_mutex_unlock(&bp->err_recovery_lock);
return -EAGAIN;
}
pthread_mutex_unlock(&bp->err_recovery_lock);
@@ -1476,6 +1477,7 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
if (bp->flags & BNXT_FLAG_FW_RESET) {
PMD_DRV_LOG(ERR,
"Adapter recovering from error...Please retry\n");
+ pthread_mutex_unlock(&bp->err_recovery_lock);
return -EAGAIN;
}
pthread_mutex_unlock(&bp->err_recovery_lock);
--
2.28.0.497.g54e85e7
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] net/bnxt: fix lock handling in stop and close
2021-01-13 4:30 [dpdk-dev] [PATCH] net/bnxt: fix to release lock in error path of stop and close op Somnath Kotur
@ 2021-01-14 2:27 ` Ajit Khaparde
2021-01-21 7:16 ` [dpdk-dev] [PATCH v3] " Ajit Khaparde
0 siblings, 1 reply; 4+ messages in thread
From: Ajit Khaparde @ 2021-01-14 2:27 UTC (permalink / raw)
To: dev; +Cc: Somnath Kotur
From: Somnath Kotur <somnath.kotur@broadcom.com>
err_recovery_lock needs to be released before returning in
stop and close_op if FW_RESET flag is set.
Fixes: dd3613560573 ("net/bnxt: check chip reset in dev stop and close")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
v1->v2: rebased to latest dpdk-next-net and updated commit log.
---
drivers/net/bnxt/bnxt_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f439aeee4..89e42ef14 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1374,6 +1374,7 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
if (bp->flags & BNXT_FLAG_FW_RESET) {
PMD_DRV_LOG(ERR,
"Adapter recovering from error..Please retry\n");
+ pthread_mutex_unlock(&bp->err_recovery_lock);
return -EAGAIN;
}
pthread_mutex_unlock(&bp->err_recovery_lock);
@@ -1497,6 +1498,7 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
if (bp->flags & BNXT_FLAG_FW_RESET) {
PMD_DRV_LOG(ERR,
"Adapter recovering from error...Please retry\n");
+ pthread_mutex_unlock(&bp->err_recovery_lock);
return -EAGAIN;
}
pthread_mutex_unlock(&bp->err_recovery_lock);
--
2.21.1 (Apple Git-122.3)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v3] net/bnxt: fix lock handling in stop and close
2021-01-14 2:27 ` [dpdk-dev] [PATCH v2] net/bnxt: fix lock handling in stop and close Ajit Khaparde
@ 2021-01-21 7:16 ` Ajit Khaparde
2021-01-21 16:02 ` Ajit Khaparde
0 siblings, 1 reply; 4+ messages in thread
From: Ajit Khaparde @ 2021-01-21 7:16 UTC (permalink / raw)
To: dev; +Cc: Somnath Kotur
From: Somnath Kotur <somnath.kotur@broadcom.com>
err_recovery_lock needs to be released before returning in
stop and close_op if FW_RESET flag is set.
Fixes: dd3613560573 ("net/bnxt: check chip reset in dev stop and close")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
v1->v2: rebased to latest dpdk-next-net and updated commit log.
v2->v3: rebased to latest dpdk-next-net.
---
drivers/net/bnxt/bnxt_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f439aeee4..89e42ef14 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1374,6 +1374,7 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
if (bp->flags & BNXT_FLAG_FW_RESET) {
PMD_DRV_LOG(ERR,
"Adapter recovering from error..Please retry\n");
+ pthread_mutex_unlock(&bp->err_recovery_lock);
return -EAGAIN;
}
pthread_mutex_unlock(&bp->err_recovery_lock);
@@ -1497,6 +1498,7 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
if (bp->flags & BNXT_FLAG_FW_RESET) {
PMD_DRV_LOG(ERR,
"Adapter recovering from error...Please retry\n");
+ pthread_mutex_unlock(&bp->err_recovery_lock);
return -EAGAIN;
}
pthread_mutex_unlock(&bp->err_recovery_lock);
--
2.21.1 (Apple Git-122.3)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/bnxt: fix lock handling in stop and close
2021-01-21 7:16 ` [dpdk-dev] [PATCH v3] " Ajit Khaparde
@ 2021-01-21 16:02 ` Ajit Khaparde
0 siblings, 0 replies; 4+ messages in thread
From: Ajit Khaparde @ 2021-01-21 16:02 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk-dev, Somnath Kotur
[-- Attachment #1: Type: text/plain, Size: 1721 bytes --]
On Wed, Jan 20, 2021 at 11:17 PM Ajit Khaparde <ajitkhaparde@gmail.com> wrote:
>
> From: Somnath Kotur <somnath.kotur@broadcom.com>
>
> err_recovery_lock needs to be released before returning in
> stop and close_op if FW_RESET flag is set.
>
> Fixes: dd3613560573 ("net/bnxt: check chip reset in dev stop and close")
> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Patch applied to dpdk-next-net-brcm.
> ---
> v1->v2: rebased to latest dpdk-next-net and updated commit log.
> v2->v3: rebased to latest dpdk-next-net.
> ---
> drivers/net/bnxt/bnxt_ethdev.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index f439aeee4..89e42ef14 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -1374,6 +1374,7 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
> if (bp->flags & BNXT_FLAG_FW_RESET) {
> PMD_DRV_LOG(ERR,
> "Adapter recovering from error..Please retry\n");
> + pthread_mutex_unlock(&bp->err_recovery_lock);
> return -EAGAIN;
> }
> pthread_mutex_unlock(&bp->err_recovery_lock);
> @@ -1497,6 +1498,7 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
> if (bp->flags & BNXT_FLAG_FW_RESET) {
> PMD_DRV_LOG(ERR,
> "Adapter recovering from error...Please retry\n");
> + pthread_mutex_unlock(&bp->err_recovery_lock);
> return -EAGAIN;
> }
> pthread_mutex_unlock(&bp->err_recovery_lock);
> --
> 2.21.1 (Apple Git-122.3)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-21 16:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 4:30 [dpdk-dev] [PATCH] net/bnxt: fix to release lock in error path of stop and close op Somnath Kotur
2021-01-14 2:27 ` [dpdk-dev] [PATCH v2] net/bnxt: fix lock handling in stop and close Ajit Khaparde
2021-01-21 7:16 ` [dpdk-dev] [PATCH v3] " Ajit Khaparde
2021-01-21 16:02 ` 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).