Netdev List
 help / color / mirror / Atom feed
From: Harald Welte <laforge@netfilter.org>
To: David Miller <davem@davemloft.net>
Cc: Linux Netdev List <netdev@vger.kernel.org>,
	Netfilter Development Mailinglist
	<netfilter-devel@lists.netfilter.org>
Subject: [NETFILTER] NAT sequence adjustment: Save eight bytes per conntrack
Date: Tue, 31 Jan 2006 00:22:09 +0100	[thread overview]
Message-ID: <20060130232209.GG4603@sunbeam.de.gnumonks.org> (raw)

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

             reply	other threads:[~2006-01-30 23:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-30 23:22 Harald Welte [this message]
2006-01-30 23:50 ` [NETFILTER] NAT sequence adjustment: Save eight bytes per conntrack David S. Miller
2006-01-31  8:50 ` Balazs Scheidler
2006-01-31  9:26   ` Harald Welte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060130232209.GG4603@sunbeam.de.gnumonks.org \
    --to=laforge@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox