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 5818C425C9; Mon, 18 Sep 2023 04:47:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EFEFE402DA; Mon, 18 Sep 2023 04:47:17 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2115.outbound.protection.outlook.com [40.107.244.115]) by mails.dpdk.org (Postfix) with ESMTP id D39C1402B1 for ; Mon, 18 Sep 2023 04:47:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jfpmHCVV+wl4XkwNs6xbiY6w6dPlJY2+s8WeK+qQeVWOQGU3pB6I7tSzLEzLSkW5tdq8eXZ1bml5D3DPyqGOr3EvzufagZcIUtVzlXS8eTMIWe9+NsFuCvwAEIumRm/Iueb+Ddl6nQUscKpB9zCBkT9bfaURwU/ljlkHvuAewZDeiTIkXnqFWRLHOzcH78cX2gXS6Q8vd687+JcjFFL6n/swZxpNhb7WEpkLD6SAUQXdQB7MXtcGlsDFCzGmHJM0V7ZOCE9btgV8z2uc/4Yk3C+nDdBaWqzFpx2Cg6d0unsVvDXROnwuXkqx1OHiFoBsJlleopxKc275U+XOIKcGYQ== 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=61DvlcApvsxEYp4Uw5VdpGPPSU1J0JbSnBeKqv25K/s=; b=eipo9y5ibd0WgEVvgF3ChtYAFM9aYxkAUj4+nPzbMxWVYwUyQralo+PlChkdvlr8DO+vDBnxY/gbHJMuv63iI1cq2/eJlODs0BYL71f9OAQTqFfwGPa22r5XS71bp9IcI1KICPKBE054LWM2RJSX23L0YV4r5j5p4QSIArn3B7UOlRjIpp17rxHDWeFpPKm3hvK7V+Wvg9NT4LhLkFTyKWnGIPXDwh4c4e110cBAy2DP9E7To8yv0nYHqv5O9xsY0z0uO4Kp7JXtGrg2Ma4uct8Wg+vI7Iefn+mWvw51bGT7oYk54+SfZiAYspY6Q2A+izAF5w9YCJ+HdESEpKQvEg== 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=61DvlcApvsxEYp4Uw5VdpGPPSU1J0JbSnBeKqv25K/s=; b=U5mJfv/4AXgzqtCUYXU3N5a5p4RX8I1w9BBtnuoN9YbSvYXIApEmhZk6WeL5uKx/Q/80mVyGKoMypgVsl+TVsa7oPMYxDl0JRq8cgegz32tfYyPhT1v9Lf6NkuFSGqdEDE9LPZw+rzkeO0kZf4eJaHKatCf8TDo8oCc7Ywt8E88= 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 PH7PR13MB6435.namprd13.prod.outlook.com (2603:10b6:510:2ea::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.26; Mon, 18 Sep 2023 02:47:13 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7a1c:2887:348a:84bd]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7a1c:2887:348a:84bd%6]) with mapi id 15.20.6792.026; Mon, 18 Sep 2023 02:47:12 +0000 From: Chaoyong He To: dev@dpdk.org Cc: Chaoyong He Subject: [PATCH v4 00/26] refact the nfpcore module Date: Mon, 18 Sep 2023 10:45:46 +0800 Message-Id: <20230918024612.1600536-1-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230915091551.1459606-1-chaoyong.he@corigine.com> References: <20230915091551.1459606-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SE2P216CA0016.KORP216.PROD.OUTLOOK.COM (2603:1096:101:114::20) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH7PR13MB6435:EE_ X-MS-Office365-Filtering-Correlation-Id: cfd80f0c-29bc-43b7-17b4-08dbb7f18f8e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7ztQBrMdRvjQh3ZLgKMZ2Mqa2JCRE6hxD4b7AretHJISokHyWjs+2VBiHZCFY3VSD9uVU/s0APTH9LON2VVTRtdjKQomKhuP4lTBLZ7DGPXueCGmWir6ghj3K7KeIIsPsA5oB96v8OUxVSW7VYx/+LrSNSismuHGPeML0uPo7NJvN/CZni0V88xGA8bRw2pNwx35E86FVr+msN3rwOODfft3fMFpK14jWdbngTobpft+NepVS6vawfjdCrB/C9RRRTFKTxlw5+todV5QyLWV7pA0dQ1dZ52OHw7EyyAu5GnhHceG9d0JhoAuVM6VhZPFTusFaHWvZtR7hhmk4MQ2sc6BCZgIV1nzy6VsPLsMmWRWpw642GuROnujkh2DR4x1t5j31uNnkGXcssvO1w7vJ9e2B6zopyeja7Gq8aD6kpRWreVrPaFzX+ZRjxRi1jGHCfVeehkjm5O5/p9/khkDFBhDHEg4GAcdL7uwmpxPJnjv4DqyGq9TKzH3AnSHT36GR1YdAkldKlQLHaCvF8bryiy2CPJPNy7c4mF2BB11JUq8tkrQ3NvyAxzYrw9Q0bF4lhD5EzVbqydmT71TAKXBC4Ay/mGYwmbZZOKRDVyKyuddIL5xzFtKuvzHvDBWEoDzWRWi6zDXpBm55b/ZMsCgWyf+DVn/V88W2/6/Ia/uVNc= 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)(136003)(346002)(366004)(376002)(396003)(1800799009)(451199024)(186009)(66476007)(66946007)(41300700001)(6916009)(316002)(8676002)(4326008)(8936002)(52116002)(6506007)(6486002)(6512007)(478600001)(6666004)(83380400001)(26005)(1076003)(2616005)(107886003)(86362001)(2906002)(44832011)(38100700002)(38350700002)(5660300002)(36756003)(66556008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YTFEZHBYL0ZmL0xVdGFuL2FpRnVhQkFsUnJNeFRTNTBZajQrVjQwSW5MU2tj?= =?utf-8?B?d1Qya05xd1BVMWtKV3AvL2xpQnptakIzeSthbXhTdFN6V2paTkZvcWVIS1lq?= =?utf-8?B?bGpmNzFMT2NEcG9ZVU9EeXd6dGdyd1JRTmNsMm9XYjhvb2gvQSs0a3BLV0F5?= =?utf-8?B?SEo3c0dSSVBRUkMwcDB6YTZNdkJnRVk5Wi81SzBYUEpsZkhmUEs5aEJVRzAy?= =?utf-8?B?ZVVYL242emZXYk8xUVVRUEZqSzlHOVlvU1c0Ti9YcWxmOFRKS2huU2pXN3Bx?= =?utf-8?B?ckFhclVZeGdsOE5NWWFWMlVaODhyVkVhT2w0dHNic1hQQnAwTCtZcGNXZm1z?= =?utf-8?B?d05SNzl0ckdxbVU2SlVGdU9QM1RSRFdoTDJ2blMxWFEwZUN1L1FMeGp3RVY2?= =?utf-8?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change-CrossTenant-Network-Message-Id: cfd80f0c-29bc-43b7-17b4-08dbb7f18f8e X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2023 02:47:12.8491 (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: o8QRdq4DxbKF/0O47C5Ajw5GgnVyjeHk22LBb2fA0fH9pCRQ5NgwL2GZlD4o3DbHG01ilZW5yng0SQ2TEEWn9lq6puL2aEEyfmpOusWdXKI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB6435 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 This patch series aims to: - Make the coding style satisfy with DPDK. - Sync the logic with kernel driver. - Make the sub-module more modular. - Extend the nfp configure BAR from 8 to 24. --- v4: * Drop the commit 'using the DPDK memory management API'. * Modify the commit message of 'standard the comment style'. * Revise some comment logic as the advice of reviewer. v3: * Fix one bug in the BAR find logic. * Modify more coding style. v2: * Fix the compile error in Fodora 37 environment. --- Chaoyong He (26): net/nfp: explicitly compare to null and 0 net/nfp: unify the indent coding style net/nfp: unify the type of integer variable net/nfp: remove the unneeded logic net/nfp: standard the local variable coding style net/nfp: adjust the log statement net/nfp: standard the comment style net/nfp: standard the blank character net/nfp: unify the guide line of header file net/nfp: rename some parameter and variable net/nfp: refact the hwinfo module net/nfp: refact the nffw module net/nfp: refact the mip module net/nfp: refact the rtsym module net/nfp: refact the resource module net/nfp: refact the target module net/nfp: add a new header file net/nfp: refact the nsp module net/nfp: refact the mutex module net/nfp: rename data field to sync with kernel driver net/nfp: add the dev module net/nfp: add header file for PCIe module net/nfp: refact the cppcore module net/nfp: refact the PCIe module net/nfp: refact the cppcore and PCIe module net/nfp: extend the usage of nfp BAR from 8 to 24 drivers/net/nfp/flower/nfp_flower.c | 12 +- .../net/nfp/flower/nfp_flower_representor.c | 6 +- drivers/net/nfp/meson.build | 3 +- drivers/net/nfp/nfd3/nfp_nfd3_dp.c | 5 +- drivers/net/nfp/nfdk/nfp_nfdk_dp.c | 5 +- drivers/net/nfp/nfp_common.c | 50 +- drivers/net/nfp/nfp_common.h | 52 +- drivers/net/nfp/nfp_cpp_bridge.c | 2 +- drivers/net/nfp/nfp_ethdev.c | 100 +- drivers/net/nfp/nfp_ethdev_vf.c | 17 +- drivers/net/nfp/nfp_rxtx.c | 5 +- drivers/net/nfp/nfp_rxtx.h | 12 - drivers/net/nfp/nfpcore/nfp6000/nfp6000.h | 20 - drivers/net/nfp/nfpcore/nfp6000_pcie.c | 1035 ++++++++++++++++ drivers/net/nfp/nfpcore/nfp6000_pcie.h | 20 + drivers/net/nfp/nfpcore/nfp_cpp.h | 776 +++--------- drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 824 ------------- drivers/net/nfp/nfpcore/nfp_cppcore.c | 1080 +++++++++++------ drivers/net/nfp/nfpcore/nfp_crc.c | 23 +- drivers/net/nfp/nfpcore/nfp_dev.c | 81 ++ drivers/net/nfp/nfpcore/nfp_dev.h | 44 + drivers/net/nfp/nfpcore/nfp_hwinfo.c | 193 ++- drivers/net/nfp/nfpcore/nfp_hwinfo.h | 74 +- drivers/net/nfp/nfpcore/nfp_mip.c | 97 +- drivers/net/nfp/nfpcore/nfp_mip.h | 7 +- drivers/net/nfp/nfpcore/nfp_mutex.c | 379 +++--- drivers/net/nfp/nfpcore/nfp_mutex.h | 25 + drivers/net/nfp/nfpcore/nfp_nffw.c | 202 +-- drivers/net/nfp/nfpcore/nfp_nffw.h | 66 +- drivers/net/nfp/nfpcore/nfp_nsp.c | 574 ++++++--- drivers/net/nfp/nfpcore/nfp_nsp.h | 336 ++--- drivers/net/nfp/nfpcore/nfp_nsp_cmds.c | 19 +- drivers/net/nfp/nfpcore/nfp_nsp_eth.c | 518 ++++---- drivers/net/nfp/nfpcore/nfp_platform.h | 42 + drivers/net/nfp/nfpcore/nfp_resource.c | 208 ++-- drivers/net/nfp/nfpcore/nfp_resource.h | 36 +- drivers/net/nfp/nfpcore/nfp_rtsym.c | 452 +++++-- drivers/net/nfp/nfpcore/nfp_rtsym.h | 67 +- drivers/net/nfp/nfpcore/nfp_target.c | 9 +- drivers/net/nfp/nfpcore/nfp_target.h | 597 +-------- 40 files changed, 4066 insertions(+), 4007 deletions(-) create mode 100644 drivers/net/nfp/nfpcore/nfp6000_pcie.c create mode 100644 drivers/net/nfp/nfpcore/nfp6000_pcie.h delete mode 100644 drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c create mode 100644 drivers/net/nfp/nfpcore/nfp_dev.c create mode 100644 drivers/net/nfp/nfpcore/nfp_dev.h create mode 100644 drivers/net/nfp/nfpcore/nfp_mutex.h create mode 100644 drivers/net/nfp/nfpcore/nfp_platform.h -- 2.39.1