From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4427EA0350; Wed, 24 Jun 2020 14:47:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 11B831D92D; Wed, 24 Jun 2020 14:47:22 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 07D2B1D921 for ; Wed, 24 Jun 2020 14:47:20 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05OCg6GW015392; Wed, 24 Jun 2020 05:47:20 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=pfpt0818; bh=m77kn5WnAdnz+gxHkeGuVaZbQn7+xMLYOK6Eq22jvjI=; b=KUBVoJr0LydTAM3+sZnIAKcDDf8i1Qm2Ang6IiSdnluyIFw7tISbVtNtCZOiof3ijIbX nsjT9yp7jtQqpNBxfE7rYNA0XmwZuZSWdMSrnzJB6miegHXtZ3uBzFA8NaRAVsPIvYQ3 fUgBW4Ws7TGGPTwlrHgD2/JaG2HGKm/8Msk1uqE1/8hmO33iDajxWb2leXJBYAEcH2Wj v2ym7dBZIrnOl+sTn6zFptCH9q6T5lLIBt9N7LQ66+6gni7Db5N1OVCE9fE+AzzJztV8 mWE4MjF0wWgMj5k2aXuhluZ6WZ4vvoMWxwYp1KpXpsJ0PipBy0/y/1QlCSpRbptV28tU Hg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 31uur1atkg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 24 Jun 2020 05:47:20 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 24 Jun 2020 05:47:18 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 24 Jun 2020 05:47:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kt+IS1zX7QlnQRNMUJQHC/aemC6nd+HDUJ/jYQRHPsCJLJEmSvaG+3Rflyf3nyXxYVDZUKA49QY2O4mrpn1Wa1H22IMrjItwI97dt4s7wQnqoZ1Ykelv8S29Du2olL86ITr3kUVKF9oYUJg+EovOpJQunRdIi/gaCTS2YYhL4zLFV9JOLN2yH33ascNvLHpNNzZNfn50/tmqrOJFp4tjAQf2RgSeNlMaocFBRnJFTVvruTHDbxI9z9Otq4oTtNmvNAzBFlMIolmWkOisprVd1NXmNOy4XfeoF7IwtwpYQXGPdVAUzyBmaIRWLwNZZX/akL4Q7i6YcieCxKONjZPcDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m77kn5WnAdnz+gxHkeGuVaZbQn7+xMLYOK6Eq22jvjI=; b=kwJUGKc3XQPzdvKCbVXoke2P4ubFb2H2EtsFh20BaSv0sw72xn2Ty5gr0BW8BTopRHsIxZx3FTgltqEfZIaJN3XAPPvOOQluJAuxjljIAaK8Pct2TYU630+l1394kVQjTthNKekdX1TYDtonXN0thxQ5tQdxmaMznHZNlTl5Di+PrKW9mG9QDxWEiwsS8l+9hCX03yPurOGLdbYnDlIsPJGCXKJ28tnA++FOFQfvQaXAEj3jHqL5+j6W9Sdp5AA3mLLPLzoFtAQW2pUU+J+WGTjqw8JIv0twx6UlGyrj5iQY5ybHP9m4lKv21oQNlRwr/tT1jBb5Au/npDI1ywEIbQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m77kn5WnAdnz+gxHkeGuVaZbQn7+xMLYOK6Eq22jvjI=; b=Ybnj8hY7WfdwWRSIspdKesH1U8G+F62B9CR8dBwH4AZQ9X5HcrlELa5CM588uJHZtHGk6OD+SmIc/zGkFV2N52ixBmMmWyGR7HAasReAG4UXd5qFMsx6FC5ORn/XHd+tShQyFtkaI3MsmCUKL7tY5sgrrb9knOzNoQ+8T7tGKG0= Authentication-Results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=marvell.com; Received: from MWHPR18MB1070.namprd18.prod.outlook.com (2603:10b6:300:a5::11) by MWHPR18MB1070.namprd18.prod.outlook.com (2603:10b6:300:a5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20; Wed, 24 Jun 2020 12:47:15 +0000 Received: from MWHPR18MB1070.namprd18.prod.outlook.com ([fe80::e895:bdac:e157:2ed2]) by MWHPR18MB1070.namprd18.prod.outlook.com ([fe80::e895:bdac:e157:2ed2%11]) with mapi id 15.20.3131.020; Wed, 24 Jun 2020 12:47:15 +0000 From: Harman Kalra To: Thomas Monjalon , Jerin Jacob , Nithin Dabilpuram , John McNamara , Marko Kovacevic , Kiran Kumar K CC: , Harman Kalra Date: Wed, 24 Jun 2020 18:16:48 +0530 Message-ID: <1593002808-29161-1-git-send-email-hkalra@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Content-Type: text/plain X-ClientProxiedBy: PN1PR01CA0102.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00::18) To MWHPR18MB1070.namprd18.prod.outlook.com (2603:10b6:300:a5::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from hkarlara-OptiPlex-3046.marvell.com (115.113.156.2) by PN1PR01CA0102.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3131.21 via Frontend Transport; Wed, 24 Jun 2020 12:47:12 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6a918da3-4595-459b-3fb5-08d8183cb8e6 X-MS-TrafficTypeDiagnostic: MWHPR18MB1070: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-Forefront-PRVS: 0444EB1997 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g6DvPfkrvlR4tdTnnDrWM3qahpacW5PCOCBdKfPEkO/hNowS1tQYrHtnFvvCi+XcmvhM7bpNOcwagWVcqd0cowXlK9bD+JgfHSHNbPrwLDPozT3TP9JYb1EGYodn6ne/kBhQQAevwCzem6A4sQ6IhN64z601tCkKm2YCnaFw2j+ZVWud6x79e+tOcxfA2rKc3TKjBRVl/qwpInXBwJVKJ+iX01TCmdmj/6Adhl20RdCbe8KRbidL1pCFdS7Tlnkir1B4SzI/8wB4XXKPBgMA2besYU9SSY78j4q4sfG7Ik2eyl6u+stnUWflETvVU4/s X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR18MB1070.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(107886003)(4326008)(498600001)(8936002)(2906002)(36756003)(7696005)(52116002)(55236004)(110136005)(83380400001)(8676002)(86362001)(16526019)(66946007)(26005)(186003)(66556008)(66476007)(6486002)(2616005)(5660300002)(6636002)(956004)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: m9zO3PYGCdvnpN6f3fSt09D0lFQV9YDh8Ja/08evRywYCzCCDDPti2OHMlLzX3GeO3xynXBrAoRbP2fP97PVvzJ90nOqhiV1OCFKHUe+GJdVZldcQMMA3BTS/5bxsm8iXUcBuinIENdbdHlUfvdEkB/RQlN3JFoeFq/Pt2wNqWFZDWRNUKWIJd5uz5iBdGlo45N5L7Imeswat+7o6n64V8vP4jizOtME4kWhieQS9gqTLLyh54Ipaue3dqlFT/KKRXnorm9b1VtEp/K4zjSfE6GB1Nzy+o6dNXjO4IXjpF6J9qwDIr//IB9B+pFFqVZfKyvLJZj7gvhAA++WDlfo0Ue1EZoKogiYqqaO7rH4pjl1Xudszwr/g2qWvCVgl20MI9fimBn57HggoDcZrDjru5IA+4qIpWf1A2FHWGLpSGz6V9BY4dLVcExWEevrnSZr0IVPt1pA25WOflKFUHi7LvjbsakyhDXSXF1hZisbRMs= X-MS-Exchange-CrossTenant-Network-Message-Id: 6a918da3-4595-459b-3fb5-08d8183cb8e6 X-MS-Exchange-CrossTenant-AuthSource: MWHPR18MB1070.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 12:47:15.4755 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cj5ZEVGSViZ3gx1cAUk9R0jOkFm0zTtx11PsHVvvXxWV6LexJO+CdctpRHmweOdBTGoL9ZGNVN3KL7+5Y5Yrjw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR18MB1070 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-24_07:2020-06-24, 2020-06-24 signatures=0 Subject: [dpdk-dev] [PATCH v2] net/octeontx2: add cn98xx support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" New cn98xx SOC comes up with two NIX blocks wrt cn96xx, cn93xx, to achieve higher performance. Also the no of cores increased to 36 from 24. Adding support for cn98xx where need a logic to detect if the LF is attached to NIX0 or NIX1 and then accordingly use the respective NIX block. Signed-off-by: Harman Kalra --- *V2: updated make/meson configs with the increased no of cores. config/arm/meson.build | 2 +- config/defconfig_arm64-octeontx2-linuxapp-gcc | 2 +- doc/guides/platform/octeontx2.rst | 1 + drivers/common/octeontx2/hw/otx2_rvu.h | 3 ++- drivers/net/octeontx2/otx2_ethdev.c | 17 ++++++++++++++++- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 6e75e6d97..8728051d5 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -82,7 +82,7 @@ flags_thunderx2_extra = [ flags_octeontx2_extra = [ ['RTE_MACHINE', '"octeontx2"'], ['RTE_MAX_NUMA_NODES', 1], - ['RTE_MAX_LCORE', 24], + ['RTE_MAX_LCORE', 36], ['RTE_ARM_FEATURE_ATOMICS', true], ['RTE_EAL_IGB_UIO', false], ['RTE_USE_C11_MEM_MODEL', true]] diff --git a/config/defconfig_arm64-octeontx2-linuxapp-gcc b/config/defconfig_arm64-octeontx2-linuxapp-gcc index 7cfb81872..0d83becf5 100644 --- a/config/defconfig_arm64-octeontx2-linuxapp-gcc +++ b/config/defconfig_arm64-octeontx2-linuxapp-gcc @@ -7,7 +7,7 @@ CONFIG_RTE_MACHINE="octeontx2" CONFIG_RTE_MAX_NUMA_NODES=1 -CONFIG_RTE_MAX_LCORE=24 +CONFIG_RTE_MAX_LCORE=36 CONFIG_RTE_ARM_FEATURE_ATOMICS=y # Doesn't support NUMA diff --git a/doc/guides/platform/octeontx2.rst b/doc/guides/platform/octeontx2.rst index d38a4c1ed..7dd695175 100644 --- a/doc/guides/platform/octeontx2.rst +++ b/doc/guides/platform/octeontx2.rst @@ -13,6 +13,7 @@ More information about OCTEON TX2 SoC can be found at `Marvell Official Website Supported OCTEON TX2 SoCs ------------------------- +- CN98xx - CN96xx - CN93xx diff --git a/drivers/common/octeontx2/hw/otx2_rvu.h b/drivers/common/octeontx2/hw/otx2_rvu.h index f2037ec57..330bfb37f 100644 --- a/drivers/common/octeontx2/hw/otx2_rvu.h +++ b/drivers/common/octeontx2/hw/otx2_rvu.h @@ -134,11 +134,12 @@ #define RVU_BLOCK_ADDR_RVUM (0x0ull) #define RVU_BLOCK_ADDR_LMT (0x1ull) #define RVU_BLOCK_ADDR_NPA (0x3ull) +#define RVU_BLOCK_ADDR_NIX0 (0x4ull) +#define RVU_BLOCK_ADDR_NIX1 (0x5ull) #define RVU_BLOCK_ADDR_NPC (0x6ull) #define RVU_BLOCK_ADDR_SSO (0x7ull) #define RVU_BLOCK_ADDR_SSOW (0x8ull) #define RVU_BLOCK_ADDR_TIM (0x9ull) -#define RVU_BLOCK_ADDR_NIX0 (0x4ull) #define RVU_BLOCK_ADDR_CPT0 (0xaull) #define RVU_BLOCK_ADDR_NDC0 (0xcull) #define RVU_BLOCK_ADDR_NDC1 (0xdull) diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index 3f3f0a693..095506034 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -2177,6 +2177,20 @@ otx2_eth_dev_is_sdp(struct rte_pci_device *pci_dev) return false; } +static inline uint64_t +nix_get_blkaddr(struct otx2_eth_dev *dev) +{ + uint64_t reg; + + /* Reading the discovery register to know which NIX is the LF + * attached to. + */ + reg = otx2_read64(dev->bar2 + + RVU_PF_BLOCK_ADDRX_DISC(RVU_BLOCK_ADDR_NIX0)); + + return reg & 0x1FFULL ? RVU_BLOCK_ADDR_NIX0 : RVU_BLOCK_ADDR_NIX1; +} + static int otx2_eth_dev_init(struct rte_eth_dev *eth_dev) { @@ -2236,7 +2250,6 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev) dev->configured = 0; dev->drv_inited = true; dev->ptype_disable = 0; - dev->base = dev->bar2 + (RVU_BLOCK_ADDR_NIX0 << 20); dev->lmt_addr = dev->bar2 + (RVU_BLOCK_ADDR_LMT << 20); /* Attach NIX LF */ @@ -2244,6 +2257,8 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev) if (rc) goto otx2_npa_uninit; + dev->base = dev->bar2 + (nix_get_blkaddr(dev) << 20); + /* Get NIX MSIX offset */ rc = nix_lf_get_msix_offset(dev); if (rc) -- 2.18.0