Skip to content

Commit

Permalink
netlabel: Reorder fields in 'struct netlbl_domaddr6_map'
Browse files Browse the repository at this point in the history
Group some variables based on their sizes to reduce hole and avoid padding.
On x86_64, this shrinks the size of 'struct netlbl_domaddr6_map'
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>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Link: https://lore.kernel.org/r/aa109847260e51e174c823b6d1441f75be370f01.1687083361.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Christophe JAILLET authored and Jakub Kicinski committed Jun 21, 2023
1 parent 92b0829 commit f0d9526
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netlabel/netlabel_domainhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ struct netlbl_domaddr6_map {

struct netlbl_dom_map {
char *domain;
u16 family;
struct netlbl_dommap_def def;
u16 family;

u32 valid;
struct list_head list;
Expand Down

0 comments on commit f0d9526

Please sign in to comment.