Re: [PATCH net-next v13 4/4] net: dsa: add basic initial driver for MxL862xx switches
From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-02-06 02:21:19
Also in:
linux-devicetree, lkml
From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-02-06 02:21:19
Also in:
linux-devicetree, lkml
On Wed, 4 Feb 2026 13:33:19 +0000 Daniel Golle wrote:
+/* The switch firmware expects all structs to be byte-aligned */ +#pragma pack(push, 1)
"Byte-aligned" means..? Generally aligned means that it starts at an address which is multiple of X. All addresses are multiple of 1 We used you push back against blanket __packed because it's forcing all *host* accesses to also assume that the structures are unaligned. The best practice is to pack only specific structs which need it and add compile_assert()s to make sure that the compiler doesn't add any padding. There's a couple of AI nitpicks, since I'm already complaining I'll send these out too..