Message ID | 20220224232511.3238707-2-michaelba@nvidia.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Raslan Darawsheh |
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 E3546A034C; Fri, 25 Feb 2022 00:25:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CAA034114F; Fri, 25 Feb 2022 00:25:27 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2062.outbound.protection.outlook.com [40.107.243.62]) by mails.dpdk.org (Postfix) with ESMTP id AC9964114D for <dev@dpdk.org>; Fri, 25 Feb 2022 00:25:25 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lpCRMwEK7aWQSGKt6HbGxGfO4mBdrw8TnmO8EgvQNNiAbc0C7jnadiA1rUY3DPG+kcf95W6Y6PDB+Syga6Z1Ul5fVRMc8G6I71I7hQdja/qFtp4rC8y34AI9EOUbXITM9LFhohmgYtKy5979ayMMInS8C5b5A/18VO2dL+qRy7CpUWgXSeNts0I/9rII2D/g6gtvGZ20vLOErCdzSxicMH/BmFLYKOGIn6u4rTWVp2qQw1ju+uZq7o20+UcPDWxcnlcsejAQsbWb3/BVE5EJ/wJ/PR9JIeTdRUdyvbs+Askt44LKAmyAlT7xIkf68xGgvdqOVG6INSX6h/RV5w3CXA== 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=Fw80n82BmG4UET+24mgCDEuSjFl1JQkwflL11iM0AQI=; b=WLNk1x9NFSXD54m8OQgRUbToVlDAX0f/6DyHqD045e0ByVozCnwYMHOvE3GpvbV/MuovTVC1mWgR7qhxVkeCK1azyt2fzqpilPCdfeRnY48oPCry2adzGYLtw3iggdWqhx2pcrrpcejDaq0x002i/LprW4I3Tye4y4voTQFRjHO6mHAeTiTYHMNJX0NgMxs9ShyIlix8RBtMfciJULhF4G9m4Z93OV6uN5pnCxypOyI1DnttP55ifcadVKA47fUH3ubhylNKT/ruM2j8g/2A8ffEwk+HCWr092WuHcuWc42ZkKr3UwBYsWZgi/VLGf89K2Nd+4T3d5bKACMw3Qcs8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Fw80n82BmG4UET+24mgCDEuSjFl1JQkwflL11iM0AQI=; b=t9Z4Q3KDlD1Ij9gnHCCUkWOvEUoBsxPGWdjxPXfgHZTLvqKYpqjzF6fZX9L6xOgrxhQ+7xbJCj24dDIskxtrDrc3DrgdaEb7LnxhG7ihBEtWkMoWxqSKsItU97zXd7LC5/65bFuNTNMV1ppZJrVljXIXiPqPFVpsQ3nknlqGO8caBDPrOOa05Bw3it0HZQd6xQW7gGl7+YytXOUWFVBXYQN79qkI+9/VCgj/+Q3K0wQlZRx65kOoBo6jlPqASur+KrQiJKVYCC9JnsLpWJiX+2eR1By/O5ZG6+0Kse7CEZW4njXVnEEQ8A/Nu3hbtHK45xKdV42rZXYbGnzAZm1+YQ== Received: from MW4PR04CA0220.namprd04.prod.outlook.com (2603:10b6:303:87::15) by MW5PR12MB5684.namprd12.prod.outlook.com (2603:10b6:303:1a1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22; Thu, 24 Feb 2022 23:25:21 +0000 Received: from CO1NAM11FT063.eop-nam11.prod.protection.outlook.com (2603:10b6:303:87:cafe::bf) by MW4PR04CA0220.outlook.office365.com (2603:10b6:303:87::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.23 via Frontend Transport; Thu, 24 Feb 2022 23:25:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.238) by CO1NAM11FT063.mail.protection.outlook.com (10.13.175.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5017.22 via Frontend Transport; Thu, 24 Feb 2022 23:25:20 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 24 Feb 2022 23:25:19 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Thu, 24 Feb 2022 15:25:18 -0800 Received: from nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9 via Frontend Transport; Thu, 24 Feb 2022 15:25:17 -0800 From: Michael Baum <michaelba@nvidia.com> To: <dev@dpdk.org> CC: Matan Azrad <matan@nvidia.com>, Raslan Darawsheh <rasland@nvidia.com>, Viacheslav Ovsiienko <viacheslavo@nvidia.com> Subject: [PATCH v3 1/6] common/mlx5: consider local functions as internal Date: Fri, 25 Feb 2022 01:25:06 +0200 Message-ID: <20220224232511.3238707-2-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220224232511.3238707-1-michaelba@nvidia.com> References: <20220223184835.3061161-1-michaelba@nvidia.com> <20220224232511.3238707-1-michaelba@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d894dfd3-9422-4565-97d2-08d9f7ececdf X-MS-TrafficTypeDiagnostic: MW5PR12MB5684:EE_ X-Microsoft-Antispam-PRVS: <MW5PR12MB5684FEBEF215AD35D3240A6ECC3D9@MW5PR12MB5684.namprd12.prod.outlook.com> X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w5DV08f6cYccHDkyR1Xf9FOC3G9UVMET3PYpPa2bF3E5jp1sx27tgJ9tNYq9gaVYhRoCbMAB0vkbhDjPqzfJSnpZykI+cJXLOQGE/sXSMsdIQxgOfg1UfXqdUTmHQ87tceMX2ZnXa246QgXW0aGcA56tA6ZlxUpF1/pgLaXOPgltwzQJg0DCIZVQhEid7vDvH5+AdkZAX9TFF3LKaQtEzYmGlS3QAYh1pxtMCImbvnzBkBIbWMaFH6J16dUCJ39QzulI/7KUiikSw9ie1UNvV0esd4u2q6Rfj4yNWSnEiYMSHU4vv3shqnZC82P7+AJVu9xynwJHYk4U2GRIJVDrFQqxbJIawv6EcInXQrgTblnJGToszvst4et9/HAQKaPp2PwnHEUVivn1zA8dvGv4eZRSFxfH+zTCovGjrea0/LVVoBx7QcN0+mLaa2BAzvtdCd/uGyRoNhGrsNRNcE1kgG/2poQowymumQIDzVEEnMo67cR1oDjKmz3JhpOGsuhn7yQwhyOvnQMq/SR+ZwQLf7i2Pamp4RTGa5w1c2VUjb/lV1l80fLsy0vZ2TZ9Nht1YStamPq0dobZhuGD2UPnH7wm5x3asgyUmC6b7GboSRPeqa6ANvA6QjdcN3MPR/QybL/KUGDL+YnMlgtPxXUB5A0NMFtJZIV0oxR9WXDoBjKBGSrv9IT3Qoo+j36qdn2vkhVIvqZpKLCEn6wBB76S8w== X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(508600001)(54906003)(336012)(426003)(6286002)(186003)(316002)(2906002)(26005)(6916009)(86362001)(2616005)(40460700003)(47076005)(7696005)(55016003)(8936002)(8676002)(5660300002)(4326008)(70586007)(70206006)(82310400004)(356005)(1076003)(36756003)(107886003)(81166007)(36860700001)(6666004)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2022 23:25:20.6961 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d894dfd3-9422-4565-97d2-08d9f7ececdf X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT063.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR12MB5684 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 |
mlx5: external RxQ support
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/iol-testing | warning | apply patch failure |
Commit Message
Michael Baum
Feb. 24, 2022, 11:25 p.m. UTC
The functions which are not explicitly marked as internal were exported because the local catch-all rule was missing in the version script. After adding the missing rule, all local functions are hidden. The function mlx5_get_device_guid is used in another library, so it needs to be exported (as internal). Because the local functions were exported as non-internal in DPDK 21.11, any change in these functions would break the ABI. An ABI exception is added for this library, considering that all functions are either local or internal. Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com> --- devtools/libabigail.abignore | 4 ++++ drivers/common/mlx5/linux/mlx5_common_os.h | 1 + drivers/common/mlx5/version.map | 3 +++ 3 files changed, 8 insertions(+)
Comments
On 2/24/2022 11:25 PM, Michael Baum wrote: > The functions which are not explicitly marked as internal > were exported because the local catch-all rule was missing in the > version script. > After adding the missing rule, all local functions are hidden. > The function mlx5_get_device_guid is used in another library, > so it needs to be exported (as internal). > > Because the local functions were exported as non-internal > in DPDK 21.11, any change in these functions would break the ABI. > An ABI exception is added for this library, considering that all > functions are either local or internal. > When a function is not listed explicitly in .map file, it shouldn't be exported at all. So I am not sure if this exception is required, did you get warning for tool, or is this theoretical? cc'ed David and Ray for comment. > Signed-off-by: Michael Baum <michaelba@nvidia.com> > Acked-by: Matan Azrad <matan@nvidia.com> <...>
25/02/2022 19:01, Ferruh Yigit: > On 2/24/2022 11:25 PM, Michael Baum wrote: > > The functions which are not explicitly marked as internal > > were exported because the local catch-all rule was missing in the > > version script. > > After adding the missing rule, all local functions are hidden. > > The function mlx5_get_device_guid is used in another library, > > so it needs to be exported (as internal). > > > > Because the local functions were exported as non-internal > > in DPDK 21.11, any change in these functions would break the ABI. > > An ABI exception is added for this library, considering that all > > functions are either local or internal. > > > > When a function is not listed explicitly in .map file, it shouldn't > be exported at all. It seems we need local:* to achieve this behaviour. Few other libs are missing it. I plan to send a patch for them. > So I am not sure if this exception is required, did you get > warning for tool, or is this theoretical? It is not theoritical, you can check with objdump: objdump -T build/lib/librte_common_mlx5.so | sed -rn 's,^[[:xdigit:]]* g *(D[^0]*)[^ ]* *,\1,p' I did not check the ABI tool without the exception.
On 2/25/2022 6:38 PM, Thomas Monjalon wrote: > 25/02/2022 19:01, Ferruh Yigit: >> On 2/24/2022 11:25 PM, Michael Baum wrote: >>> The functions which are not explicitly marked as internal >>> were exported because the local catch-all rule was missing in the >>> version script. >>> After adding the missing rule, all local functions are hidden. >>> The function mlx5_get_device_guid is used in another library, >>> so it needs to be exported (as internal). >>> >>> Because the local functions were exported as non-internal >>> in DPDK 21.11, any change in these functions would break the ABI. >>> An ABI exception is added for this library, considering that all >>> functions are either local or internal. >>> >> >> When a function is not listed explicitly in .map file, it shouldn't >> be exported at all. > > It seems we need local:* to achieve this behaviour. > Few other libs are missing it. I plan to send a patch for them. > +1 for this patch, thanks. >> So I am not sure if this exception is required, did you get >> warning for tool, or is this theoretical? > > It is not theoritical, you can check with objdump: > objdump -T build/lib/librte_common_mlx5.so | sed -rn 's,^[[:xdigit:]]* g *(D[^0]*)[^ ]* *,\1,p' > > I did not check the ABI tool without the exception. > Yes tool complains with change [1], I will proceed with original patch. [1] 29 Removed functions: [D] 'function int mlx5_auxiliary_get_pci_str(const rte_auxiliary_device*, char*, size_t)' {mlx5_auxiliary_get_pci_str} [D] 'function void mlx5_common_auxiliary_init()' {mlx5_common_auxiliary_init} [D] 'function int mlx5_common_dev_dma_map(rte_device*, void*, uint64_t, size_t)' {mlx5_common_dev_dma_map} [D] 'function int mlx5_common_dev_dma_unmap(rte_device*, void*, uint64_t, size_t)' {mlx5_common_dev_dma_unmap} [D] 'function int mlx5_common_dev_probe(rte_device*)' {mlx5_common_dev_probe} [D] 'function int mlx5_common_dev_remove(rte_device*)' {mlx5_common_dev_remove} [D] 'function void mlx5_common_driver_on_register_pci(mlx5_class_driver*)' {mlx5_common_driver_on_register_pci} [D] 'function void mlx5_common_pci_init()' {mlx5_common_pci_init} [D] 'function mlx5_mr* mlx5_create_mr_ext(void*, uintptr_t, size_t, int, mlx5_reg_mr_t)' {mlx5_create_mr_ext} [D] 'function bool mlx5_dev_pci_match(const mlx5_class_driver*, const rte_device*)' {mlx5_dev_pci_match} [D] 'function int mlx5_dev_to_pci_str(const rte_device*, char*, size_t)' {mlx5_dev_to_pci_str} [D] 'function void mlx5_free_mr_by_addr(mlx5_mr_share_cache*, const char*, void*, size_t)' {mlx5_free_mr_by_addr} [D] 'function ibv_device* mlx5_get_aux_ibv_device(const rte_auxiliary_device*)' {mlx5_get_aux_ibv_device} [D] 'function void mlx5_glue_constructor()' {mlx5_glue_constructor} [D] 'function void mlx5_malloc_mem_select(uint32_t)' {mlx5_malloc_mem_select} [D] 'function void mlx5_mr_btree_dump(mlx5_mr_btree*)' {mlx5_mr_btree_dump} [D] 'function int mlx5_mr_create_cache(mlx5_mr_share_cache*, int)' {mlx5_mr_create_cache} [D] 'function void mlx5_mr_free(mlx5_mr*, mlx5_dereg_mr_t)' {mlx5_mr_free} [D] 'function int mlx5_mr_insert_cache(mlx5_mr_share_cache*, mlx5_mr*)' {mlx5_mr_insert_cache} [D] 'function mlx5_mr* mlx5_mr_lookup_list(mlx5_mr_share_cache*, mr_cache_entry*, uintptr_t)' {mlx5_mr_lookup_list} [D] 'function void mlx5_mr_rebuild_cache(mlx5_mr_share_cache*)' {mlx5_mr_rebuild_cache} [D] 'function void mlx5_mr_release_cache(mlx5_mr_share_cache*)' {mlx5_mr_release_cache} [D] 'function int mlx5_nl_devlink_family_id_get(int)' {mlx5_nl_devlink_family_id_get} [D] 'function int mlx5_nl_enable_roce_get(int, int, const char*, int*)' {mlx5_nl_enable_roce_get} [D] 'function int mlx5_nl_enable_roce_set(int, int, const char*, int)' {mlx5_nl_enable_roce_set} [D] 'function int mlx5_os_open_device(mlx5_common_device*, uint32_t)' {mlx5_os_open_device} [D] 'function int mlx5_os_pd_create(mlx5_common_device*)' {mlx5_os_pd_create} [D] 'function void mlx5_os_set_reg_mr_cb(mlx5_reg_mr_t*, mlx5_dereg_mr_t*)' {mlx5_os_set_reg_mr_cb} [D] 'function void mlx5_set_context_attr(rte_device*, ibv_context*)' {mlx5_set_context_attr} 2 Removed variables: [D] 'uint32_t atomic_sn' {atomic_sn} [D] 'int mlx5_common_logtype' {mlx5_common_logtype} 1 Removed function symbol not referenced by debug info: [D] mlx5_mr_dump_cache
diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index ef0602975a..78d57497e6 100644 --- a/devtools/libabigail.abignore +++ b/devtools/libabigail.abignore @@ -20,3 +20,7 @@ ; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is experimental [suppress_type] name = rte_crypto_asym_op + +; Ignore changes in common mlx5 driver, should be all internal +[suppress_file] + soname_regexp = ^librte_common_mlx5\. \ No newline at end of file diff --git a/drivers/common/mlx5/linux/mlx5_common_os.h b/drivers/common/mlx5/linux/mlx5_common_os.h index 83066e752d..edf356a30a 100644 --- a/drivers/common/mlx5/linux/mlx5_common_os.h +++ b/drivers/common/mlx5/linux/mlx5_common_os.h @@ -300,6 +300,7 @@ mlx5_set_context_attr(struct rte_device *dev, struct ibv_context *ctx); * 0 if OFED doesn't support. * >0 if success. */ +__rte_internal int mlx5_get_device_guid(const struct rte_pci_addr *dev, uint8_t *guid, size_t len); diff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map index 1c6153c576..cb20a7d893 100644 --- a/drivers/common/mlx5/version.map +++ b/drivers/common/mlx5/version.map @@ -80,6 +80,7 @@ INTERNAL { mlx5_free; + mlx5_get_device_guid; # WINDOWS_NO_EXPORT mlx5_get_ifname_sysfs; # WINDOWS_NO_EXPORT mlx5_get_pci_addr; # WINDOWS_NO_EXPORT @@ -149,4 +150,6 @@ INTERNAL { mlx5_mp_req_mempool_reg; mlx5_mr_mempool2mr_bh; mlx5_mr_mempool_populate_cache; + + local: *; };