Netdev List
 help / color / mirror / Atom feed
* [NETFILTER] NAT sequence adjustment: Save eight bytes per conntrack
@ 2006-01-30 23:22 Harald Welte
  2006-01-30 23:50 ` David S. Miller
  2006-01-31  8:50 ` Balazs Scheidler
  0 siblings, 2 replies; 4+ messages in thread
From: Harald Welte @ 2006-01-30 23:22 UTC (permalink / raw)
  To: David Miller; +Cc: Linux Netdev List, Netfilter Development Mailinglist

[-- Attachment #1: Type: text/plain, Size: 1781 bytes --]

Hi Dave!

Please apply this humble little step towards ip_conntrack shrinking,
thanks!

[NETFILTER] NAT sequence adjustment: Save eight bytes per conntrack

This patch reduces the size of 'struct ip_conntrack' on systems with NAT
by eight bytes.  The sequence number delta values can be int16_t, since
we only support one sequence number modification per window anyway, and
one such modification is not going to exceed 32kB ;)

Signed-off-by: Harald Welte <laforge@netfilter.org>

---
commit 94d3d40c84672b74e59ea5252f61602610e1513e
tree 63e5ae5174af9f982be6d8d1bbe11e750e4ace32
parent e3c7a1f99300fbd6de35a40fcd9c4dc1b0fbfee2
author Harald Welte <laforge@netfilter.org> Fri, 27 Jan 2006 16:03:45 +0100
committer Harald Welte <laforge@netfilter.org> Fri, 27 Jan 2006 16:03:45 +0100

 include/linux/netfilter_ipv4/ip_nat.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/netfilter_ipv4/ip_nat.h b/include/linux/netfilter_ipv4/ip_nat.h
index 41a107d..e9f5ed1 100644
--- a/include/linux/netfilter_ipv4/ip_nat.h
+++ b/include/linux/netfilter_ipv4/ip_nat.h
@@ -23,7 +23,7 @@ struct ip_nat_seq {
 	 * modification (if any) */
 	u_int32_t correction_pos;
 	/* sequence number offset before and after last modification */
-	int32_t offset_before, offset_after;
+	int16_t offset_before, offset_after;
 };
 
 /* Single range specification. */
-- 
- Harald Welte <laforge@netfilter.org>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2006-01-31  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-30 23:22 [NETFILTER] NAT sequence adjustment: Save eight bytes per conntrack Harald Welte
2006-01-30 23:50 ` David S. Miller
2006-01-31  8:50 ` Balazs Scheidler
2006-01-31  9:26   ` Harald Welte

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