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 247B6425A3; Fri, 15 Sep 2023 11:16:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E259C402EC; Fri, 15 Sep 2023 11:16:19 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2125.outbound.protection.outlook.com [40.107.93.125]) by mails.dpdk.org (Postfix) with ESMTP id 0D8074029E for ; Fri, 15 Sep 2023 11:16:18 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mvms6b5HP2D5WyUPqACtGsVUwz+HmFoPpPoQKQici1sZH3VWofMKG8WXHUzApyTf8eYcG5UuMl60lOAEBBzF/va5rp9nrwCAaTkfd0Ow8Mx+zJ0RxlnKmO0PBzq2R2uCRERgGuQ0TVke9sY/bBjtgQpB5Ea/dAgKMvYuruaDShr8nigZz0F0jHi41yRcZgutpK82weQoNdDMpNcrRC5kSScsm0/QA4M8iCieV6ZCv/ZCsDkjYcW+qLNP1Iz4fLXviyPDkJdJ2pIdfHoig564EwMoiF0SF6znoqKAhQWDiy4A4vdr3eXlsqn9UbOweUaV8ByFPQMzbKuhhAZBbWBY1Q== 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=TbbLiz2+/9SyJ/Dd6NB8REaFPbuRNA6ujOBgV8rGDmQ=; b=lOBi2S/yCAckriMDBUFRj5N9gUs3wHQlgbcun70Zn5Cjj1v4kTR0SHc5vGwjxl7NOjBdYVRZDohZMYffJa1zuAp827euxoUckr0ctgyVMFXhaAAhS+H6M55QXyEV+bge9B0TQswGEfmnJsspQiQixoOqrtjx3XTGl53+Bqi27Diuod2+XQBwxJrQaEhTdGg5iBTYf7QkKooMtcPLT9L2hCy5Wi17D7uv3U7O5FvQj6vd2GXnMuHMSahcArfZWoW1bj3izCD62CG1QG7/Z+CSpK19qnngU6nc7IYscOMKSorDlrN5a5ccdaBm4hiqAAbbVzxuUB3afZMez4XDg4/rAQ== 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=TbbLiz2+/9SyJ/Dd6NB8REaFPbuRNA6ujOBgV8rGDmQ=; b=Q2VIbFPaLkPGuvLOy+hmX7AwDH27Kyvf+zOy/7IsAzMmFKd8TRN/cxiLzZMNKtXObREM17NnqlI53ygZqOTviGVckjDZC9gPA03qST4Plz/UkYSfIudM64L6Z2pcKpeS5mvcdTsVaCEP+NdfU0HkI24yBODNST+3Domcy4BQbyo= 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 DM6PR13MB3625.namprd13.prod.outlook.com (2603:10b6:5:241::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.21; Fri, 15 Sep 2023 09:16:15 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::c05c:6915:1628:70c4]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::c05c:6915:1628:70c4%7]) with mapi id 15.20.6768.029; Fri, 15 Sep 2023 09:16:15 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He Subject: [PATCH v3 00/27] refact the nfpcore module Date: Fri, 15 Sep 2023 17:15:24 +0800 Message-Id: <20230915091551.1459606-1-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230830021457.2064750-1-chaoyong.he@corigine.com> References: <20230830021457.2064750-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PH7PR10CA0017.namprd10.prod.outlook.com (2603:10b6:510:23d::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_|DM6PR13MB3625:EE_ X-MS-Office365-Filtering-Correlation-Id: 246dd3bf-ddd5-4a23-4598-08dbb5cc6947 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AHXdeA3H10ovpL6AeUMOQK8pmBMhKKoW9V+ujm5TH9u7w7CV/rSs0v/ovZhh6dhwtCbfFSj9OdS7cACFCJnJ5XuFlVgb9KDRKI6cv+daaNucmEqmtACz7UVa1ocZYLlMS9j1CCoCd4g0TOSeUn4D6FP0AKdvaA9XArGepP2M5cN6LZKgsim2530o+2uhQuRoQQV9Ms/NHBOQveHqm3//JIcdMYbE7QSRCjGBAfqZVDhgqGvGivvQjZga7st8mgNDyVjuKlWoyFMVF96svUtHTt3g13lHpXOt5Qnv+pd8FQ2XP9q8vZ4luZ/cGybbdWqj7EtgoPyHhyhR6NIGNK4W8ZRuIqqHUlXpcnYlXgVJ4lzQD2IQI+WxOVqyWK9xsumCYOu+UlRaFOUaLKXFt75tInqtQrXAKfJkdic7saIYDCLVOrqrBKeidE4nZb7ngS1l/wQcHIqy2o3hkGs0440CWrnAM9Vj0T7s8T5tyOXlkwQ1N70q+Imf2PQgImmeFCl0YYMQDpbz6f/5kkUy8bO68RNuBTKVrYjfceTXwalWAFV9DeoY+RPUbmuMVidUn/ZuWHf+LxNHNXrnU1Bt4ToAn8bK6dFLCDq4zZczUqQfCcjiPGsnkhCxbbuBi7xLCYg0mGrHeZZU85zwRR7WK7uCoLO6WygzizIvY7lRW8XfCGQ= 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)(346002)(376002)(396003)(366004)(136003)(186009)(1800799009)(451199024)(2906002)(86362001)(6512007)(52116002)(107886003)(2616005)(26005)(1076003)(478600001)(36756003)(6666004)(6506007)(6486002)(38350700002)(38100700002)(83380400001)(5660300002)(8676002)(8936002)(4326008)(41300700001)(66946007)(66476007)(66556008)(6916009)(316002)(44832011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RVRLMk9YK3Vvd2tOV3prVXhlSVFFcEoyak50MUVreitIcjlrT1ZJajZMSFlh?= =?utf-8?B?ODdWUk92azFJemYvR1ZpeXRVemxxZmtvL1FnUHNrc1ZERlg0dkFIckJtTThI?= =?utf-8?B?K2JFamhER2h5bzNGYy82ZE9RZnhxcENBTkV5akh4cnVqb1MyelhQWWR4WS9l?= =?utf-8?B?YXpna2N1M1pwTUR6V2JKZmNmbXlsekdRcmNzV3ZyRlpFc0I0UXNQMjlEVDNI?= =?utf-8?B?RVBhMDdBZWgvUSt2N1ZESXNLVmxFVEluL09xN0hqL2pLK1RsVXhtQmRTMk5Z?= =?utf-8?B?REZndFhQTHFLd2x5UTlCNXlraHRnbHMvYVRvWk80cUNWTnRjT1NyaXVGNjhD?= =?utf-8?B?QkdRbmt0ZHRLZ3pRa29iSVcrT3VPQzBOcURsNWRLa3N2WUI4RG9ZUUErWmJ6?= =?utf-8?B?SGZq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-Exchange-CrossTenant-Network-Message-Id: 246dd3bf-ddd5-4a23-4598-08dbb5cc6947 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2023 09:16:15.0672 (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: tZeXfiyHrrdcTEa/wj/Zek84zZEVKGDlMYZ2Z/UM3AvlpJM1KTqw4E0LSqIoJBR4aerUriW3UgeN+Zk83w9qw3AQwynvjCGH+aAVR/fGNN4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB3625 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. --- v3: * Fix one bug in the BAR find logic. * Modify more coding style. v2: * Fix the compile error in Fodora 37 environment. --- 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 | 1034 ++++++++++++++++ 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_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 | 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 | 210 ++-- 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 | 537 ++++---- 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 +-------- 40 files changed, 4102 insertions(+), 4053 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