LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

[PATCH] ipvs: avoid lookup for fwmark 0

To: Simon Horman <horms@xxxxxxxxxxxx>
Subject: [PATCH] ipvs: avoid lookup for fwmark 0
Cc: lvs-devel@xxxxxxxxxxxxxxx
From: Julian Anastasov <ja@xxxxxx>
Date: Fri, 4 Mar 2011 12:26:17 +0200 (EET)

        Restore the previous behaviour to lookup for fwmark
service only when fwmark is non-null. This saves only CPU.

Signed-off-by: Julian Anastasov <ja@xxxxxx>
---

--- lvs-test-2.6-8a80c79/net/netfilter/ipvs/ip_vs_ctl.c 2011-02-28 
19:02:33.000000000 +0200
+++ linux/net/netfilter/ipvs/ip_vs_ctl.c        2011-03-03 19:11:17.300378354 
+0200
@@ -411,9 +411,11 @@ ip_vs_service_get(struct net *net, int a
        /*
         *      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 <protocol,addr,port>
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>