aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-01-15 02:45:11 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:02:32 -0500
commita5e73c29d9243cc2e889a9d7155f331923eee655 (patch)
tree9d3a6a5734ce95d294eeaa7503cd1005eacfaeb3 /net
parent77e2420b85573f57c2774775ead81ebb500b803d (diff)
[NETFILTER]: nf_conntrack_{tcp,sctp}: shrink state table
The TCP and SCTP conntrack state transition tables only holds small numbers, but gcc uses 4 byte per entry for the enum. Switching to an u8 reduces the size from 480 to 120 bytes for TCP and from 576 to 144 bytes for SCTP. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_proto_sctp.c2
-rw-r--r--net/netfilter/nf_conntrack_proto_tcp.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c
index 47c1dbead84b..9a5ec53b442e 100644
--- a/net/netfilter/nf_conntrack_proto_sctp.c
+++ b/net/netfilter/nf_conntrack_proto_sctp.c
@@ -110,7 +110,7 @@ cookie echoed to closed.
110*/ 110*/
111 111
112/* SCTP conntrack state transitions */ 112/* SCTP conntrack state transitions */
113static const enum sctp_conntrack sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = { 113static const u8 sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = {
114 { 114 {
115/* ORIGINAL */ 115/* ORIGINAL */
116/* sNO, sCL, sCW, sCE, sES, sSS, sSR, sSA */ 116/* sNO, sCL, sCW, sCE, sES, sSS, sSR, sSA */
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index be19bd94ddf9..dbd8f84fa192 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -149,7 +149,7 @@ enum tcp_bit_set {
149 * if they are invalid 149 * if they are invalid
150 * or we do not support the request (simultaneous open) 150 * or we do not support the request (simultaneous open)
151 */ 151 */
152static const enum tcp_conntrack tcp_conntracks[2][6][TCP_CONNTRACK_MAX] = { 152static const u8 tcp_conntracks[2][6][TCP_CONNTRACK_MAX] = {
153 { 153 {
154/* ORIGINAL */ 154/* ORIGINAL */
155/* sNO, sSS, sSR, sES, sFW, sCW, sLA, sTW, sCL, sLI */ 155/* sNO, sSS, sSR, sES, sFW, sCW, sLA, sTW, sCL, sLI */