Linux CAN drivers development
 help / color / mirror / Atom feed
* [PATCH 0/3] can: raw: optimize the sizes of struct uniqframe and struct raw_sock
@ 2025-09-15  9:23 Vincent Mailhol
  2025-09-15  9:23 ` [PATCH 1/3] can: raw: reorder struct uniqframe's members to optimise packing Vincent Mailhol
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Vincent Mailhol @ 2025-09-15  9:23 UTC (permalink / raw)
  To: Oliver Hartkopp, Marc Kleine-Budde
  Cc: linux-can, linux-kernel, Vincent Mailhol

A few bytes can be shaved out of can raw's struct uniqframe and struct
raw_sock.

Patch #1 reorders struct uniqframe fields to save 8 bytes.

Patch #2 and #3 modify struct raw_sock to use bitfields and to reorder
its fields to save 16 bytes in total.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
Vincent Mailhol (3):
      can: raw: reorder struct uniqframe's members to optimise packing
      can: raw: use bitfields to store flags in struct raw_sock
      can: raw: reorder struct raw_sock's members to optimise packing

 net/can/raw.c | 51 ++++++++++++++++++++++++++++++---------------------
 1 file changed, 30 insertions(+), 21 deletions(-)
---
base-commit: 5b5ba63a54cc7cb050fa734dbf495ffd63f9cbf7
change-id: 20250915-can-raw-repack-c21aab25cc11

Best regards,
-- 
Vincent Mailhol <mailhol@kernel.org>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-09-17  4:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-15  9:23 [PATCH 0/3] can: raw: optimize the sizes of struct uniqframe and struct raw_sock Vincent Mailhol
2025-09-15  9:23 ` [PATCH 1/3] can: raw: reorder struct uniqframe's members to optimise packing Vincent Mailhol
2025-09-15 10:18   ` Oliver Hartkopp
2025-09-15  9:23 ` [PATCH 2/3] can: raw: use bitfields to store flags in struct raw_sock Vincent Mailhol
2025-09-15 10:16   ` Oliver Hartkopp
2025-09-15 10:47     ` Vincent Mailhol
2025-09-15 17:41       ` Oliver Hartkopp
2025-09-16 18:35   ` Christophe JAILLET
2025-09-17  4:43     ` Vincent Mailhol
2025-09-15  9:23 ` [PATCH 3/3] can: raw: reorder struct raw_sock's members to optimise packing Vincent Mailhol
2025-09-15 17:42   ` Oliver Hartkopp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox