From 066768b7305b1524d261fdc543d25fd60d955254 Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Sun, 18 Jun 2023 11:33:55 +0200 Subject: mctp: Reorder fields in 'struct mctp_route' Group some variables based on their sizes to reduce hole and avoid padding. On x86_64, this shrinks the size of 'struct mctp_route' from 72 to 64 bytes. It saves a few bytes of memory and is more cache-line friendly. Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Acked-by: Jeremy Kerr Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/393ad1a5aef0aa28d839eeb3d7477da0e0eeb0b0.1687080803.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski --- include/net/mctp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/net/mctp.h b/include/net/mctp.h index 82800d521c3d..da86e106c91d 100644 --- a/include/net/mctp.h +++ b/include/net/mctp.h @@ -234,9 +234,9 @@ struct mctp_flow { struct mctp_route { mctp_eid_t min, max; - struct mctp_dev *dev; - unsigned int mtu; unsigned char type; + unsigned int mtu; + struct mctp_dev *dev; int (*output)(struct mctp_route *route, struct sk_buff *skb); -- cgit v1.2.3