[PATCH v5 01/22] eal: provide macro to expand marker extensions

Thomas Monjalon thomas at monjalon.net
Sat Feb 24 12:18:23 CET 2024


24/02/2024 11:51, Thomas Monjalon:
> 24/02/2024 09:21, Tyler Retzlaff:
> > RTE_MARKER typedefs are a GCC extension unsupported by MSVC. Provide a
> > new macro __rte_marker(type, name) that may be used to expand RTE_MARKER
> > empty in struct definitions when building with MSVC.
> 
> I don't think we need to define a new marker macro.
> I propose to simply not define them with MSVC, triggering a compilation error.
> So we keep the old markers for applications which were not using MSVC anyway.
> And inside DPDK libraries and drivers, we remove their usages.

One more thing to fix:
When padding is done on the marker, example:
	RTE_MARKER cacheline1 __rte_cache_min_aligned;
We need to move alignment on the first real field,
while keeping compatibility with the marker.
I'm afraid we need to have alignment done only once.

It may be difficult without using #ifdef inside the struct.

It's probably easier to replace alignment with explicit padding.




More information about the dev mailing list