summaryrefslogtreecommitdiffstats
path: root/include/net/ip_vs.h
diff options
context:
space:
mode:
authorMatteo Croce <mcroce@redhat.com>2019-01-19 15:22:38 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2019-01-28 11:15:58 +0100
commitfe19a8fea7cb59f202ddd30ec2fa9f5bd907b3d2 (patch)
tree3eeeb70baea31ee0abcff675afd7b9f25b8c4978 /include/net/ip_vs.h
parentnetfilter: conntrack: fix bogus port values for other l4 protocols (diff)
downloadlinux-fe19a8fea7cb59f202ddd30ec2fa9f5bd907b3d2.tar.xz
linux-fe19a8fea7cb59f202ddd30ec2fa9f5bd907b3d2.zip
ipvs: avoid indirect calls when calculating checksums
The function pointer ip_vs_protocol->csum_check is only used in protocol specific code, and never in the generic one. Remove the function pointer from struct ip_vs_protocol and call the checksum functions directly. This reduces the performance impact of the Spectre mitigation, and should give a small improvement even with RETPOLINES disabled. Signed-off-by: Matteo Croce <mcroce@redhat.com> Acked-by: Julian Anastasov <ja@ssi.bg> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r--include/net/ip_vs.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index a0d2e0bb9a94..047f9a5ccaad 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -453,9 +453,6 @@ struct ip_vs_protocol {
int (*dnat_handler)(struct sk_buff *skb, struct ip_vs_protocol *pp,
struct ip_vs_conn *cp, struct ip_vs_iphdr *iph);
- int (*csum_check)(int af, struct sk_buff *skb,
- struct ip_vs_protocol *pp);
-
const char *(*state_name)(int state);
void (*state_transition)(struct ip_vs_conn *cp, int direction,