DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH 0/2] bnxt bug fixes
@ 2020-02-20  4:12 Kalesh A P
  2020-02-20  4:12 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix segmentation fault handling async events on port stop Kalesh A P
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Kalesh A P @ 2020-02-20  4:12 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, ajit.khaparde

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

These are couple of bnxt PMD bug fixes. Please apply.

Kalesh AP (2):
  net/bnxt: fix segmentation fault handling async events on port stop
  net/bnxt: fix race when port is stopped and async events are received

 drivers/net/bnxt/bnxt_cpr.c  |  6 ++++++
 drivers/net/bnxt/bnxt_hwrm.c | 12 +++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

-- 
2.10.1


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

* [dpdk-dev] [PATCH 1/2] net/bnxt: fix segmentation fault handling async events on port stop
  2020-02-20  4:12 [dpdk-dev] [PATCH 0/2] bnxt bug fixes Kalesh A P
@ 2020-02-20  4:12 ` Kalesh A P
  2020-02-20  4:12 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix race when port is stopped and async events are received Kalesh A P
  2020-02-20  6:23 ` [dpdk-dev] [PATCH 0/2] bnxt bug fixes Ajit Khaparde
  2 siblings, 0 replies; 11+ messages in thread
From: Kalesh A P @ 2020-02-20  4:12 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, ajit.khaparde

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

Check for bp->hwrm_cmd_resp_addr before using it in HWRM_PREP to avoid
segmentation fault when stop port and meanwhile receive events from FW.

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: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index acecf27..a9c9c72 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -184,6 +184,10 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
  */
 #define HWRM_PREP(req, type, kong) do { \
 	rte_spinlock_lock(&bp->hwrm_lock); \
+	if (bp->hwrm_cmd_resp_addr == NULL) { \
+		rte_spinlock_unlock(&bp->hwrm_lock); \
+		return -EACCES; \
+	} \
 	memset(bp->hwrm_cmd_resp_addr, 0, bp->max_resp_len); \
 	req.req_type = rte_cpu_to_le_16(HWRM_##type); \
 	req.cmpl_ring = rte_cpu_to_le_16(-1); \
@@ -3096,9 +3100,9 @@ static void add_random_mac_if_needed(struct bnxt *bp,
 	}
 }
 
-static void reserve_resources_from_vf(struct bnxt *bp,
-				      struct hwrm_func_cfg_input *cfg_req,
-				      int vf)
+static int reserve_resources_from_vf(struct bnxt *bp,
+				     struct hwrm_func_cfg_input *cfg_req,
+				     int vf)
 {
 	struct hwrm_func_qcaps_input req = {0};
 	struct hwrm_func_qcaps_output *resp = bp->hwrm_cmd_resp_addr;
@@ -3132,6 +3136,8 @@ static void reserve_resources_from_vf(struct bnxt *bp,
 	bp->max_ring_grps -= rte_le_to_cpu_16(resp->max_hw_ring_grps);
 
 	HWRM_UNLOCK();
+
+	return 0;
 }
 
 int bnxt_hwrm_func_qcfg_current_vf_vlan(struct bnxt *bp, int vf)
-- 
2.10.1


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

* [dpdk-dev] [PATCH 2/2] net/bnxt: fix race when port is stopped and async events are received
  2020-02-20  4:12 [dpdk-dev] [PATCH 0/2] bnxt bug fixes Kalesh A P
  2020-02-20  4:12 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix segmentation fault handling async events on port stop Kalesh A P
@ 2020-02-20  4:12 ` Kalesh A P
  2020-02-20  6:23 ` [dpdk-dev] [PATCH 0/2] bnxt bug fixes Ajit Khaparde
  2 siblings, 0 replies; 11+ messages in thread
From: Kalesh A P @ 2020-02-20  4:12 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, ajit.khaparde

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

Fix a race condition between port stop and error recovery task. When io
forwarding is not started on Stingray devices, driver will not receive
the async event from FW when there is a FW reset. While exiting testpmd,
as part of port stop driver sees this event and this in turn causes a
race between port stop and error recovery task.

Fixed this by ignoring the fatal/non-fatal async event from FW while
stopping port.

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: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_cpr.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 0f7b5e9..21565b1 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -76,6 +76,12 @@ void bnxt_handle_async_event(struct bnxt *bp,
 		PMD_DRV_LOG(INFO, "Port conn async event\n");
 		break;
 	case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RESET_NOTIFY:
+		/* Ignore reset notify async events when stopping the port */
+		if (!bp->eth_dev->data->dev_started) {
+			bp->flags |= BNXT_FLAG_FATAL_ERROR;
+			return;
+		}
+
 		event_data = rte_le_to_cpu_32(async_cmp->event_data1);
 		/* timestamp_lo/hi values are in units of 100ms */
 		bp->fw_reset_max_msecs = async_cmp->timestamp_hi ?
-- 
2.10.1


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

* Re: [dpdk-dev] [PATCH 0/2] bnxt bug fixes
  2020-02-20  4:12 [dpdk-dev] [PATCH 0/2] bnxt bug fixes Kalesh A P
  2020-02-20  4:12 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix segmentation fault handling async events on port stop Kalesh A P
  2020-02-20  4:12 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix race when port is stopped and async events are received Kalesh A P
@ 2020-02-20  6:23 ` Ajit Khaparde
  2 siblings, 0 replies; 11+ messages in thread
From: Ajit Khaparde @ 2020-02-20  6:23 UTC (permalink / raw)
  To: Kalesh A P; +Cc: dpdk-dev, Ferruh Yigit

On Wed, Feb 19, 2020 at 7:55 PM Kalesh A P <
kalesh-anakkur.purayil@broadcom.com> wrote:

> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>
> These are couple of bnxt PMD bug fixes. Please apply.
>
Patches applied to dpdk-next-net-brcm.


>
> Kalesh AP (2):
>   net/bnxt: fix segmentation fault handling async events on port stop
>   net/bnxt: fix race when port is stopped and async events are received
>
>  drivers/net/bnxt/bnxt_cpr.c  |  6 ++++++
>  drivers/net/bnxt/bnxt_hwrm.c | 12 +++++++++---
>  2 files changed, 15 insertions(+), 3 deletions(-)
>
> --
> 2.10.1
>
>

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

* Re: [dpdk-dev] [PATCH 0/2] bnxt bug fixes
  2021-03-10  7:50 Kalesh A P
@ 2021-03-11 23:58 ` Ajit Khaparde
  0 siblings, 0 replies; 11+ messages in thread
From: Ajit Khaparde @ 2021-03-11 23:58 UTC (permalink / raw)
  To: Kalesh A P; +Cc: dpdk-dev, Ferruh Yigit

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

On Tue, Mar 9, 2021 at 11:28 PM Kalesh A P
<kalesh-anakkur.purayil@broadcom.com> wrote:
>
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>
> This series contain couple of bug fixes in bnxt PMD.
>
> Kalesh AP (2):
>   net/bnxt: fix HWRM and FW incompatibility handling
>   net/bnxt: mute some failure logs
Patchset applied to dpdk-next-net-brcm.

>
>  drivers/net/bnxt/bnxt_hwrm.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> --
> 2.10.1
>

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

* [dpdk-dev] [PATCH 0/2] bnxt bug fixes
@ 2021-03-10  7:50 Kalesh A P
  2021-03-11 23:58 ` Ajit Khaparde
  0 siblings, 1 reply; 11+ messages in thread
From: Kalesh A P @ 2021-03-10  7:50 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, ajit.khaparde

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

This series contain couple of bug fixes in bnxt PMD.

Kalesh AP (2):
  net/bnxt: fix HWRM and FW incompatibility handling
  net/bnxt: mute some failure logs

 drivers/net/bnxt/bnxt_hwrm.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

-- 
2.10.1


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

* [dpdk-dev]  [PATCH 0/2] bnxt bug fixes
@ 2020-05-22 17:32 Kalesh A P
  0 siblings, 0 replies; 11+ messages in thread
From: Kalesh A P @ 2020-05-22 17:32 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, ajit.khaparde

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 576 bytes --]

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

These are two bug fixes observed during regression testing
with DPDK 20.05-rc3.

Please apply.

Kalesh AP (1):
  net/bnxt: fix the check for validating link speed

Rahul Gupta (1):
  net/bnxt: performance fix for Arm

 drivers/net/bnxt/bnxt.h        |  1 +
 drivers/net/bnxt/bnxt_cpr.h    |  6 +++---
 drivers/net/bnxt/bnxt_ethdev.c |  2 +-
 drivers/net/bnxt/bnxt_hwrm.c   | 14 +++++++++-----
 drivers/net/bnxt/bnxt_ring.h   | 24 +++++++++++++-----------
 5 files changed, 27 insertions(+), 20 deletions(-)

-- 
2.10.1


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

* Re: [dpdk-dev] [PATCH 0/2] bnxt bug fixes
  2020-05-06  6:27 Kalesh A P
@ 2020-05-07  3:22 ` Ajit Khaparde
  0 siblings, 0 replies; 11+ messages in thread
From: Ajit Khaparde @ 2020-05-07  3:22 UTC (permalink / raw)
  To: Kalesh A P; +Cc: dpdk-dev, Ferruh Yigit

On Tue, May 5, 2020 at 11:11 PM Kalesh A P <
kalesh-anakkur.purayil@broadcom.com> wrote:

> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>
> Please apply.
>
> Kalesh AP (2):
>   net/bnxt: fix to alloc FW specified TQM ring context memory
>   net/bnxt: fix TQM ring context memory sizing formulas
>
Thanks Kalesh, Patches applied to dpdk-next-net-brcm.


>
>  drivers/net/bnxt/bnxt.h        |  2 +-
>  drivers/net/bnxt/bnxt_ethdev.c | 21 +++++++++++++--------
>  drivers/net/bnxt/bnxt_hwrm.c   | 31 +++++++++++++++++++------------
>  3 files changed, 33 insertions(+), 21 deletions(-)
>
> --
> 2.10.1
>
>

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

* [dpdk-dev]  [PATCH 0/2] bnxt bug fixes
@ 2020-05-06  6:27 Kalesh A P
  2020-05-07  3:22 ` Ajit Khaparde
  0 siblings, 1 reply; 11+ messages in thread
From: Kalesh A P @ 2020-05-06  6:27 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, ajit.khaparde

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

Please apply.

Kalesh AP (2):
  net/bnxt: fix to alloc FW specified TQM ring context memory
  net/bnxt: fix TQM ring context memory sizing formulas

 drivers/net/bnxt/bnxt.h        |  2 +-
 drivers/net/bnxt/bnxt_ethdev.c | 21 +++++++++++++--------
 drivers/net/bnxt/bnxt_hwrm.c   | 31 +++++++++++++++++++------------
 3 files changed, 33 insertions(+), 21 deletions(-)

-- 
2.10.1


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

* Re: [dpdk-dev] [PATCH 0/2] bnxt bug fixes
  2020-04-23 15:02 Kalesh A P
@ 2020-04-23 22:50 ` Ajit Khaparde
  0 siblings, 0 replies; 11+ messages in thread
From: Ajit Khaparde @ 2020-04-23 22:50 UTC (permalink / raw)
  To: Kalesh A P; +Cc: dpdk-dev, Ferruh Yigit

On Thu, Apr 23, 2020 at 7:46 AM Kalesh A P <
kalesh-anakkur.purayil@broadcom.com> wrote:

> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>
> Please apply.
>
Applied to dpdk-next-net-brcm. Thanks


>
> Kalesh AP (1):
>   net/bnxt: fix to reset VNIC rxq count on VNIC free
>
> Rahul Gupta (1):
>   net/bnxt: fix for memleak during queue restart
>
>  drivers/net/bnxt/bnxt_ethdev.c |  2 ++
>  drivers/net/bnxt/bnxt_hwrm.c   | 12 ------------
>  drivers/net/bnxt/bnxt_rxr.c    | 44
> ++++++++++++++++++++++++------------------
>  3 files changed, 27 insertions(+), 31 deletions(-)
>
> --
> 2.10.1
>
>

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

* [dpdk-dev]  [PATCH 0/2] bnxt bug fixes
@ 2020-04-23 15:02 Kalesh A P
  2020-04-23 22:50 ` Ajit Khaparde
  0 siblings, 1 reply; 11+ messages in thread
From: Kalesh A P @ 2020-04-23 15:02 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, ajit.khaparde

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

Please apply.

Kalesh AP (1):
  net/bnxt: fix to reset VNIC rxq count on VNIC free

Rahul Gupta (1):
  net/bnxt: fix for memleak during queue restart

 drivers/net/bnxt/bnxt_ethdev.c |  2 ++
 drivers/net/bnxt/bnxt_hwrm.c   | 12 ------------
 drivers/net/bnxt/bnxt_rxr.c    | 44 ++++++++++++++++++++++++------------------
 3 files changed, 27 insertions(+), 31 deletions(-)

-- 
2.10.1


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

end of thread, other threads:[~2021-03-11 23:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-20  4:12 [dpdk-dev] [PATCH 0/2] bnxt bug fixes Kalesh A P
2020-02-20  4:12 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix segmentation fault handling async events on port stop Kalesh A P
2020-02-20  4:12 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix race when port is stopped and async events are received Kalesh A P
2020-02-20  6:23 ` [dpdk-dev] [PATCH 0/2] bnxt bug fixes Ajit Khaparde
2020-04-23 15:02 Kalesh A P
2020-04-23 22:50 ` Ajit Khaparde
2020-05-06  6:27 Kalesh A P
2020-05-07  3:22 ` Ajit Khaparde
2020-05-22 17:32 Kalesh A P
2021-03-10  7:50 Kalesh A P
2021-03-11 23:58 ` 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).