public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netfilter: remove padding from struct xt_match on 64bit builds
@ 2008-12-12 13:39 Richard Kennedy
  2008-12-15 13:10 ` [netfilter-core] " Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Kennedy @ 2008-12-12 13:39 UTC (permalink / raw)
  To: coreteam; +Cc: lkml, netfilter

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>
----

patch against v2.6.28-rc8
Compiled & running on AMD X2 desktop machine.
regards
Richard



diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index e52ce47..c7ee874 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -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. */
@@ -302,7 +303,6 @@ struct xt_match
 	unsigned short proto;
 
 	unsigned short family;
-	u_int8_t revision;
 };
 
 /* Registration hooks for targets. */



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-15 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-12 13:39 [PATCH] netfilter: remove padding from struct xt_match on 64bit builds Richard Kennedy
2008-12-15 13:10 ` [netfilter-core] " Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox