[PATCH v7 01/29] devtools: check packed attributes

Andre Muezerie andremue at linux.microsoft.com
Tue Dec 31 16:12:18 CET 2024


On Sat, Dec 28, 2024 at 04:13:28PM +0100, Morten Brørup wrote:
> > From: Andre Muezerie [mailto:andremue at linux.microsoft.com]
> > Sent: Monday, 23 December 2024 20.12
> > 
> > Ensure __rte_packed_begin and __rte_packed_end show up in pairs
> > when checking patches.
> > 
> > Signed-off-by: Andre Muezerie <andremue at linux.microsoft.com>
> > Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> > ---
> 
> With GCC, __rte_packed could also be used with enums [1], to reduce their size.
> 
> The release notes coming with this patch series should mention that this is no longer possible.
> 
> Suggest that this script also checks that __rte_packed_begin is not preceded by "enum" (and whitespace).
> (A structure packed with __rte_packed_begin might also be __rte_aligned(), and these two attributes may come in any order, so checking for "struct"+whitespace would introduce an ordering requirement for these two attributes.)
> 
> [1] https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-packed-type-attribute

Thanks for the suggestions. I'll add some tests to the script.


More information about the dev mailing list