Skip to content

Commit 61e03e9

Browse files
tititiou36Florian Westphal
authored and
Florian Westphal
committed
netfilter: Reorder fields in 'struct nf_conntrack_expect'
Group some variables based on their sizes to reduce holes. On x86_64, this shrinks the size of 'struct nf_conntrack_expect' from 264 to 256 bytes. This structure deserve a dedicated cache, so reducing its size looks nice. Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Florian Westphal <[email protected]>
1 parent b9f9a48 commit 61e03e9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

include/net/netfilter/nf_conntrack_expect.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ struct nf_conntrack_expect {
2626
struct nf_conntrack_tuple tuple;
2727
struct nf_conntrack_tuple_mask mask;
2828

29+
/* Usage count. */
30+
refcount_t use;
31+
32+
/* Flags */
33+
unsigned int flags;
34+
35+
/* Expectation class */
36+
unsigned int class;
37+
2938
/* Function to call after setup and insertion */
3039
void (*expectfn)(struct nf_conn *new,
3140
struct nf_conntrack_expect *this);
@@ -39,15 +48,6 @@ struct nf_conntrack_expect {
3948
/* Timer function; deletes the expectation. */
4049
struct timer_list timeout;
4150

42-
/* Usage count. */
43-
refcount_t use;
44-
45-
/* Flags */
46-
unsigned int flags;
47-
48-
/* Expectation class */
49-
unsigned int class;
50-
5151
#if IS_ENABLED(CONFIG_NF_NAT)
5252
union nf_inet_addr saved_addr;
5353
/* This is the original per-proto part, used to map the

0 commit comments

Comments
 (0)