From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-gw1-out.broadcom.com (mail-gw1-out.broadcom.com [216.31.210.62]) by dpdk.org (Postfix) with ESMTP id BE0962BB3 for ; Tue, 16 Aug 2016 01:07:01 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.28,527,1464678000"; d="scan'208";a="101927005" Received: from mail-irv-18.broadcom.com ([10.15.198.37]) by mail-gw1-out.broadcom.com with ESMTP; 15 Aug 2016 17:51:05 -0700 Received: from mail-irva-12.broadcom.com (mail-irva-12.broadcom.com [10.11.16.101]) by mail-irv-18.broadcom.com (Postfix) with ESMTP id D919882035; Mon, 15 Aug 2016 16:07:00 -0700 (PDT) Received: from C02PT1RBG8WP.local.net (unknown [10.10.89.124]) by mail-irva-12.broadcom.com (Postfix) with ESMTP id E02CDA6280; Mon, 15 Aug 2016 16:06:59 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: John Carney Date: Mon, 15 Aug 2016 18:06:51 -0500 Message-Id: <1471302415-12019-2-git-send-email-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.7.4 (Apple Git-66) In-Reply-To: <1471302415-12019-1-git-send-email-ajit.khaparde@broadcom.com> References: <1471302415-12019-1-git-send-email-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/5] bnxt: Add support for Broadcom StrataGX Communication Processors X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Aug 2016 23:07:02 -0000 This patch adds support for the Broadcom StrataGX® BCM5871X series of Communucations 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 --- drivers/net/bnxt/bnxt_cpr.h | 1 + drivers/net/bnxt/bnxt_ethdev.c | 2 ++ drivers/net/bnxt/bnxt_txr.h | 1 + 3 files changed, 4 insertions(+) diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h index c176f8c..f9f2adb 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 3795fac..93269df 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 2176aca..4c16101 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 { -- 2.7.4 (Apple Git-66)