summaryrefslogtreecommitdiff
path: root/include/net/mctp.h
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2023-06-18 11:33:55 +0200
committerJakub Kicinski <kuba@kernel.org>2023-06-20 20:06:16 -0700
commit066768b7305b1524d261fdc543d25fd60d955254 (patch)
tree9581fc60707833d60384e2495bca631baf7d4a67 /include/net/mctp.h
parent857922b16bb893d26d5ecd83acf9f20cb28eaea2 (diff)
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 <christophe.jaillet@wanadoo.fr> Reviewed-by: Simon Horman <simon.horman@corigine.com> Acked-by: Jeremy Kerr <jk@codeconstruct.com.au> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Link: https://lore.kernel.org/r/393ad1a5aef0aa28d839eeb3d7477da0e0eeb0b0.1687080803.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/mctp.h')
-rw-r--r--include/net/mctp.h4
1 files changed, 2 insertions, 2 deletions
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);