From: Ajit Khaparde Date: Mon, 26 Sep 2016 16:16:54 +0000 (-0500) Subject: net/bnxt: support Broadcom StrataGX X-Git-Tag: spdx-start~5766 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1fe1aaf2076f0b7b08adeca3b548af310f033452;p=dpdk.git net/bnxt: support Broadcom StrataGX This patch adds support for the Broadcom StrataGX® BCM5871X series of Communications Processors. These ARM based processors target a broad range of networking applications including virtual CPE (vCPE) and NFV appliances, 10G service routers and gateways, control plane processing for Ethernet switches, and network attached storage (NAS). Other than adding the PCI Id for supporting the device, the patch also adds a memory barrier before the Tx doorbell and Completing ring doorbell is written to. Since ARM has a weakly ordered memory model this enforces a strict ordering of the descriptor writes before the doorbell writes happen. Signed-off-by: John Carney Signed-off-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h index c176f8c5af..f9f2adb405 100644 --- a/drivers/net/bnxt/bnxt_cpr.h +++ b/drivers/net/bnxt/bnxt_cpr.h @@ -54,6 +54,7 @@ RING_CMP(cpr->cp_ring_struct, raw_cons))) #define B_CP_DIS_DB(cpr, raw_cons) \ + rte_smp_wmb(); \ (*(uint32_t *)((cpr)->cp_doorbell) = (DB_CP_FLAGS | \ RING_CMP(cpr->cp_ring_struct, raw_cons))) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index aee2db83ef..8f561a3fb7 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -62,6 +62,7 @@ static const char bnxt_version[] = #define BROADCOM_DEV_ID_57302 0x16c9 #define BROADCOM_DEV_ID_57304_PF 0x16ca #define BROADCOM_DEV_ID_57304_VF 0x16cb +#define BROADCOM_DEV_ID_NS2 0x16cd #define BROADCOM_DEV_ID_57402 0x16d0 #define BROADCOM_DEV_ID_57404 0x16d1 #define BROADCOM_DEV_ID_57406_PF 0x16d2 @@ -74,6 +75,7 @@ static struct rte_pci_id bnxt_pci_id_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57302) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57304_PF) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57304_VF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_NS2) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57402) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57404) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57406_PF) }, diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h index 2176acaac1..4c16101be7 100644 --- a/drivers/net/bnxt/bnxt_txr.h +++ b/drivers/net/bnxt/bnxt_txr.h @@ -38,6 +38,7 @@ #define BNXT_TX_PUSH_THRESH 92 #define B_TX_DB(db, prod) \ + rte_smp_wmb(); \ (*(uint32_t *)db = (DB_KEY_TX | prod)) struct bnxt_tx_ring_info {