Commit 61e03e91 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Florian Westphal

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
parent b9f9a485
...@@ -26,6 +26,15 @@ struct nf_conntrack_expect { ...@@ -26,6 +26,15 @@ struct nf_conntrack_expect {
struct nf_conntrack_tuple tuple; struct nf_conntrack_tuple tuple;
struct nf_conntrack_tuple_mask mask; struct nf_conntrack_tuple_mask mask;
/* Usage count. */
refcount_t use;
/* Flags */
unsigned int flags;
/* Expectation class */
unsigned int class;
/* Function to call after setup and insertion */ /* Function to call after setup and insertion */
void (*expectfn)(struct nf_conn *new, void (*expectfn)(struct nf_conn *new,
struct nf_conntrack_expect *this); struct nf_conntrack_expect *this);
...@@ -39,15 +48,6 @@ struct nf_conntrack_expect { ...@@ -39,15 +48,6 @@ struct nf_conntrack_expect {
/* Timer function; deletes the expectation. */ /* Timer function; deletes the expectation. */
struct timer_list timeout; struct timer_list timeout;
/* Usage count. */
refcount_t use;
/* Flags */
unsigned int flags;
/* Expectation class */
unsigned int class;
#if IS_ENABLED(CONFIG_NF_NAT) #if IS_ENABLED(CONFIG_NF_NAT)
union nf_inet_addr saved_addr; union nf_inet_addr saved_addr;
/* This is the original per-proto part, used to map the /* This is the original per-proto part, used to map the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment