Message ID | 20231024022849.3092506-1-chaoyong.he@corigine.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 10E6E431EB; Tue, 24 Oct 2023 04:29:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D925840298; Tue, 24 Oct 2023 04:29:40 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2104.outbound.protection.outlook.com [40.107.95.104]) by mails.dpdk.org (Postfix) with ESMTP id 548804014F for <dev@dpdk.org>; Tue, 24 Oct 2023 04:29:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CH5/iUx1UQ12BkvsVT2cFcKx2dSe2klSHMPGiEFvjY+ltGlTt2j3Ymw7zPmuY/ea+ruzGEak+8ZcGL9Rx0mMBIetd54OJM6wwUcwcbgHqvBlFDAQgpY5t7GwLDDpnLHF7kM/wz4gYi0s6yzPTxlyfQ2JpgAIXYxovOyfyZxOnYGPoVpBiBV6SZ+xd7tqH4iF3mgNZ038sdjr3D+9PQRLB1dRPolhv7H3VY3hEDxHOI+SqVTcp7E15XBAVpItua1HZMuMLcVm3JKVC8A7FjPNoimaO7ULq/6qrE9mDUa/D1Kh8qLWhhjrYU3rPUmvS76JNwjlK0Ih5a9zibpY8Ag6JQ== 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=HrP+wHkvoPcauRVEnObknbRZCKX4Pq7sJlQih3di/3w=; b=daeaBf5CSA8cJEN3/Bw5Qp7C9QiftZ46JGmHUig5cgZnldqhXWYnDKYdGi3JI4TVWUTRXj59PnObXhoN0ECO5cqkE4+O54M0hVQKkRfD1i9kCGQw7aWGpkUqjomF/UHCmzbkLq/tZ5NpPoZqOIJVun2rFVVVWcAnypffuSearUW6CG1EJ4sYQxBvRkkFp27h5gx/f02nSl0YHyK8YKVZwkjp0BtT4UXSYUm/T2sws3AynW58TjW9uP1erHc9mKa4mhVaK6LSVOP92lmqy7tjzQUFdRfrHEm3TDaGa6TlLeoDNUwGr8Xu4Xg/ABLTps3VxS3xfT+2agjH/Xx/M0ocLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HrP+wHkvoPcauRVEnObknbRZCKX4Pq7sJlQih3di/3w=; b=Hrkss4aixUjlb9N3npmLsW4VaKd++MkOyoTJurtAJws5RwroUpnRPJBZpiUhZ/1RR4mBrL527orivk1NhoM9gDQUROdldhCqXKEXqvp4TFHK6cRiludi8/OhOrQ1BddE/zmssnwuN1GIBn3IPTC9Lmco8TzxJY51YuYYETT+aTs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by BLAPR13MB4691.namprd13.prod.outlook.com (2603:10b6:208:306::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33; Tue, 24 Oct 2023 02:29:37 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::142e:d47c:7320:8a9d]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::142e:d47c:7320:8a9d%4]) with mapi id 15.20.6907.021; Tue, 24 Oct 2023 02:29:36 +0000 From: Chaoyong He <chaoyong.he@corigine.com> To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He <chaoyong.he@corigine.com> Subject: [PATCH v2 00/25] add the NFP vDPA PMD Date: Tue, 24 Oct 2023 10:28:24 +0800 Message-Id: <20231024022849.3092506-1-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231017054545.1692509-1-chaoyong.he@corigine.com> References: <20231017054545.1692509-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR04CA0015.namprd04.prod.outlook.com (2603:10b6:a03:40::28) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|BLAPR13MB4691:EE_ X-MS-Office365-Filtering-Correlation-Id: 6eea1330-6edf-404c-ce6e-08dbd43910dc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aME+pV3x0MJwj59O/kNmUfogV1nqLCc1znyMx0Zx8a4bJqfcSSgrC5m+qy561qNE6An2c7f5HSYkevvpFE7vMtWcAAmd5iUADjUbB5jDyZGQzKfPocgFQbw/n50kXhyE5EkOkeUQel44F5tsGVL2wUgAmho+2AUCQPnKHjrsJIHkFebP3TTYJJOTwgya5YUmO4qRl6GDg0o9C0vhLzV4GBmLbzm8QccPee2N3/+vk5YU/S+Hr+n62zC2hhE6t9gETjKCrixaX0iqEgI08pR0yX8cSA1P5cQjeVffjNPHvTBqM8zTetkGUD+lsVdgjuJKzc8BGfjfkqlLheOXFuknJF2VEAML++fdk8pXuFFXaFCjF6zxVdclvh9TyAjE5cldqQ2plOjgi0pXPvqrSvn1CjOYhV/DZxlvMC0d5+K7diRL4RKl8zpArbC2WZWNf+TPZabtUC0yV7ua6M2Txe9x6ffVaL8dH3ShnVNCCXdZJaspa6EIxrdVs+LKxArKCCgCqsSBri5C875IvGZJutKVegFJ+gLo2ov1KGuMlBMqBbJJ/z+XmCCf+fJ31BZkzJGMyTh5T0H9uBAepp2B5UbB0+D353O4EQbnEA7C143HjoofH1+zLlaEGCqwMI621ou5kStYUov5JN7QglPLFSqlpNGX75cuC8teXfG0+YWTbhw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39830400003)(366004)(376002)(346002)(396003)(136003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(83380400001)(38350700005)(2906002)(4326008)(8936002)(36756003)(44832011)(8676002)(26005)(52116002)(107886003)(2616005)(1076003)(38100700002)(6506007)(6666004)(6512007)(316002)(6916009)(478600001)(6486002)(5660300002)(66476007)(86362001)(41300700001)(66946007)(66556008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DXV7o1EJbMpPuvfZUY2uTuI3MkOe2zfL666uRFnEO3CoORirURhZKvNC6n1+UUIKDIJWswR1s5mWAjOfGBSRHTsNkWJdzcFXmRQevLf2J1XczYg9pDGTnWFAKhZ28azx+cJyagTJsKdnzPK7Jda/Nj6E1St/v87JM7/A2DuYJMHODCNbPfH/G6L+qVNxEj/qd5r91uU16OyKwiqmVX2iRp87iZf8760NDVj4ef2CMB7TdqLDmyoMHv4HN7m1TqViaNZUYHKXpafHGDIa3OGyKo+kxERYlEOHJ0lSQiMVKIys8JAiN3erR6HGfYXhT7wVPfHhF03eZEJ5hKOELgPmto8csxHtN0StvAMQ3Fdrs0e21u7ROhdsSH/oPl9PPWYJGNri2CgGa2tUwuUkSea50xp82LjT3u4HMwTZpOdReIHXmazrKoTxiEEAHLtAdKYhLocMvDeniQfxDdLIZn5qaGXva6izUMa99OMHyO0izRbJtHWNVvyQJaS3/9M9gUvQMs3O+q5a3nqWBk7TOe9c+iEK+vFeqxiDNYTUaeJPiYO9mX8Rs/3UvvgrtMOimHu2j+elviLIZaO44Jorl6QRWJZ5Dynt7u3JUIxPwCyuNxQDAaiDjiz43Mt0iyA1IE8GhSqKxI9/Uyp9SOh7mkcw9sxkwyrHYlHb9qJzx11o7c1Afj/WHYuoFjWTtGOwSMXtc71XOA7o+13ngt6bh3mX5lRmH3sTV0X9VKRkxtNxo/aNFl4uVqlk3jSWHg6ldpAase10yHCNWf060KY01+aTqHIaoT87MRuGlP3+l6JS1C+InSdOQKgCKO9Y9W9TwsavbQhvM3gUWdikCPC2l43NwsoKT9gFjqDTX6drAIKI2xAa3XqG1oj+utWgJYwsh1p0RE8gaweHvXgX90Kd5Z8VUD0EEJRv9Y7igyajYRFSfWkOtARb/RwK0ZjOLprtvLiR3SlIBDPQObvJH2Rpxzt/LNk1C7bFfDmk0yMxBSuuzt3D8OqVerO/sdENoqlLTTpljSw0hQ6ushiZpZuYG4Vjs34QIRiRRHqNpr9FnN1RxM5rsryA4Jee7I5QPIR+LudW5kxSkDDgaf7zO+004VPXF5ckauIosljk5euruMqtxl5T4pIDj40VKYhYLD3gLP7HsI3W/VXO/Ra/yK9yTiHhn727g1XP9Lkm1hQYZCAUKfDwX3skxBQlhvpZGEaLG5vPM4/Az/1y/QD4/5f9O4UTENvpNQ6ojAWTIWvXQGBUm268TMDgvsGj1uX1Iv+MwKQyhsMTHANsFJy96e/vicAI68n2hH5TpqLRtkX/r0ZB2b/vLFp2uB3mZsNqhYAvhVvLXwl41ijZr1S0Bt2JRpUT5VJQImL6EoM3DqC9o6tgTNcSQCszSho4b/dYMVOMgosYnquZ8JPNIKuxb3s2FPfWb+I9sf4j65WT0drE4fhXoX94uad0RWHHl+ZmpAVEo27a+7BquF1Thcf4VOKgqXVlbW99MCwQJKHuYbXU+aXkGMhYWbe0JrrTLEYSV00LUtkCf7RO9K7sIoEe3uha2hMUo3H1InM2tXD3Z+WU8yPs364hat3IbYy8s3natxxm7WLqPQ/kv32g96nOCmSEkUa3Qg== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6eea1330-6edf-404c-ce6e-08dbd43910dc X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2023 02:29:36.7365 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yPi7S6idgpHbkPamaEPd4VyAlJPy4kHQ6QbCfswLTZAGw/LcNDiePtyNdgfnGO1VS1+wHe8c6BTxMwtH09SWhluymMT1BvnCVHzpsnqKYQA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR13MB4691 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
add the NFP vDPA PMD
|
|
Message
Chaoyong He
Oct. 24, 2023, 2:28 a.m. UTC
This patch series aims to add the NFP vDPA PMD, we also grab the common logic into the `drivers/common/nfp` directory. --- v2: * Grab more logic into the `drivers/common/nfp` directory. * Delete some logic which should be when moving logic. --- Chaoyong He (25): drivers: introduce the NFP common library net/nfp: make VF PMD using of NFP common module net/nfp: rename common module name net/nfp: rename ctrl module name net/nfp: extract the cap data field net/nfp: extract the qcp data field net/nfp: extract the ctrl BAR data field net/nfp: extract the ctrl data field net/nfp: change the parameter of APIs net/nfp: change the parameter of reconfig net/nfp: extract the MAC address data field net/nfp: rename parameter in related logic drivers: add the common ctrl module drivers: add the nfp common module drivers: move queue logic to common module drivers: move platform module to common library drivers: move device module to common library drivers/vdpa: introduce the NFP vDPA library drivers: add the basic framework of vDPA PMD vdpa/nfp: add the logic of remap PCI memory vdpa/nfp: add the hardware init logic drivers: add the datapath update logic vdpa/nfp: add the notify related logic vdpa/nfp: add nfp vDPA device operations doc: add the common and vDPA document .mailmap | 1 + MAINTAINERS | 8 + doc/guides/platform/index.rst | 1 + doc/guides/platform/nfp.rst | 30 + doc/guides/rel_notes/release_23_11.rst | 5 + doc/guides/vdpadevs/features/nfp.ini | 8 + doc/guides/vdpadevs/index.rst | 1 + doc/guides/vdpadevs/nfp.rst | 54 ++ drivers/common/nfp/meson.build | 16 + drivers/common/nfp/nfp_common.c | 226 +++++ drivers/common/nfp/nfp_common.h | 239 +++++ .../nfp/nfp_common_ctrl.h} | 209 +--- drivers/common/nfp/nfp_common_log.c | 8 + drivers/common/nfp/nfp_common_log.h | 16 + drivers/common/nfp/nfp_common_pci.c | 275 ++++++ drivers/common/nfp/nfp_common_pci.h | 45 + .../{net/nfp/nfpcore => common/nfp}/nfp_dev.c | 3 +- .../{net/nfp/nfpcore => common/nfp}/nfp_dev.h | 3 + .../nfp/nfpcore => common/nfp}/nfp_platform.h | 0 drivers/common/nfp/version.map | 16 + drivers/meson.build | 1 + drivers/net/nfp/flower/nfp_flower.c | 56 +- drivers/net/nfp/flower/nfp_flower.h | 2 +- .../net/nfp/flower/nfp_flower_representor.c | 10 +- drivers/net/nfp/meson.build | 11 +- drivers/net/nfp/nfd3/nfp_nfd3_dp.c | 18 +- drivers/net/nfp/nfdk/nfp_nfdk_dp.c | 22 +- drivers/net/nfp/nfp_cpp_bridge.h | 2 +- drivers/net/nfp/nfp_ethdev.c | 80 +- drivers/net/nfp/nfp_ethdev_vf.c | 74 +- drivers/net/nfp/nfp_flow.h | 2 +- drivers/net/nfp/nfp_ipsec.c | 86 +- .../nfp/{nfp_common.c => nfp_net_common.c} | 493 ++++------ .../nfp/{nfp_common.h => nfp_net_common.h} | 219 +---- .../net/nfp/{nfp_ctrl.c => nfp_net_ctrl.c} | 21 +- drivers/net/nfp/nfp_net_ctrl.h | 211 ++++ drivers/net/nfp/nfp_rxtx.c | 20 +- drivers/net/nfp/nfpcore/nfp6000_pcie.h | 2 +- drivers/net/nfp/nfpcore/nfp_cppcore.c | 3 +- drivers/net/nfp/nfpcore/nfp_nsp.c | 2 +- drivers/net/nfp/nfpcore/nfp_nsp_eth.c | 3 +- drivers/vdpa/meson.build | 1 + drivers/vdpa/nfp/meson.build | 24 + drivers/vdpa/nfp/nfp_vdpa.c | 909 ++++++++++++++++++ drivers/vdpa/nfp/nfp_vdpa_core.c | 193 ++++ drivers/vdpa/nfp/nfp_vdpa_core.h | 51 + drivers/vdpa/nfp/nfp_vdpa_log.c | 9 + drivers/vdpa/nfp/nfp_vdpa_log.h | 21 + 48 files changed, 2769 insertions(+), 941 deletions(-) create mode 100644 doc/guides/platform/nfp.rst create mode 100644 doc/guides/vdpadevs/features/nfp.ini create mode 100644 doc/guides/vdpadevs/nfp.rst create mode 100644 drivers/common/nfp/meson.build create mode 100644 drivers/common/nfp/nfp_common.c create mode 100644 drivers/common/nfp/nfp_common.h rename drivers/{net/nfp/nfp_ctrl.h => common/nfp/nfp_common_ctrl.h} (63%) create mode 100644 drivers/common/nfp/nfp_common_log.c create mode 100644 drivers/common/nfp/nfp_common_log.h create mode 100644 drivers/common/nfp/nfp_common_pci.c create mode 100644 drivers/common/nfp/nfp_common_pci.h rename drivers/{net/nfp/nfpcore => common/nfp}/nfp_dev.c (98%) rename drivers/{net/nfp/nfpcore => common/nfp}/nfp_dev.h (96%) rename drivers/{net/nfp/nfpcore => common/nfp}/nfp_platform.h (100%) create mode 100644 drivers/common/nfp/version.map rename drivers/net/nfp/{nfp_common.c => nfp_net_common.c} (80%) rename drivers/net/nfp/{nfp_common.h => nfp_net_common.h} (64%) rename drivers/net/nfp/{nfp_ctrl.c => nfp_net_ctrl.c} (84%) create mode 100644 drivers/net/nfp/nfp_net_ctrl.h create mode 100644 drivers/vdpa/nfp/meson.build create mode 100644 drivers/vdpa/nfp/nfp_vdpa.c create mode 100644 drivers/vdpa/nfp/nfp_vdpa_core.c create mode 100644 drivers/vdpa/nfp/nfp_vdpa_core.h create mode 100644 drivers/vdpa/nfp/nfp_vdpa_log.c create mode 100644 drivers/vdpa/nfp/nfp_vdpa_log.h
Comments
On 10/24/2023 3:28 AM, Chaoyong He wrote: > This patch series aims to add the NFP vDPA PMD, we also grab the common > logic into the `drivers/common/nfp` directory. > > --- > v2: > * Grab more logic into the `drivers/common/nfp` directory. > * Delete some logic which should be when moving logic. > --- > > Chaoyong He (25): > drivers: introduce the NFP common library > net/nfp: make VF PMD using of NFP common module > net/nfp: rename common module name > net/nfp: rename ctrl module name > net/nfp: extract the cap data field > net/nfp: extract the qcp data field > net/nfp: extract the ctrl BAR data field > net/nfp: extract the ctrl data field > net/nfp: change the parameter of APIs > net/nfp: change the parameter of reconfig > net/nfp: extract the MAC address data field > net/nfp: rename parameter in related logic > drivers: add the common ctrl module > drivers: add the nfp common module > drivers: move queue logic to common module > drivers: move platform module to common library > drivers: move device module to common library > drivers/vdpa: introduce the NFP vDPA library > drivers: add the basic framework of vDPA PMD > vdpa/nfp: add the logic of remap PCI memory > vdpa/nfp: add the hardware init logic > drivers: add the datapath update logic > vdpa/nfp: add the notify related logic > vdpa/nfp: add nfp vDPA device operations > doc: add the common and vDPA document > Overall pretty clean set, but there are a few minor issues, commented on patches. Also can you please address checkpatch warnings: ### [PATCH] drivers: add the datapath update logic Warning in drivers/vdpa/nfp/nfp_vdpa.c: Using __atomic_xxx built-ins, prefer rte_atomic_xxx ### [PATCH] vdpa/nfp: add the notify related logic Warning in drivers/vdpa/nfp/nfp_vdpa.c: Using pthread functions, prefer rte_thread ### [PATCH] vdpa/nfp: add nfp vDPA device operations Warning in drivers/vdpa/nfp/nfp_vdpa.c: Using __atomic_xxx built-ins, prefer rte_atomic_xxx And some typos: vdpa/nfp: add nfp vDPA device operations opetation
> On 10/24/2023 3:28 AM, Chaoyong He wrote: > > This patch series aims to add the NFP vDPA PMD, we also grab the > > common logic into the `drivers/common/nfp` directory. > > > > --- > > v2: > > * Grab more logic into the `drivers/common/nfp` directory. > > * Delete some logic which should be when moving logic. > > --- > > > > Chaoyong He (25): > > drivers: introduce the NFP common library > > net/nfp: make VF PMD using of NFP common module > > net/nfp: rename common module name > > net/nfp: rename ctrl module name > > net/nfp: extract the cap data field > > net/nfp: extract the qcp data field > > net/nfp: extract the ctrl BAR data field > > net/nfp: extract the ctrl data field > > net/nfp: change the parameter of APIs > > net/nfp: change the parameter of reconfig > > net/nfp: extract the MAC address data field > > net/nfp: rename parameter in related logic > > drivers: add the common ctrl module > > drivers: add the nfp common module > > drivers: move queue logic to common module > > drivers: move platform module to common library > > drivers: move device module to common library > > drivers/vdpa: introduce the NFP vDPA library > > drivers: add the basic framework of vDPA PMD > > vdpa/nfp: add the logic of remap PCI memory > > vdpa/nfp: add the hardware init logic > > drivers: add the datapath update logic > > vdpa/nfp: add the notify related logic > > vdpa/nfp: add nfp vDPA device operations > > doc: add the common and vDPA document > > > > Overall pretty clean set, but there are a few minor issues, commented on > patches. > > > Also can you please address checkpatch warnings: > > ### [PATCH] drivers: add the datapath update logic > > Warning in drivers/vdpa/nfp/nfp_vdpa.c: > Using __atomic_xxx built-ins, prefer rte_atomic_xxx > Oh, Sorry, we choose '__atomic_xxx' because we see the document in https://doc.dpdk.org/guides/prog_guide/writing_efficient_code.html?highlight=atomic%20operations%20use%20c11%20atomic%20builtins#atomic-operations-use-c11-atomic-builtins. Maybe we misunderstood it, we will change to the `rte_atomic_xxx` in next version, thanks. > ### [PATCH] vdpa/nfp: add the notify related logic > > Warning in drivers/vdpa/nfp/nfp_vdpa.c: > Using pthread functions, prefer rte_thread > Okay, will revise in the next version. > ### [PATCH] vdpa/nfp: add nfp vDPA device operations > > Warning in drivers/vdpa/nfp/nfp_vdpa.c: > Using __atomic_xxx built-ins, prefer rte_atomic_xxx > > > And some typos: > vdpa/nfp: add nfp vDPA device operations > opetation Will change in next version, thanks.
> > On 10/24/2023 3:28 AM, Chaoyong He wrote: > > > This patch series aims to add the NFP vDPA PMD, we also grab the > > > common logic into the `drivers/common/nfp` directory. > > > > > > --- > > > v2: > > > * Grab more logic into the `drivers/common/nfp` directory. > > > * Delete some logic which should be when moving logic. > > > --- > > > > > > Chaoyong He (25): > > > drivers: introduce the NFP common library > > > net/nfp: make VF PMD using of NFP common module > > > net/nfp: rename common module name > > > net/nfp: rename ctrl module name > > > net/nfp: extract the cap data field > > > net/nfp: extract the qcp data field > > > net/nfp: extract the ctrl BAR data field > > > net/nfp: extract the ctrl data field > > > net/nfp: change the parameter of APIs > > > net/nfp: change the parameter of reconfig > > > net/nfp: extract the MAC address data field > > > net/nfp: rename parameter in related logic > > > drivers: add the common ctrl module > > > drivers: add the nfp common module > > > drivers: move queue logic to common module > > > drivers: move platform module to common library > > > drivers: move device module to common library > > > drivers/vdpa: introduce the NFP vDPA library > > > drivers: add the basic framework of vDPA PMD > > > vdpa/nfp: add the logic of remap PCI memory > > > vdpa/nfp: add the hardware init logic > > > drivers: add the datapath update logic > > > vdpa/nfp: add the notify related logic > > > vdpa/nfp: add nfp vDPA device operations > > > doc: add the common and vDPA document > > > > > > > Overall pretty clean set, but there are a few minor issues, commented > > on patches. > > > > > > Also can you please address checkpatch warnings: > > > > ### [PATCH] drivers: add the datapath update logic > > > > Warning in drivers/vdpa/nfp/nfp_vdpa.c: > > Using __atomic_xxx built-ins, prefer rte_atomic_xxx > > > > Oh, Sorry, we choose '__atomic_xxx' because we see the document in > https://doc.dpdk.org/guides/prog_guide/writing_efficient_code.html?highlig > ht=atomic%20operations%20use%20c11%20atomic%20builtins#atomic- > operations-use-c11-atomic-builtins. > Maybe we misunderstood it, we will change to the `rte_atomic_xxx` in next > version, thanks. As the notes in the 'doc/guides/rel_notes/deprecation.rst': --- rte_atomicNN_xxx: These APIs do not take memory order parameter. This does not allow for writing optimized code for all the CPU architectures supported in DPDK. DPDK has adopted the atomic operations from https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html. These operations must be used for patches that need to be merged in 20.08 onwards. This change will not introduce any performance degradation. --- The '__atomic_xxx' is the preferred choice? So maybe it's the 'checkpatches.sh' should update? And seems there are many logics using the '__atomic_xxx'. Spend some time and confused about this now. What is the right APIs I should use? Please make it clear, thanks. > > > ### [PATCH] vdpa/nfp: add the notify related logic > > > > Warning in drivers/vdpa/nfp/nfp_vdpa.c: > > Using pthread functions, prefer rte_thread > > > > Okay, will revise in the next version. > > > ### [PATCH] vdpa/nfp: add nfp vDPA device operations > > > > Warning in drivers/vdpa/nfp/nfp_vdpa.c: > > Using __atomic_xxx built-ins, prefer rte_atomic_xxx > > > > > > And some typos: > > vdpa/nfp: add nfp vDPA device operations > > opetation > > Will change in next version, thanks.
On 10/26/2023 3:50 AM, Chaoyong He wrote: >>> On 10/24/2023 3:28 AM, Chaoyong He wrote: >>>> This patch series aims to add the NFP vDPA PMD, we also grab the >>>> common logic into the `drivers/common/nfp` directory. >>>> >>>> --- >>>> v2: >>>> * Grab more logic into the `drivers/common/nfp` directory. >>>> * Delete some logic which should be when moving logic. >>>> --- >>>> >>>> Chaoyong He (25): >>>> drivers: introduce the NFP common library >>>> net/nfp: make VF PMD using of NFP common module >>>> net/nfp: rename common module name >>>> net/nfp: rename ctrl module name >>>> net/nfp: extract the cap data field >>>> net/nfp: extract the qcp data field >>>> net/nfp: extract the ctrl BAR data field >>>> net/nfp: extract the ctrl data field >>>> net/nfp: change the parameter of APIs >>>> net/nfp: change the parameter of reconfig >>>> net/nfp: extract the MAC address data field >>>> net/nfp: rename parameter in related logic >>>> drivers: add the common ctrl module >>>> drivers: add the nfp common module >>>> drivers: move queue logic to common module >>>> drivers: move platform module to common library >>>> drivers: move device module to common library >>>> drivers/vdpa: introduce the NFP vDPA library >>>> drivers: add the basic framework of vDPA PMD >>>> vdpa/nfp: add the logic of remap PCI memory >>>> vdpa/nfp: add the hardware init logic >>>> drivers: add the datapath update logic >>>> vdpa/nfp: add the notify related logic >>>> vdpa/nfp: add nfp vDPA device operations >>>> doc: add the common and vDPA document >>>> >>> >>> Overall pretty clean set, but there are a few minor issues, commented >>> on patches. >>> >>> >>> Also can you please address checkpatch warnings: >>> >>> ### [PATCH] drivers: add the datapath update logic >>> >>> Warning in drivers/vdpa/nfp/nfp_vdpa.c: >>> Using __atomic_xxx built-ins, prefer rte_atomic_xxx >>> >> >> Oh, Sorry, we choose '__atomic_xxx' because we see the document in >> https://doc.dpdk.org/guides/prog_guide/writing_efficient_code.html?highlig >> ht=atomic%20operations%20use%20c11%20atomic%20builtins#atomic- >> operations-use-c11-atomic-builtins. >> Maybe we misunderstood it, we will change to the `rte_atomic_xxx` in next >> version, thanks. > > As the notes in the 'doc/guides/rel_notes/deprecation.rst': > --- > rte_atomicNN_xxx: These APIs do not take memory order parameter. This does > not allow for writing optimized code for all the CPU architectures supported > in DPDK. DPDK has adopted the atomic operations from > https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html. These > operations must be used for patches that need to be merged in 20.08 onwards. > This change will not introduce any performance degradation. > --- > The '__atomic_xxx' is the preferred choice? So maybe it's the 'checkpatches.sh' should update? > And seems there are many logics using the '__atomic_xxx'. > > Spend some time and confused about this now. > What is the right APIs I should use? > Please make it clear, thanks. > Atomics usage got a few updates by time, if I remember correct: first there was DPDK rte_atomicNN_xxx APIs, later guidance updated to prefer compiler builtins, and recently guidance updated to use C11 defined functions. And now there are 'rte_atomic_xxx()' APIs, underneath they use "compiler builtins" or "C11 functions" based on 'enable_stdatomic' config option and of course tool-chain support. That is the reason of complexity in the checkpatch script. @Tyler, @David, @Honnappa, what is the latest, up to date, guidance in the atomic APIs usage? @Honnappa, is the deprecation notice Chaoyong highlighted still valid? Should we update it?
> On 10/26/2023 3:50 AM, Chaoyong He wrote: > >>> On 10/24/2023 3:28 AM, Chaoyong He wrote: > >>>> This patch series aims to add the NFP vDPA PMD, we also grab the > >>>> common logic into the `drivers/common/nfp` directory. > >>>> > >>>> --- > >>>> v2: > >>>> * Grab more logic into the `drivers/common/nfp` directory. > >>>> * Delete some logic which should be when moving logic. > >>>> --- > >>>> > >>>> Chaoyong He (25): > >>>> drivers: introduce the NFP common library > >>>> net/nfp: make VF PMD using of NFP common module > >>>> net/nfp: rename common module name > >>>> net/nfp: rename ctrl module name > >>>> net/nfp: extract the cap data field > >>>> net/nfp: extract the qcp data field > >>>> net/nfp: extract the ctrl BAR data field > >>>> net/nfp: extract the ctrl data field > >>>> net/nfp: change the parameter of APIs > >>>> net/nfp: change the parameter of reconfig > >>>> net/nfp: extract the MAC address data field > >>>> net/nfp: rename parameter in related logic > >>>> drivers: add the common ctrl module > >>>> drivers: add the nfp common module > >>>> drivers: move queue logic to common module > >>>> drivers: move platform module to common library > >>>> drivers: move device module to common library > >>>> drivers/vdpa: introduce the NFP vDPA library > >>>> drivers: add the basic framework of vDPA PMD > >>>> vdpa/nfp: add the logic of remap PCI memory > >>>> vdpa/nfp: add the hardware init logic > >>>> drivers: add the datapath update logic > >>>> vdpa/nfp: add the notify related logic > >>>> vdpa/nfp: add nfp vDPA device operations > >>>> doc: add the common and vDPA document > >>>> > >>> > >>> Overall pretty clean set, but there are a few minor issues, > >>> commented on patches. > >>> > >>> > >>> Also can you please address checkpatch warnings: > >>> > >>> ### [PATCH] drivers: add the datapath update logic > >>> > >>> Warning in drivers/vdpa/nfp/nfp_vdpa.c: > >>> Using __atomic_xxx built-ins, prefer rte_atomic_xxx > >>> > >> > >> Oh, Sorry, we choose '__atomic_xxx' because we see the document in > >> https://doc.dpdk.org/guides/prog_guide/writing_efficient_code.html?hi > >> ghlig > >> ht=atomic%20operations%20use%20c11%20atomic%20builtins#atomic- > >> operations-use-c11-atomic-builtins. > >> Maybe we misunderstood it, we will change to the `rte_atomic_xxx` in > >> next version, thanks. > > > > As the notes in the 'doc/guides/rel_notes/deprecation.rst': > > --- > > rte_atomicNN_xxx: These APIs do not take memory order parameter. This > does > > not allow for writing optimized code for all the CPU architectures supported > > in DPDK. DPDK has adopted the atomic operations from > > https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html. > These > > operations must be used for patches that need to be merged in 20.08 > onwards. > > This change will not introduce any performance degradation. > > --- > > The '__atomic_xxx' is the preferred choice? So maybe it's the > 'checkpatches.sh' should update? > > And seems there are many logics using the '__atomic_xxx'. > > > > Spend some time and confused about this now. > > What is the right APIs I should use? > > Please make it clear, thanks. > > > > Atomics usage got a few updates by time, if I remember correct: > first there was DPDK rte_atomicNN_xxx APIs, later guidance updated to prefer > compiler builtins, and recently guidance updated to use C11 defined > functions. > > And now there are 'rte_atomic_xxx()' APIs, underneath they use "compiler > builtins" or "C11 functions" based on 'enable_stdatomic' config option and of > course tool-chain support. > > That is the reason of complexity in the checkpatch script. > > @Tyler, @David, @Honnappa, what is the latest, up to date, guidance in the > atomic APIs usage? > > > > @Honnappa, is the deprecation notice Chaoyong highlighted still valid? > Should we update it? > Oh, sorry, I have found that we should use the <rte_stdatomic.h> header file, and I have sent out the v3 patch series, and it passed the check script. Thanks.