[PATCH v3 00/11] msvc integration changes
Tyler Retzlaff
roretzla at linux.microsoft.com
Thu Apr 6 02:45:08 CEST 2023
In accordance with draft plan
http://mails.dpdk.org/archives/web/2023-February/002023.html
introduces conditionally compiled code to enable building with MSVC that
_does not_ require C99/C11 meaning it can be integrated now.
This series covers minimal changes for item #2 in draft plan for EAL
dependencies kvargs, telemetry and consumed EAL public headers.
Note if any patch in the series requires in-depth discussion I'll
detach it from this series for separate submission & more focused
discussion so it doesn't block the entire series.
v3:
* v3 does not group together conditional blocks when experimented
with it didn't reduce conditionals enough to make it worth
while. once msvc tests are at a running point i suggest
a narrow targeted discussion about code organization without
blocking this series
* v3 does not attempt to refactor to use intrinsics for non-msvc
compilers. again this should be done as a separate follow-up
series later if desired
* fix expansion of likely and unlikely macros
* remove unnecessary define for rte_smp_{r,w}mb it is sufficient
for these to be compiler barriers on x86
* add a new patch to use __cpuid and __cpuidex intrinsics when
building with msvc
* add a new patch to use _umonitor, _umwait and _tpause intrinsics
when building with msvc
v2:
* use _mm_{l,s,m}fence intrinsics for rte_smp_{r,w,}mb macros
are intended to be memory barriers not compiler barriers on
x86_64.
Tyler Retzlaff (11):
eal: use rdtsc intrinsic when compiling with msvc
eal: use rtm and xtest intrinsics when compiling with msvc
eal: use barrier intrinsics when compiling with msvc
eal: use cpuid and cpuidex intrinsics
eal: use umonitor umwait and tpause intrinsics
eal: typedef cpu flag enum as int for msvc
eal: hide GCC extension based alignment markers
eal: expand most macros to empty when using msvc
eal: exclude exposure of rte atomic APIs for MSVC builds
telemetry: disable json print formatting with msvc
telemetry: avoid expanding versioned symbol macros on msvc
lib/eal/include/generic/rte_atomic.h | 11 ++++++++++
lib/eal/include/generic/rte_cpuflags.h | 12 ++++++-----
lib/eal/include/rte_branch_prediction.h | 8 +++++++
lib/eal/include/rte_common.h | 37 +++++++++++++++++++++++++++++++++
lib/eal/include/rte_compat.h | 20 ++++++++++++++++++
lib/eal/x86/include/rte_atomic.h | 9 +++++++-
lib/eal/x86/include/rte_cycles.h | 8 +++++++
lib/eal/x86/include/rte_rtm.h | 19 +++++++++++++++++
lib/eal/x86/rte_cpuflags.c | 4 ++++
lib/eal/x86/rte_cpuid.h | 7 +++++++
lib/eal/x86/rte_cycles.c | 36 ++++++++++++++++++++++++++++++++
lib/eal/x86/rte_hypervisor.c | 4 ++++
lib/eal/x86/rte_power_intrinsics.c | 12 +++++++++++
lib/telemetry/telemetry_data.c | 16 ++++++++++++++
lib/telemetry/telemetry_json.h | 6 ++++++
15 files changed, 203 insertions(+), 6 deletions(-)
--
1.8.3.1
More information about the dev
mailing list