On Wed, Mar 20, 2024 at 02:06:09PM -0700, Tyler Retzlaff wrote: > Add __rte_msvc_pushpack(1) to all __rte_packed structs to cause packing > when building with MSVC. > > Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com> > --- > app/test-pmd/csumonly.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c > index 6711dda..638e607 100644 > --- a/app/test-pmd/csumonly.c > +++ b/app/test-pmd/csumonly.c > @@ -89,6 +89,7 @@ struct testpmd_offload_info { > }; > > /* simplified GRE header */ > +__rte_msvc_pack > struct simple_gre_hdr { > uint16_t flags; > uint16_t proto;
Should not need to be packed, as no padding. However, if we don't mark this as packed could we hit problems if (for whatever reason) we ever receive a packet where the gre_hdr is not aligned on an even byte boundary? Does packing affect the minimum alignment requirements of the whole struct, as well as removing padding? /Bruce