[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>
Showing
- include/linux/netfilter.h 3 additions, 0 deletionsinclude/linux/netfilter.h
- include/linux/netfilter_decnet.h 3 additions, 0 deletionsinclude/linux/netfilter_decnet.h
- include/linux/netfilter_ipv4.h 3 additions, 0 deletionsinclude/linux/netfilter_ipv4.h
- include/linux/netfilter_ipv6.h 3 additions, 0 deletionsinclude/linux/netfilter_ipv6.h
- include/linux/skbuff.h 5 additions, 5 deletionsinclude/linux/skbuff.h
- net/bridge/netfilter/ebt_mark.c 2 additions, 3 deletionsnet/bridge/netfilter/ebt_mark.c
- net/core/skbuff.c 0 additions, 2 deletionsnet/core/skbuff.c
- net/ipv4/ip_output.c 0 additions, 1 deletionnet/ipv4/ip_output.c
- net/ipv4/ipvs/ip_vs_core.c 5 additions, 4 deletionsnet/ipv4/ipvs/ip_vs_core.c
- net/ipv4/ipvs/ip_vs_xmit.c 1 addition, 1 deletionnet/ipv4/ipvs/ip_vs_xmit.c
- net/ipv4/netfilter/ip_conntrack_core.c 1 addition, 6 deletionsnet/ipv4/netfilter/ip_conntrack_core.c
- net/ipv4/netfilter/ip_nat_core.c 0 additions, 1 deletionnet/ipv4/netfilter/ip_nat_core.c
- net/ipv4/netfilter/ip_nat_standalone.c 0 additions, 2 deletionsnet/ipv4/netfilter/ip_nat_standalone.c
- net/ipv4/netfilter/ip_queue.c 0 additions, 1 deletionnet/ipv4/netfilter/ip_queue.c
- net/ipv4/netfilter/ip_tables.c 0 additions, 1 deletionnet/ipv4/netfilter/ip_tables.c
- net/ipv4/netfilter/ipt_CLASSIFY.c 1 addition, 3 deletionsnet/ipv4/netfilter/ipt_CLASSIFY.c
- net/ipv4/netfilter/ipt_CONNMARK.c 1 addition, 3 deletionsnet/ipv4/netfilter/ipt_CONNMARK.c
- net/ipv4/netfilter/ipt_DSCP.c 0 additions, 1 deletionnet/ipv4/netfilter/ipt_DSCP.c
- net/ipv4/netfilter/ipt_ECN.c 0 additions, 2 deletionsnet/ipv4/netfilter/ipt_ECN.c
- net/ipv4/netfilter/ipt_MARK.c 4 additions, 6 deletionsnet/ipv4/netfilter/ipt_MARK.c
Loading
Please register or sign in to comment