linux/net/ipv6/netfilter
Ilpo Järvinen 93c8b90f01 ipv6: almost identical frag hashing funcs combined
$ diff-funcs ip6qhashfn reassembly.c netfilter/nf_conntrack_reasm.c
 --- reassembly.c:ip6qhashfn()
 +++ netfilter/nf_conntrack_reasm.c:ip6qhashfn()
@@ -1,5 +1,5 @@
-static unsigned int ip6qhashfn(__be32 id, struct in6_addr *saddr,
-			       struct in6_addr *daddr)
+static unsigned int ip6qhashfn(__be32 id, const struct in6_addr *saddr,
+			       const struct in6_addr *daddr)
 {
 	u32 a, b, c;

@@ -9,7 +9,7 @@

 	a += JHASH_GOLDEN_RATIO;
 	b += JHASH_GOLDEN_RATIO;
-	c += ip6_frags.rnd;
+	c += nf_frags.rnd;
 	__jhash_mix(a, b, c);

 	a += (__force u32)saddr->s6_addr32[3];

And codiff xx.o.old xx.o.new:

net/ipv6/netfilter/nf_conntrack_reasm.c:
  ip6qhashfn         | -512
  nf_hashfn          |   +6
  nf_ct_frag6_gather |  +36
 3 functions changed, 42 bytes added, 512 bytes removed, diff: -470
net/ipv6/reassembly.c:
  ip6qhashfn    | -512
  ip6_hashfn    |   +7
  ipv6_frag_rcv |  +89
 3 functions changed, 96 bytes added, 512 bytes removed, diff: -416

net/ipv6/reassembly.c:
  inet6_hash_frag | +510
 1 function changed, 510 bytes added, diff: +510

Total: -376

Compile tested.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-01 02:48:31 -07:00
..
ip6_queue.c netns: Use net_eq() to compare net-namespaces for optimization. 2008-07-19 22:34:43 -07:00
ip6_tables.c [NETFILTER]: {ip,ip6,arp}_tables: return EAGAIN for invalid SO_GET_ENTRIES size 2008-04-14 11:15:45 +02:00
ip6t_ah.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
ip6t_eui64.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
ip6t_frag.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
ip6t_hbh.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
ip6t_hl.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
ip6t_HL.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
ip6t_ipv6header.c [NETFILTER]: annotate xtables targets with const and remove casts 2008-04-14 09:56:05 +02:00
ip6t_LOG.c [NETFILTER]: {ip,ip6}t_LOG: print MARK value in log output 2008-04-14 09:56:01 +02:00
ip6t_mh.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
ip6t_REJECT.c [NETFILTER]: annotate xtables targets with const and remove casts 2008-04-14 09:56:05 +02:00
ip6t_rt.c [NETFILTER]: annotate xtables targets with const and remove casts 2008-04-14 09:56:05 +02:00
ip6table_filter.c netfilter: ip6table_filter in netns for real 2008-07-08 02:36:18 -07:00
ip6table_mangle.c netfilter: ip6table_mangle: don't reroute in LOCAL_IN 2008-06-24 13:30:45 -07:00
ip6table_raw.c [NETFILTER]: Use non-deprecated __RW_LOCK_UNLOCKED macro 2008-04-14 09:56:03 +02:00
ip6table_security.c netfilter: ip{,6}tables_security: fix future section mismatch 2008-07-26 17:48:38 -07:00
Kconfig netfilter: make security table depend on NETFILTER_ADVANCED 2008-07-23 16:42:42 -07:00
Makefile netfilter: ip6_tables: add ip6tables security table 2008-06-09 15:58:05 -07:00
nf_conntrack_l3proto_ipv6.c [NETFILTER]: nf_conntrack: use bool type in struct nf_conntrack_l3proto 2008-04-14 11:15:52 +02:00
nf_conntrack_proto_icmpv6.c netfilter: nf_conntrack: properly account terminating packets 2008-06-09 15:59:40 -07:00
nf_conntrack_reasm.c ipv6: almost identical frag hashing funcs combined 2008-10-01 02:48:31 -07:00