From: Julian Anastasov Date: Fri, 4 Mar 2011 10:26:17 +0000 (+0200) Subject: ipvs: avoid lookup for fwmark 0 X-Git-Tag: v2.6.39-rc1~468^2~10^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=097fc76a0805bdca17baf12cad9d3bcb215716a9;p=platform%2Fkernel%2Flinux-3.10.git ipvs: avoid lookup for fwmark 0 Restore the previous behaviour to lookup for fwmark service only when fwmark is non-null. This saves only CPU. Signed-off-by: Julian Anastasov Signed-off-by: Hans Schillstrom Signed-off-by: Simon Horman --- diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index c73b0c8..f0369d6 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -411,9 +411,11 @@ ip_vs_service_get(struct net *net, int af, __u32 fwmark, __u16 protocol, /* * Check the table hashed by fwmark first */ - svc = __ip_vs_svc_fwm_find(net, af, fwmark); - if (fwmark && svc) - goto out; + if (fwmark) { + svc = __ip_vs_svc_fwm_find(net, af, fwmark); + if (svc) + goto out; + } /* * Check the table hashed by