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 74C95430EF; Thu, 24 Aug 2023 13:10:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C24040EE1; Thu, 24 Aug 2023 13:10:52 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2139.outbound.protection.outlook.com [40.107.220.139]) by mails.dpdk.org (Postfix) with ESMTP id 13BBC40150 for ; Thu, 24 Aug 2023 13:10:50 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UHTFaBjRqZsBizOBK38Bl50P+aF7HE4X/k7O2VGLRF3rxXi4OX4j/zQs8T235adGqUUd05pNhjFiIQRW3KS6ZT4XbcvTEKEGoQPwGXYaYA5wTWXAE6eGMozEbZhlUWcuqwNUk8oYTYAm79cQhakqWW8Go29HA4WJkbC50M8DcCNMnLCwvrSNPCMX5OCnMHAiHcrVCoPdLcvRAUpde6548jSBFFYuTohd7UKbj7FqahXcGu7pBo8KEuy8rKvHz9CJSQnihSCgXVl4wmbooEvV5QYMhUtmYIEZ0dGRCfpE32mXx9vhjmfnMs0/bCA4ywl2YQga9YfMKwFTShU4ea3eLA== 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=UHqnmt+CGhjXAizU2Lav6+rouLX55Z3wcW/bn4JetFE=; b=PQnYP0gQu4/+dSgzc72ddypD7kBtYuTtBLe4MSIwcrOM34qjs/TOnyfEhLLdW5vDhNUe55dnihqmMzT1gZ29mC1Lx3us4nL11HEyJcJjZQL2JHFBtBZdy3k5GWqcKO18VpepgHVxrQTzMs8W1jBAGo3O1/y7EgyCP59RPR48oKlCPHQSaHKRdEnlt7ENXQQcbzBGGY/6ZZxdJ/250D4HwJEzr0HvTfKqkg6oLPMsySpPMIM8cCB7oxrSMd74Rym5+eHwiaZWAc8zTPBsW2Zw0UpVmxwYI05QRFCVxhtgBcvDhdPnCsjGgYt6WV/6aZOg99BosEC3zLxn8ESOgEcdlA== 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=UHqnmt+CGhjXAizU2Lav6+rouLX55Z3wcW/bn4JetFE=; b=dBSgxLsHqxLKTtKAxAw3sgLf0Seot0vnzE5z6YCjN0G06YOMuR9mqLU3t7YNmL8A/+F8N0RjDOYRuZd8I0FmZwXfLf8WDhVKeGYgCOtHLO7CV//FUWvderRf5fhfWzWR7IOGpX9EunS7XIfP27A/FHjWCOHIBPGuL+gjM4/jKT4= 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 PH0PR13MB6134.namprd13.prod.outlook.com (2603:10b6:510:295::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.26; Thu, 24 Aug 2023 11:10:46 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::51fe:5846:af8b:bace]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::51fe:5846:af8b:bace%3]) with mapi id 15.20.6699.020; Thu, 24 Aug 2023 11:10:46 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH 00/27] refact the nfpcore module Date: Thu, 24 Aug 2023 19:09:29 +0800 Message-Id: <20230824110956.1943559-1-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0PR05CA0005.namprd05.prod.outlook.com (2603:10b6:a03:33b::10) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH0PR13MB6134:EE_ X-MS-Office365-Filtering-Correlation-Id: 18d0d40d-d065-4c00-562e-08dba492c38c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PxfRTQcxCXdKqf13JLUdIaSQj4eo03zB7P8fhlp945yQjVshbHu+/Lv84MkUxAS2GcvLSCF6ya7RHlOMh587XlC1eNTsDzrwlkTor8j7e8BHEcadHL6DgQV2aLEShlzfQEDUyv7eS8Pg04EYyoNiP9b1oET/m4pN8ZZlg3LEPvVOf2mwjuTikLVzFEcgMA8myc5qTYJTVH1KKlGrQ/+6misKTuMm1XuLOubfrkRINGD3LG+e7U2PCOHXUIr4W1zPL0bHKR07tPrqCDKEOrZkYJGU0XcPZgpX6V23wjCR2eyPVbGnJwHMzHIX3wJsptNB6enV37H4kE6OoOpnNyCQHLiJCNv/1e/qu+PImsX10mWFgT5MK7ZLEASZhRzcFC3ts7lYtmfcjzk9XInALrLtYpZsoJ/1dr3AKh3tdhqoM+N+9eYrhvjkuVNtB2j4KwTiu7FzouD3pOIgrk9sSe+LkRcVBY5wb9z8ZIvl8vjM+TelpkHQZ3HAvvqst0Ik9XHUjn+hDN9puyMUqIPrBY/N54s9MnAF6yD4hBoxs87u9B8+CLUlq/mIGlH38cST+ZyuVPJnV008A+DdkLrWoHa7XNnfEtObN3hP2kGUqu2iuCAwRp9iwlwTsVOFPkDLsfSS8FIdo3NuZjRirPi01oOSeSm/whFQ6IofDAFtgBlE2E0cyeLCs3C3oq5f5yeXa1a8 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)(346002)(396003)(366004)(136003)(376002)(39830400003)(1800799009)(451199024)(186009)(316002)(66556008)(6916009)(66946007)(66476007)(12101799020)(41300700001)(44832011)(5660300002)(8936002)(8676002)(38100700002)(38350700002)(4326008)(2906002)(83380400001)(26005)(86362001)(478600001)(107886003)(52116002)(36756003)(6506007)(6666004)(6512007)(6486002)(2616005)(1076003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ak9SY3dXRHIxSkhrandCZlQwbjNwNzdEUU1qbGlUdnFSL2hGZ3NpT2huZHJj?= =?utf-8?B?UTA2OVpOd0ZWdmx5ZmZLanVSak9Kak00ZHNGQmNkV0xhUTZzVldIV2VmV2ZG?= =?utf-8?B?ZnMwZ0hqaEJWZitMc3BFYlNyUndwNUlqeWc2K2hIUFVGbWgwTXpEektHZitp?= =?utf-8?B?WHVWMjh5NzRFMjFpMHk5WmVkc0JuMERVZzNudWtWSmxETXZ5VmtPSzhSaFJ0?= =?utf-8?B?RTEvd1hSVGpSZ2dxMlBLamw3RU9va0FHbGw2eXlXS25BTmx3S1plTE5kVWNy?= =?utf-8?B?azgzSDRwVXBSbVNiY1pxRWdzaGRxVkZ4dVVEVFViekRPeURKM1UwR0ZDVlYr?= =?utf-8?B?S1MxaUM2MGNQQk95K2lQQ1dYY1dvM2psU3JGbGZKV3h3azZtbE9VOTAxQ2Rh?= =?utf-8?B?bzh2YVhITXJqakFNak1zMXlzV0IwRG9u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YalZuTUptREhZbE83Z1E1UENYNmZNMDMyeG10c0hsc3gw?= =?utf-8?B?OTJxOWFzUk5maE9zZVJWdmY4a0hjd0xwZ3RtRytic1pScFg3dWRVMnZPYUNt?= =?utf-8?B?cGlRMDJxd0o0NmJScjdWRUNoaWZHalk0emxuU1czcW5JelV5ZncyUFJqbmJT?= =?utf-8?B?bTBJLzJnWktMSU8vSUFZUkJmNysraGRvYjZJaUF3TjM0MWtBNVgxK2dWR3N6?= =?utf-8?B?NXNSaHBlRDlXN2R1d3g3R2hscFV6OGIwL2lPbWhVRnIrTFdNVVo4cCsvNGR3?= =?utf-8?B?R1hJUXhlUHVkdVZQQlQ2RkEwUkVRU0VuMDlzVEpaNWhzWkJFNGNEZllreWdR?= =?utf-8?B?b2VocGMxUGhGNTg4MGR1MFU4dnU5dlFLQ1FRdDlXSXRsTVNaMEowSENrLzUz?= =?utf-8?B?bXdGOWhWRjZiYXk3U014TS9ZWDQxSzlqd2Z3S1l5QnJYeHRjbmMwR3ptZzMy?= =?utf-8?B?alh2UWVHa1hZWWZQVFd1VEhLK2c0UjV4UmQxR3Fxck95aHhnUDdVWjBBTmpi?= =?utf-8?B?eXNnVWMxeG9WSEdhbU9KTFV4R3p0b3hGdVRZRUJzOWVFOVU2cC8rYi9Eekw0?= =?utf-8?B?MGtMZVNXdElzemRUOEt3c0VGbUVqYzk3Zk9EamJXajZLbktSNUhrWHcySEhx?= =?utf-8?B?ZXNEMmdJOUQzQk9WbmhDZjNyZ2o2ajN2VENqMGQwclNUeFhHa1BRQndtZXUr?= =?utf-8?B?YmQwamRBdFViMHFoWFBvNGFvdElvbWlwWVdSUTZOQitLZzJlWW5Kb05pdlps?= =?utf-8?B?V001UjVteGtkVVlFRUk2VWdwdVBUb1Fmd2tncEFFL21qWmJjNk92Vi82RjRI?= =?utf-8?B?Qmc9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18d0d40d-d065-4c00-562e-08dba492c38c X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2023 11:10:45.9656 (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: /7eAVrNM9l2WbRY/r/Y5aGA08+WBFkJlC83k9KVByJzuie/cKEsbb87N9CKRSJgChkpGDSJ0xDDGlAZt62O4+PN8y17acWOiVpWnhjF35DI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR13MB6134 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. Chaoyong He (27): 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: using the DPDK memory management API 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 | 14 +- .../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 | 108 +- 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 | 1031 ++++++++++++++++ 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 | 1088 +++++++++++------ drivers/net/nfp/nfpcore/nfp_dev.c | 81 ++ drivers/net/nfp/nfpcore/nfp_dev.h | 44 + drivers/net/nfp/nfpcore/nfp_hwinfo.c | 199 ++- drivers/net/nfp/nfpcore/nfp_hwinfo.h | 74 +- drivers/net/nfp/nfpcore/nfp_mip.c | 103 +- drivers/net/nfp/nfpcore/nfp_mip.h | 7 +- drivers/net/nfp/nfpcore/nfp_mutex.c | 383 +++--- drivers/net/nfp/nfpcore/nfp_mutex.h | 25 + drivers/net/nfp/nfpcore/nfp_nffw.c | 207 ++-- drivers/net/nfp/nfpcore/nfp_nffw.h | 66 +- drivers/net/nfp/nfpcore/nfp_nsp.c | 580 ++++++--- drivers/net/nfp/nfpcore/nfp_nsp.h | 336 ++--- drivers/net/nfp/nfpcore/nfp_nsp_cmds.c | 27 +- drivers/net/nfp/nfpcore/nfp_nsp_eth.c | 534 ++++---- drivers/net/nfp/nfpcore/nfp_platform.h | 42 + drivers/net/nfp/nfpcore/nfp_resource.c | 216 ++-- 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 +-------- 39 files changed, 4080 insertions(+), 4043 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