Re: [net-next PATCH v3] octeon_ep: pack hardware structure
From: Jakub Kicinski
Date: Wed Oct 18 2023 - 20:06:12 EST
On Mon, 16 Oct 2023 02:20:51 -0700 Shinas Rasheed wrote:
> Clean up structure defines related to hardware data to be
> attributed 'packed' in the code, as padding is not allowed
> by hardware.
Looks like the patch was marked as Changes Requested in pw.
I'm guessing it's because we generally discourage __packed.
It's better to add size asserts, e.g.:
static_assert(sizeof(struct octep_oq_desc_hw) == 16);
__packed also implies lack of alignment, which may force compiler
to generate worse code.