Skip to contentSkip to conversation

bnxt patches

PATCH In review Ajit Khaparde 3 participants 14 messages Jul 19, 2019 Network drivers

lore
Share & tools
lore
#0 lore raw

cover bnxt patches

Patchset based after an earlier submission
https://patchwork.dpdk.org/patch/56690/

This set mostly contains bug fixes, an update to the bnxt.rst doc and a adds a VF PCI device ID for Thor based network controller.

Please apply.

Ajit Khaparde (2):
net/bnxt: remove unnecessary interrupt disable
doc: update release information for bnxt

Kalesh AP (1):
net/bnxt: add new device id

Lance Richardson (1):
net/bnxt: disable vector mode Tx with VLAN offload

Rahul Gupta (1):
net/bnxt: fix interrupt rearm logic

Santoshkumar Karanappa Rastapur (1):
net/bnxt: use correct number of RSS contexts for thor

Stephen Hemminger (1):
net/bnxt: fix receive interrupt vector

 doc/guides/rel_notes/release_19_08.rst |  2 +-
 drivers/net/bnxt/bnxt_ethdev.c         | 26 +++++++++++++-------------
 drivers/net/bnxt/bnxt_hwrm.c           |  2 +-
 drivers/net/bnxt/bnxt_rxq.c            |  2 +-
 4 files changed, 16 insertions(+), 16 deletions(-)
Signature · 1 line
2.20.1 (Apple Git-117)
#1 lore raw

PATCH 1/7 net/bnxt: add new device id

From: Kalesh AP <[email protected]>

Added support for new thor device.

---
 drivers/net/bnxt/bnxt_ethdev.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +8 -4
index 87f069caa..6492f5627 100644
@@ -74,7 +74,8 @@ int bnxt_logtype_driver;
 #define BROADCOM_DEV_ID_57508 0x1750
 #define BROADCOM_DEV_ID_57504 0x1751
 #define BROADCOM_DEV_ID_57502 0x1752
-#define BROADCOM_DEV_ID_57500_VF 0x1807
+#define BROADCOM_DEV_ID_57500_VF1 0x1806
+#define BROADCOM_DEV_ID_57500_VF2 0x1807
 #define BROADCOM_DEV_ID_58802 0xd802
 #define BROADCOM_DEV_ID_58804 0xd804
 #define BROADCOM_DEV_ID_58808 0x16f0
@@ -126,7 +127,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57508) },
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57504) },
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57502) },
-	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57500_VF) },
+	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57500_VF1) },
+	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57500_VF2) },
 	{ .vendor_id = 0, /* sentinel */ },
 };
 
@@ -3338,7 +3340,8 @@ static bool bnxt_vf_pciid(uint16_t id)
 	    id == BROADCOM_DEV_ID_STRATUS_NIC_VF1 ||
 	    id == BROADCOM_DEV_ID_STRATUS_NIC_VF2 ||
 	    id == BROADCOM_DEV_ID_58802_VF ||
-	    id == BROADCOM_DEV_ID_57500_VF)
+	    id == BROADCOM_DEV_ID_57500_VF1 ||
+	    id == BROADCOM_DEV_ID_57500_VF2)
 		return true;
 	return false;
 }
@@ -3808,7 +3811,8 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
 	if (pci_dev->id.device_id == BROADCOM_DEV_ID_57508 ||
 	    pci_dev->id.device_id == BROADCOM_DEV_ID_57504 ||
 	    pci_dev->id.device_id == BROADCOM_DEV_ID_57502 ||
-	    pci_dev->id.device_id == BROADCOM_DEV_ID_57500_VF)
+	    pci_dev->id.device_id == BROADCOM_DEV_ID_57500_VF1 ||
+	    pci_dev->id.device_id == BROADCOM_DEV_ID_57500_VF2)
 		bp->flags |= BNXT_FLAG_THOR_CHIP;
 
 	rc = bnxt_init_board(eth_dev);
Signature · 1 line
2.20.1 (Apple Git-117)
#2 lore raw

PATCH 2/7 net/bnxt: use correct number of RSS contexts for thor

In reply to Ajit Khaparde

From: Santoshkumar Karanappa Rastapur <[email protected]>

BCM57500-based adapters use a variable number of RSS contexts depending upon the number of receive rings in use. The current implementation is erroneously using the maximum possible number of RSS contexts instead of the actual number allocated when setting up RSS tables in the adapter. Fix by using the actual number of allocated contexts.

Fixes 38412304b50a ("net/bnxt: enable RSS for thor-based controllers")
---
 drivers/net/bnxt/bnxt_hwrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_hwrm.c +1 -1
index 67b5ff661..692c6c399 100644
@@ -1736,7 +1736,7 @@ bnxt_hwrm_vnic_rss_cfg_thor(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 {
 	int i;
 	int rc = 0;
-	int nr_ctxs = bp->max_ring_grps;
+	int nr_ctxs = vnic->num_lb_ctxts;
 	struct hwrm_vnic_rss_cfg_input req = {.req_type = 0 };
 	struct hwrm_vnic_rss_cfg_output *resp = bp->hwrm_cmd_resp_addr;
 
Signature · 1 line
2.20.1 (Apple Git-117)
#3 lore raw

Re: [dpdk-dev] [PATCH 2/7] net/bnxt: use correct number of RSS contexts for thor

Quoted 9 lines · Ajit Khaparde

From: Santoshkumar Karanappa Rastapur <[email protected]>

BCM57500-based adapters use a variable number of RSS contexts depending upon the number of receive rings in use. The current implementation is erroneously using the maximum possible number of RSS contexts instead of the actual number allocated when setting up RSS tables in the adapter. Fix by using the actual number of allocated contexts.

Quoted 5 lines
Fixes 38412304b50a ("net/bnxt: enable RSS for thor-based controllers")

Squashed into fix of same issue from previous patchset

[17/22] https://patches.dpdk.org/patch/56685/

#4 lore raw

PATCH 3/7 net/bnxt: fix receive interrupt vector

In reply to Ajit Khaparde

From: Stephen Hemminger <[email protected]>

The receive interrupt vector should be offset by the constant RTE_INTR_VEC_RXTX_OFFSET; otherwise setting up some queue interrupts will fail.

Fixes 1fe427fd08ee ("net/bnxt: support enable/disable interrupt")
---
 drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/bnxt/bnxt_ethdev.c +2 -1
index 6492f5627..fec1ecbae 100644
@@ -427,7 +427,8 @@ static int bnxt_init_chip(struct bnxt *bp)
 			intr_handle->max_intr);
 		for (queue_id = 0; queue_id < bp->eth_dev->data->nb_rx_queues;
 		     queue_id++) {
-			intr_handle->intr_vec[queue_id] = vec;
+			intr_handle->intr_vec[queue_id] =
+							vec + BNXT_RX_VEC_START;
 			if (vec < base + intr_handle->nb_efd - 1)
 				vec++;
 		}
Signature · 1 line
2.20.1 (Apple Git-117)
#5 lore raw

PATCH 4/7 net/bnxt: fix interrupt rearm logic

In reply to Ajit Khaparde

From: Rahul Gupta <[email protected]>

Rearm will intimate hardware that current interrupts are processed and it can continue to send more.

Fixes 1fe427fd08ee ("net/bnxt: support enable/disable interrupt")
---
 drivers/net/bnxt/bnxt_rxq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_rxq.c +1 -1
index c94cac5a9..e0eb890f8 100644
@@ -374,7 +374,7 @@ bnxt_rx_queue_intr_enable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
 			return rc;
 		}
 		cpr = rxq->cp_ring;
-		B_CP_DB_ARM(cpr);
+		B_CP_DB_REARM(cpr, cpr->cp_raw_cons);
 	}
 	return rc;
 }
Signature · 1 line
2.20.1 (Apple Git-117)
#6 lore raw

PATCH 5/7 net/bnxt: disable vector mode Tx with VLAN offload

In reply to Ajit Khaparde

From: Lance Richardson <[email protected]>

The vector mode transmit path does not currently support VLAN tag insertion, so we need to disable vector transmit when transmit VLAN insertion offload is enabled.

Fixes bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
---
 drivers/net/bnxt/bnxt_ethdev.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +3 -5
index fec1ecbae..d6176a686 100644
@@ -743,13 +743,11 @@ bnxt_transmit_function(__rte_unused struct rte_eth_dev *eth_dev)
 {
 #ifdef RTE_ARCH_X86
 	/*
-	 * Vector mode receive can be enabled only if scatter tx is not
-	 * in use and tx offloads other than VLAN insertion are not
-	 * in use.
+	 * Vector mode transmit can be enabled only if not using scatter rx
+	 * or tx offloads.
 	 */
 	if (!eth_dev->data->scattered_rx &&
-	    !(eth_dev->data->dev_conf.txmode.offloads &
-	      ~DEV_TX_OFFLOAD_VLAN_INSERT)) {
+	    !eth_dev->data->dev_conf.txmode.offloads) {
 		PMD_DRV_LOG(INFO, "Using vector mode transmit for port %d\n",
 			    eth_dev->data->port_id);
 		return bnxt_xmit_pkts_vec;
Signature · 1 line
2.20.1 (Apple Git-117)
#7 lore raw

PATCH 6/7 net/bnxt: remove unnecessary interrupt disable

In reply to Ajit Khaparde

Remove an unnecessary rte_intr_disable() call to disable interrupt during device init.

Fixes c09f57b49c13 ("net/bnxt: add start/stop/link update operations")
---
 drivers/net/bnxt/bnxt_ethdev.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +0 -3
index d6176a686..357ec830d 100644
@@ -248,9 +248,6 @@ static int bnxt_init_chip(struct bnxt *bp)
 	unsigned int i, j;
 	int rc;
 
-	/* disable uio/vfio intr/eventfd mapping */
-	rte_intr_disable(intr_handle);
-
 	if (bp->eth_dev->data->mtu > RTE_ETHER_MTU) {
 		bp->eth_dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
Signature · 1 line
2.20.1 (Apple Git-117)
#8 lore raw

PATCH 7/7 doc: update release information for bnxt

In reply to Ajit Khaparde

Update the HWRM version to the latest version used by the bnxt PMD from 1.10.0.74 to 1.10.0.91

---
 doc/guides/rel_notes/release_19_08.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
doc/guides/rel_notes/release_19_08.rst +1 -1
index f24e7301e..a0a7de88a 100644
@@ -83,7 +83,7 @@ New Features
 
   * Performance optimizations in non-vector Tx path
   * Added support for SSE vector mode
-  * Updated HWRM API to version 1.10.0.74
+  * Updated HWRM API to version 1.10.0.91
 
 * **Added support for Broadcom NetXtreme-E BCM57500 Ethernet controllers.**
 
Signature · 1 line
2.20.1 (Apple Git-117)
#10 lore raw
In reply to Ajit Khaparde
Quoted 18 lines · Ajit Khaparde

Patchset based after an earlier submission
https://patchwork.dpdk.org/patch/56690/

This set mostly contains bug fixes, an update to the bnxt.rst doc and a adds a VF PCI device ID for Thor based network controller.

Please apply.

Ajit Khaparde (2):
net/bnxt: remove unnecessary interrupt disable
doc: update release information for bnxt

Kalesh AP (1):
net/bnxt: add new device id

Lance Richardson (1):
net/bnxt: disable vector mode Tx with VLAN offload

Quoted 9 lines

Rahul Gupta (1):
net/bnxt: fix interrupt rearm logic

Santoshkumar Karanappa Rastapur (1):
net/bnxt: use correct number of RSS contexts for thor

Stephen Hemminger (1):
net/bnxt: fix receive interrupt vector

Same for this patchset, it has been sent to late in the release cycle, will be considered for next release.

Regards,
ferruh

#11 lore raw
Quoted 29 lines · On Fri, 19 Jul 2019 13:33:32 +0100 Ferruh Yigit <[email protected]> wrote:
Quoted 18 lines · Ajit Khaparde

Patchset based after an earlier submission
https://patchwork.dpdk.org/patch/56690/

This set mostly contains bug fixes, an update to the bnxt.rst doc and a adds a VF PCI device ID for Thor based network controller.

Please apply.

Ajit Khaparde (2):
net/bnxt: remove unnecessary interrupt disable
doc: update release information for bnxt

Kalesh AP (1):
net/bnxt: add new device id

Lance Richardson (1):
net/bnxt: disable vector mode Tx with VLAN offload

Quoted 9 lines

Rahul Gupta (1):
net/bnxt: fix interrupt rearm logic

Santoshkumar Karanappa Rastapur (1):
net/bnxt: use correct number of RSS contexts for thor

Stephen Hemminger (1):
net/bnxt: fix receive interrupt vector

Quoted 5 lines

Same for this patchset, it has been sent to late in the release cycle, will be considered for next release.

Regards,
ferruh

Some of these are bug fixes. They should go in. Also, adding new device id's should always be allowed.

Ajit, could you split the set?

#12 lore raw
Quoted 35 lines · Stephen Hemminger
Quoted 32 lines · On Fri, 19 Jul 2019 13:33:32 +0100 Ferruh Yigit <[email protected]> wrote:
Quoted 18 lines · Ajit Khaparde

Patchset based after an earlier submission
https://patchwork.dpdk.org/patch/56690/

This set mostly contains bug fixes, an update to the bnxt.rst doc and a adds a VF PCI device ID for Thor based network controller.

Please apply.

Ajit Khaparde (2):
net/bnxt: remove unnecessary interrupt disable
doc: update release information for bnxt

Kalesh AP (1):
net/bnxt: add new device id

Lance Richardson (1):
net/bnxt: disable vector mode Tx with VLAN offload

Quoted 9 lines

Rahul Gupta (1):
net/bnxt: fix interrupt rearm logic

Santoshkumar Karanappa Rastapur (1):
net/bnxt: use correct number of RSS contexts for thor

Stephen Hemminger (1):
net/bnxt: fix receive interrupt vector

Same for this patchset, it has been sent to late in the release cycle, will be considered for next release.

Quoted 8 lines
Quoted 2 lines

Regards,
ferruh

Some of these are bug fixes. They should go in. Also, adding new device id's should always be allowed.

Ajit, could you split the set?

Indeed I overlooked, all (for both patchset) looks like bug fixes, patchsets with 22 and 7 patches made me think these are new features, I will get them for rc2.

#13 lore raw
In reply to Ajit Khaparde
Quoted 18 lines · Ajit Khaparde

Patchset based after an earlier submission
https://patchwork.dpdk.org/patch/56690/

This set mostly contains bug fixes, an update to the bnxt.rst doc and a adds a VF PCI device ID for Thor based network controller.

Please apply.

Ajit Khaparde (2):
net/bnxt: remove unnecessary interrupt disable
doc: update release information for bnxt

Kalesh AP (1):
net/bnxt: add new device id

Lance Richardson (1):
net/bnxt: disable vector mode Tx with VLAN offload

Quoted 8 lines

Rahul Gupta (1):
net/bnxt: fix interrupt rearm logic

Santoshkumar Karanappa Rastapur (1):
net/bnxt: use correct number of RSS contexts for thor

Stephen Hemminger (1):
net/bnxt: fix receive interrupt vector

Series applied to dpdk-next-net/master, thanks.