]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[NETFILTER]: reduce netfilter sk_buff enlargement
authorHarald Welte <laforge@netfilter.org>
Wed, 10 Aug 2005 02:24:19 +0000 (19:24 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 29 Aug 2005 22:31:04 +0000 (15:31 -0700)
commit6869c4d8e066e21623c812c448a05f1ed931c9c6
treece18efc459e121e3a0b1bf5f85615567cdb30f68
parentbf3a46aa9b96f6eb3a49a568f72a2801c3e830c0
[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>
27 files changed:
include/linux/netfilter.h
include/linux/netfilter_decnet.h
include/linux/netfilter_ipv4.h
include/linux/netfilter_ipv6.h
include/linux/skbuff.h
net/bridge/netfilter/ebt_mark.c
net/core/skbuff.c
net/ipv4/ip_output.c
net/ipv4/ipvs/ip_vs_core.c
net/ipv4/ipvs/ip_vs_xmit.c
net/ipv4/netfilter/ip_conntrack_core.c
net/ipv4/netfilter/ip_nat_core.c
net/ipv4/netfilter/ip_nat_standalone.c
net/ipv4/netfilter/ip_queue.c
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/ipt_CLASSIFY.c
net/ipv4/netfilter/ipt_CONNMARK.c
net/ipv4/netfilter/ipt_DSCP.c
net/ipv4/netfilter/ipt_ECN.c
net/ipv4/netfilter/ipt_MARK.c
net/ipv4/netfilter/ipt_REJECT.c
net/ipv4/netfilter/ipt_TCPMSS.c
net/ipv4/netfilter/ipt_TOS.c
net/ipv6/ip6_output.c
net/ipv6/netfilter/ip6_queue.c
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6t_MARK.c