From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 958A3A00C2; Thu, 16 Jun 2022 17:04:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83F334014F; Thu, 16 Jun 2022 17:04:57 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2064.outbound.protection.outlook.com [40.107.101.64]) by mails.dpdk.org (Postfix) with ESMTP id F1C9C40141 for ; Thu, 16 Jun 2022 17:04:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mpW6Axt4zNQ0l0pL8V2zyNfbMp/jmmyE2t97zLGWu0C9la0pg9caYKL9uJBAG1IKHWbZYJrt2hZLd37rGeuy0DpLW0HxjV5ikBgFow+fk1VydVD0BhgrBX8YbhedF2ki5wrgXFinv8pvm8eEaYY6fKTe0+w6K8gTvROOCnx/wMoDrLa433s8/f69rL3kb44LMdM6M6H/YW2JZO889iTjUsV4vEC4gfgcYeiWeDrPTW0SqImAV9LayYNR0iNEGnTk3fx+qzNq6R2UMjP/P+L5IE1O0RVlRzTYCogFa8/UrAwFtH6bdZ/uIrhHyiO1QHzWUQE+otMrfXc0XYq84EOOpg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wH0rlvaSdASKfwUdNQ7rUasljP306pvVXFxQz87GUHk=; b=EX/ZtvSkjYHmk+KlJXXnBlxLKW9hYRzT5Gqh5rRxW8F6qymWdXDTaoYLDoRXMSOrYN9r5thNBIWPrNYf0gKYlKkpcuV78wCIO5e3HV3kweufJZI/Zw/MSzpmc8tC+tDC03dChXCzLFUnrDoXmiijMoTOz7MbojlwAsNAQrBL4r0IenOgSpw4xsbF+81/JIBjgKGIvLwq+ALj6Pk2EROT/5ekfboNtNIzn/Wy0RSayqiFkbPXu/OdqxXH/EF6rJXS5ILa1dk3VVi87gTFtraHodqWJtboHt52PQW9uRzhvSUrvWG7h5o5j9eV4iagqAhOUq5uBR1MGs1wqyptUWlotA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=corigine.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wH0rlvaSdASKfwUdNQ7rUasljP306pvVXFxQz87GUHk=; b=RF29hPdNBYdh1ox6/6Qi79Hjct9I3OMlfsd4FQHaXDSI6AG6bmsDTu4sCDG/Ga5JP1Ja0vcCYY90wZa2PW8X8HhELvaeALXlovk4JiWpLzxaF4kQl2kVTgUZixdMw1wveUlm/YPJLvz8PBAud/u5oSazHrsUkHWM3VVDxws5+lc= Received: from DM6PR07CA0073.namprd07.prod.outlook.com (2603:10b6:5:337::6) by BYAPR02MB4630.namprd02.prod.outlook.com (2603:10b6:a03:5f::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.17; Thu, 16 Jun 2022 15:04:53 +0000 Received: from DM3NAM02FT013.eop-nam02.prod.protection.outlook.com (2603:10b6:5:337:cafe::b7) by DM6PR07CA0073.outlook.office365.com (2603:10b6:5:337::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.17 via Frontend Transport; Thu, 16 Jun 2022 15:04:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch02.xlnx.xilinx.com; pr=C Received: from xir-pvapexch02.xlnx.xilinx.com (149.199.80.198) by DM3NAM02FT013.mail.protection.outlook.com (10.13.5.126) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5353.14 via Frontend Transport; Thu, 16 Jun 2022 15:04:52 +0000 Received: from xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Thu, 16 Jun 2022 16:04:51 +0100 Received: from smtp.xilinx.com (172.21.105.197) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Thu, 16 Jun 2022 16:04:51 +0100 Envelope-to: jin.liu@corigine.com, dev@dpdk.org, niklas.soderlund@corigine.com, na.wang@corigine.com, peng.zhang@corigine.com, chaoyong.he@corigine.com Received: from [172.21.34.28] (port=28517) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1o1r3D-0007NE-Cw; Thu, 16 Jun 2022 16:04:51 +0100 Message-ID: <4faf17dc-4ea7-f9de-e77b-16fddfb6f4d7@xilinx.com> Date: Thu, 16 Jun 2022 16:04:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v2 08/15] net/nfp: support NFP3800 card Content-Language: en-US To: Jin Liu , CC: , Diana Wang , Peng Zhang , Chaoyong He References: <20220602015304.710197-1-jin.liu@corigine.com> <20220616023939.1798769-1-jin.liu@corigine.com> <20220616023939.1798769-9-jin.liu@corigine.com> From: Ferruh Yigit In-Reply-To: <20220616023939.1798769-9-jin.liu@corigine.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c3b5eb2f-3b05-472e-3955-08da4fa99114 X-MS-TrafficTypeDiagnostic: BYAPR02MB4630:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mK3JBigxcijMpfaxrh6zJvWMqADq6am7oBv/7lcTvWg7m3LAUTOXbQ/PIMRZAuAVJjOj+usU1V83fckJSj1ruYXmbxIMG7yO2jSkVugROBYryGCQTg3JEKNJT+nPQO9d81uG2DuLDO6R3A2GnqrZ4zeYswXioVEZy28I09r0nMbzbrMUOtPdEosHtXIDwhNHdvCX78JmwufB5baP0nt8H5JwSqiElf0vgsiqh4kns9eOzxWhW76T8KrarBm7J9DxPYLSi0+wa4B5moPMx0ZPC0bKPc7va8riedAAEBOHQs3+XnNn96GxnxXA0D65cdHjPV3KB6p/fh6JU4CyTuJDQyA1QEqUAFH1hE0kn6N8fnMFBsWNrgyoYz+yzkWAnD6a4wgZAZNB4uqyRTv4qYP9mNWItzwPIoVsWEIolCcxc35BePIsQbSRU9KsSC+UzaYI/uvXybK2kFFqQJmgFMBLPdL53PcQJ1Fer4Amu89i05jQeOEXRjUBn1liP0sc99Zjzl+V8Exj26SOwnvKbEtyjum4py63jaOYcfs7gjKcv+Tebyi5Kzg1Kkfi+6P724RbeIs3T4sK2Jzpu7VO1JUOOrOvD/WX9xhe3FjzkFm6kijjhnpcVJUEEpAP+H4tSAKofa6RWOjlXAJ3gD5d0ZEW3MI15fGy2eMxET3JAWdFZsrQKpEK5UK3VdBYvAxm4UId/v14KyMj6FKsmTwrYtiRjdOIP0vaQ6Q/Kg5kqkFtA+c= X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch02.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230016)(4636009)(46966006)(36840700001)(40470700004)(44832011)(31696002)(7636003)(2616005)(9786002)(356005)(5660300002)(426003)(70586007)(53546011)(8936002)(508600001)(82310400005)(83380400001)(36860700001)(70206006)(2906002)(31686004)(110136005)(336012)(4326008)(36756003)(26005)(66574015)(54906003)(316002)(8676002)(47076005)(186003)(40460700003)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 15:04:52.6248 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3b5eb2f-3b05-472e-3955-08da4fa99114 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM02FT013.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR02MB4630 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 6/16/2022 3:39 AM, Jin Liu wrote: > Add support for a new type of NIC NFP3800 card, and update some > network card data acquisition interface functions. > > Signed-off-by: Jin Liu > Signed-off-by: Diana Wang > Signed-off-by: Peng Zhang > Signed-off-by: Chaoyong He > Signed-off-by: Niklas Söderlund > --- > drivers/net/nfp/nfp_common.h | 33 +++++++++++++++++++++++++-- > drivers/net/nfp/nfp_ethdev.c | 28 ++++++++++++++++++++--- > drivers/net/nfp/nfp_ethdev_vf.c | 9 ++++++-- > drivers/net/nfp/nfpcore/nfp_cpp.h | 2 +- > drivers/net/nfp/nfpcore/nfp_nsp_eth.c | 20 ++++++++++++---- > 5 files changed, 79 insertions(+), 13 deletions(-) > > diff --git a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h > index 8e1b4fb6a4..274d188527 100644 > --- a/drivers/net/nfp/nfp_common.h > +++ b/drivers/net/nfp/nfp_common.h > @@ -16,9 +16,11 @@ > > #define NFP_NET_PMD_VERSION "0.1" > #define PCI_VENDOR_ID_NETRONOME 0x19ee > +#define PCI_DEVICE_ID_NFP3800_PF_NIC 0x3800 > +#define PCI_DEVICE_ID_NFP3800_VF_NIC 0x3803 > #define PCI_DEVICE_ID_NFP4000_PF_NIC 0x4000 > #define PCI_DEVICE_ID_NFP6000_PF_NIC 0x6000 > -#define PCI_DEVICE_ID_NFP6000_VF_NIC 0x6003 > +#define PCI_DEVICE_ID_NFP6000_VF_NIC 0x6003 /* Include NFP4000VF */ > > /* Forward declaration */ > struct nfp_net_adapter; > @@ -41,8 +43,16 @@ struct nfp_net_adapter; > #define NFP_QCP_QUEUE_STS_HI 0x000c > #define NFP_QCP_QUEUE_STS_HI_WRITEPTR_mask (0x3ffff) > > +#define NFP_PCIE_QCP_NFP3800_OFFSET 0x400000 > +#define NFP_PCIE_QCP_NFP6000_OFFSET 0x80000 > +#define NFP_PCIE_QUEUE_NFP3800_MASK 0x1ff > +#define NFP_PCIE_QUEUE_NFP6000_MASK 0xff > +#define NFP_PCIE_QCP_PF_OFFSET 0x0 > +#define NFP_PCIE_QCP_VF_OFFSET 0x0 > + > /* The offset of the queue controller queues in the PCIe Target */ > -#define NFP_PCIE_QUEUE(_q) (0x80000 + (NFP_QCP_QUEUE_ADDR_SZ * ((_q) & 0xff))) > +#define NFP_PCIE_QUEUE(_offset, _q, _mask) \ > + ((_offset) + (NFP_QCP_QUEUE_ADDR_SZ * ((_q) & (_mask)))) > > /* Interrupt definitions */ > #define NFP_NET_IRQ_LSC_IDX 0 > @@ -342,6 +352,25 @@ nfp_qcp_read(uint8_t *q, enum nfp_qcp_ptr ptr) > return val & NFP_QCP_QUEUE_STS_HI_WRITEPTR_mask; > } > > +static inline uint32_t nfp_pci_queue(struct rte_pci_device *pdev, uint16_t queue) > +{ One of the previous patch in this set fixes syntax like above, and this patch is adding more, can you please update as: static inline uint32_t nfp_pci_queue(struct rte_pci_device *pdev, uint16_t queue)