aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/ipt_CONNMARK.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2005-08-09 19:24:19 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 15:31:04 -0700
commit6869c4d8e066e21623c812c448a05f1ed931c9c6 (patch)
treece18efc459e121e3a0b1bf5f85615567cdb30f68 /net/ipv4/netfilter/ipt_CONNMARK.c
parent[NETFILTER]: convert nfmark and conntrack mark to 32bit (diff)
downloadlinux-dev-6869c4d8e066e21623c812c448a05f1ed931c9c6.tar.xz
linux-dev-6869c4d8e066e21623c812c448a05f1ed931c9c6.zip
[NETFILTER]: reduce netfilter sk_buff enlargement
As discussed at netconf'05, we're trying to save every bit in sk_buff. The patch below makes sk_buff 8 bytes smaller. I did some basic testing on my notebook and it seems to work. The only real in-tree user of nfcache was IPVS, who only needs a single bit. Unfortunately I couldn't find some other free bit in sk_buff to stuff that bit into, so I introduced a separate field for them. Maybe the IPVS guys can resolve that to further save space. Initially I wanted to shrink pkt_type to three bits (PACKET_HOST and alike are only 6 values defined), but unfortunately the bluetooth code overloads pkt_type :( The conntrack-event-api (out-of-tree) uses nfcache, but Rusty just came up with a way how to do it without any skb fields, so it's safe to remove it. - remove all never-implemented 'nfcache' code - don't have ipvs code abuse 'nfcache' field. currently get's their own compile-conditional skb->ipvs_property field. IPVS maintainers can decide to move this bit elswhere, but nfcache needs to die. - remove skb->nfcache field to save 4 bytes - move skb->nfctinfo into three unused bits to save further 4 bytes Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ipv4/netfilter/ipt_CONNMARK.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv4/netfilter/ipt_CONNMARK.c b/net/ipv4/netfilter/ipt_CONNMARK.c
index 8ed744157b1a..134638021339 100644
--- a/net/ipv4/netfilter/ipt_CONNMARK.c
+++ b/net/ipv4/netfilter/ipt_CONNMARK.c
@@ -61,10 +61,8 @@ target(struct sk_buff **pskb,
case IPT_CONNMARK_RESTORE:
nfmark = (*pskb)->nfmark;
diff = (ct->mark ^ nfmark) & markinfo->mask;
- if (diff != 0) {
+ if (diff != 0)
(*pskb)->nfmark = nfmark ^ diff;
- (*pskb)->nfcache |= NFC_ALTERED;
- }
break;
}
}