On Tue, Dec 31, 2024 at 7:40 PM Andre Muezerie <andre...@linux.microsoft.com> wrote: > > MSVC struct packing is not compatible with GCC. Replace macro > __rte_packed with __rte_packed_begin to push existing pack value > and set packing to 1-byte and macro __rte_packed_end to restore > the pack value prior to the push. > > Macro __rte_packed_end is deliberately utilized to trigger a > MSVC compiler warning if no existing packing has been pushed allowing > easy identification of locations where the __rte_packed_begin is > missing. > > Signed-off-by: Andre Muezerie <andre...@linux.microsoft.com>
Just a heads up to the GVE driver maintainers. This patch touches drivers code when it comes to packing structures. So far the GVE *base* driver was relying on the __packed (kernel) construct. For MSVC support, Andre introduces __rte_packed_begin/end macros. Please shout if you are against those changes on this base driver code. Thanks. -- David Marchand