ipvs: API change to avoid rescan of IPv6 exthdr
authorJesper Dangaard Brouer <brouer@redhat.com>
Wed, 26 Sep 2012 12:07:17 +0000 (14:07 +0200)
committerSimon Horman <horms@verge.net.au>
Fri, 28 Sep 2012 02:34:33 +0000 (11:34 +0900)
commitd4383f04d145cce8b855c463f40020639ef83ea0
tree7807b2b3114fc25c03eb3d3741f9b6d1b17aedfe
parent2f74713d1436b7d2d0506ba1bc5f10915a73bbec
ipvs: API change to avoid rescan of IPv6 exthdr

Reduce the number of times we scan/skip the IPv6 exthdrs.

This patch contains a lot of API changes.  This is done, to avoid
repeating the scan of finding the IPv6 headers, via ipv6_find_hdr(),
which is called by ip_vs_fill_iph_skb().

Finding the IPv6 headers is done as early as possible, and passed on
as a pointer "struct ip_vs_iphdr *" to the affected functions.

This patch reduce/removes 19 calls to ip_vs_fill_iph_skb().

Notice, I have choosen, not to change the API of function
pointer "(*schedule)" (in struct ip_vs_scheduler) as it can be
used by external schedulers, via {un,}register_ip_vs_scheduler.
Only 4 out of 10 schedulers use info from ip_vs_iphdr*, and when
they do, they are only interested in iph->{s,d}addr.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
include/net/ip_vs.h
net/netfilter/ipvs/ip_vs_conn.c
net/netfilter/ipvs/ip_vs_core.c
net/netfilter/ipvs/ip_vs_proto_ah_esp.c
net/netfilter/ipvs/ip_vs_proto_sctp.c
net/netfilter/ipvs/ip_vs_proto_tcp.c
net/netfilter/ipvs/ip_vs_proto_udp.c
net/netfilter/ipvs/ip_vs_xmit.c
net/netfilter/xt_ipvs.c
This page took 0.028734 seconds and 5 git commands to generate.