Skip to content

Commit

Permalink
netfilter 09/09: remove padding from struct xt_match on 64bit builds
Browse files Browse the repository at this point in the history
reorder struct xt_match to remove 8 bytes of padding and make its size
128 bytes.

This saves a small amount of data space in each of the xt netfilter
modules and fits xt_match in one 128 byte cache line.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Richard Kennedy authored and David S. Miller committed Jan 13, 2009
1 parent e6210f3 commit daaf83d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/netfilter/x_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ struct xt_match
struct list_head list;

const char name[XT_FUNCTION_MAXNAMELEN-1];
u_int8_t revision;

/* Return true or false: return FALSE and set *hotdrop = 1 to
force immediate packet drop. */
Expand Down Expand Up @@ -302,7 +303,6 @@ struct xt_match
unsigned short proto;

unsigned short family;
u_int8_t revision;
};

/* Registration hooks for targets. */
Expand Down

0 comments on commit daaf83d

Please sign in to comment.