From patchwork Tue Mar 12 07:51:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 763 Return-Path: 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 1274E43C8E; Tue, 12 Mar 2024 08:51:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43C6040C35; Tue, 12 Mar 2024 08:51:53 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C913D402EA for ; Tue, 12 Mar 2024 08:51:50 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id E361820B74C0; Tue, 12 Mar 2024 00:51:49 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E361820B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710229909; bh=4LjbSHDhO22gFEuTD3B4+z+D7LR2/V75NoJDeUOBlcY=; h=From:To:Cc:Subject:Date:From; b=Duft44Y3937WtTLIKM3uM/C5rcNOtveIvDIeLs3iP52YBBJixCoEqnsci/Lf+kKZ8 Ye2fHGUglLbLSRD2p1VvQZ/yei2jUNz4mqmUBJ9pkMRyFJwqOCXITgiNkHh6chij79 HjUo13JAIBE5raLMpclRNg7wcnb9XEroa5U/dBRA= From: Tyler Retzlaff To: dev@dpdk.org Cc: Dmitry Kozlyuk , Thomas Monjalon , Bruce Richardson , David Marchand , Tyler Retzlaff Subject: [PATCH 0/3] RFC fix import/export MSVC data variables Date: Tue, 12 Mar 2024 00:51:45 -0700 Message-Id: <1710229908-31704-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 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 MSVC requires that data variables within DPDK to be explicitly exported and when consumed by applications be explicitly imported. Further, MSVC and the Microsoft Linker need additional information when exporting data variables that are thread local storage that cannot be conveyed through the version.map -> exports.def generation. The generation script has been updated to allow data exports to be excluded during a build with MSVC where the intent is to export them via the macros. This RFC series proposes per-library macro that can be used to mark the data variables for export so that when processed appropriate declaration of import or export is achieved either within the dpdk build or by a consuming application. I have only supplied an example series that uses the macro on a handful of variables to demonstrate their use, after feedback on the RFC all libs will have whatever method is arrived at applied to exported data variables. Thanks! Tyler Retzlaff (3): buildtools: ignore exports for MSVC eal: import and export data variables for MSVC ethdev: import and export data variables for MSVC buildtools/map_to_win.py | 13 +++++++++---- lib/eal/include/meson.build | 1 + lib/eal/include/rte_common.h | 8 ++++++++ lib/eal/include/rte_eal.h | 2 ++ lib/eal/include/rte_eal_export.h | 23 +++++++++++++++++++++++ lib/eal/include/rte_errno.h | 2 ++ lib/eal/version.map | 6 +++--- lib/ethdev/meson.build | 1 + lib/ethdev/rte_ethdev_core.h | 3 +++ lib/ethdev/rte_ethdev_export.h | 23 +++++++++++++++++++++++ lib/ethdev/version.map | 2 +- lib/meson.build | 6 ++++-- 12 files changed, 80 insertions(+), 10 deletions(-) create mode 100644 lib/eal/include/rte_eal_export.h create mode 100644 lib/ethdev/rte_ethdev_export.h