Re: [EXT] Re: [net-next PATCH v3] octeon_ep: pack hardware structure

From: Jakub Kicinski
Date: Thu Oct 19 2023 - 15:51:15 EST


On Thu, 19 Oct 2023 18:46:09 +0000 Shinas Rasheed wrote:
> Since these structures represent how hardware expects data, there can
> be a lack of alignment.

Doesn't the host allocate at least most of those?
Therefore controlling the alignment?

> I'm afraid static asserting all the hardware data structures might
> force some compilers to fail?

C has structure packing rules which mean that in 99.9999% of the cases
none of your structs need explicit packing. For the 0.0001% of arches
breaking build is fine.

At least that's my guess, again, I wasn't the one who rejected the
patch. I just noticed it was dropped in patchwork and made a guess
based on past experience.