aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2008-12-29 21:37:36 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-29 21:37:36 -0500
commit68888d105365366c5e1e0424cc939c1fc757f9c4 (patch)
treec57165c3793b67d5ce73dc3b9e5f46490dd6b06c /net
parentc8e95c021caa9574350cea6f2b4f91e232e3f3ee (diff)
IPVS: Make "no destination available" message more consistent between schedulers
Acked-by: Graeme Fowler <graeme@graemef.net> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/ipvs/ip_vs_lblc.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_lblcr.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_lc.c14
-rw-r--r--net/netfilter/ipvs/ip_vs_nq.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_rr.c1
-rw-r--r--net/netfilter/ipvs/ip_vs_sed.c1
-rw-r--r--net/netfilter/ipvs/ip_vs_sh.c1
-rw-r--r--net/netfilter/ipvs/ip_vs_wlc.c1
-rw-r--r--net/netfilter/ipvs/ip_vs_wrr.c8
9 files changed, 24 insertions, 10 deletions
diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
index 9394f539966a..3eb5e2660c49 100644
--- a/net/netfilter/ipvs/ip_vs_lblc.c
+++ b/net/netfilter/ipvs/ip_vs_lblc.c
@@ -507,7 +507,7 @@ ip_vs_lblc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
507 /* No cache entry or it is invalid, time to schedule */ 507 /* No cache entry or it is invalid, time to schedule */
508 dest = __ip_vs_lblc_schedule(svc); 508 dest = __ip_vs_lblc_schedule(svc);
509 if (!dest) { 509 if (!dest) {
510 IP_VS_DBG(1, "no destination available\n"); 510 IP_VS_ERR_RL("LBLC: no destination available\n");
511 return NULL; 511 return NULL;
512 } 512 }
513 513
diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c
index 92dc76a6842c..c04ce56c7f0f 100644
--- a/net/netfilter/ipvs/ip_vs_lblcr.c
+++ b/net/netfilter/ipvs/ip_vs_lblcr.c
@@ -690,7 +690,7 @@ ip_vs_lblcr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
690 /* The cache entry is invalid, time to schedule */ 690 /* The cache entry is invalid, time to schedule */
691 dest = __ip_vs_lblcr_schedule(svc); 691 dest = __ip_vs_lblcr_schedule(svc);
692 if (!dest) { 692 if (!dest) {
693 IP_VS_DBG(1, "no destination available\n"); 693 IP_VS_ERR_RL("LBLCR: no destination available\n");
694 read_unlock(&svc->sched_lock); 694 read_unlock(&svc->sched_lock);
695 return NULL; 695 return NULL;
696 } 696 }
diff --git a/net/netfilter/ipvs/ip_vs_lc.c b/net/netfilter/ipvs/ip_vs_lc.c
index 51912cab777b..d0dadc8a65fd 100644
--- a/net/netfilter/ipvs/ip_vs_lc.c
+++ b/net/netfilter/ipvs/ip_vs_lc.c
@@ -66,11 +66,15 @@ ip_vs_lc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
66 } 66 }
67 } 67 }
68 68
69 if (least) 69 if (!least)
70 IP_VS_DBG_BUF(6, "LC: server %s:%u activeconns %d inactconns %d\n", 70 IP_VS_ERR_RL("LC: no destination available\n");
71 IP_VS_DBG_ADDR(svc->af, &least->addr), ntohs(least->port), 71 else
72 atomic_read(&least->activeconns), 72 IP_VS_DBG_BUF(6, "LC: server %s:%u activeconns %d "
73 atomic_read(&least->inactconns)); 73 "inactconns %d\n",
74 IP_VS_DBG_ADDR(svc->af, &least->addr),
75 ntohs(least->port),
76 atomic_read(&least->activeconns),
77 atomic_read(&least->inactconns));
74 78
75 return least; 79 return least;
76} 80}
diff --git a/net/netfilter/ipvs/ip_vs_nq.c b/net/netfilter/ipvs/ip_vs_nq.c
index 6758ad2ceaaf..694952db5026 100644
--- a/net/netfilter/ipvs/ip_vs_nq.c
+++ b/net/netfilter/ipvs/ip_vs_nq.c
@@ -95,8 +95,10 @@ ip_vs_nq_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
95 } 95 }
96 } 96 }
97 97
98 if (!least) 98 if (!least) {
99 IP_VS_ERR_RL("NQ: no destination available\n");
99 return NULL; 100 return NULL;
101 }
100 102
101 out: 103 out:
102 IP_VS_DBG_BUF(6, "NQ: server %s:%u " 104 IP_VS_DBG_BUF(6, "NQ: server %s:%u "
diff --git a/net/netfilter/ipvs/ip_vs_rr.c b/net/netfilter/ipvs/ip_vs_rr.c
index 8fb51c169eb8..2d16ab7f8c1e 100644
--- a/net/netfilter/ipvs/ip_vs_rr.c
+++ b/net/netfilter/ipvs/ip_vs_rr.c
@@ -69,6 +69,7 @@ ip_vs_rr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
69 q = q->next; 69 q = q->next;
70 } while (q != p); 70 } while (q != p);
71 write_unlock(&svc->sched_lock); 71 write_unlock(&svc->sched_lock);
72 IP_VS_ERR_RL("RR: no destination available\n");
72 return NULL; 73 return NULL;
73 74
74 out: 75 out:
diff --git a/net/netfilter/ipvs/ip_vs_sed.c b/net/netfilter/ipvs/ip_vs_sed.c
index 691a6a0086e1..20e4657d2f3b 100644
--- a/net/netfilter/ipvs/ip_vs_sed.c
+++ b/net/netfilter/ipvs/ip_vs_sed.c
@@ -84,6 +84,7 @@ ip_vs_sed_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
84 goto nextstage; 84 goto nextstage;
85 } 85 }
86 } 86 }
87 IP_VS_ERR_RL("SED: no destination available\n");
87 return NULL; 88 return NULL;
88 89
89 /* 90 /*
diff --git a/net/netfilter/ipvs/ip_vs_sh.c b/net/netfilter/ipvs/ip_vs_sh.c
index 0e53955ef139..75709ebeb630 100644
--- a/net/netfilter/ipvs/ip_vs_sh.c
+++ b/net/netfilter/ipvs/ip_vs_sh.c
@@ -219,6 +219,7 @@ ip_vs_sh_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
219 || !(dest->flags & IP_VS_DEST_F_AVAILABLE) 219 || !(dest->flags & IP_VS_DEST_F_AVAILABLE)
220 || atomic_read(&dest->weight) <= 0 220 || atomic_read(&dest->weight) <= 0
221 || is_overloaded(dest)) { 221 || is_overloaded(dest)) {
222 IP_VS_ERR_RL("SH: no destination available\n");
222 return NULL; 223 return NULL;
223 } 224 }
224 225
diff --git a/net/netfilter/ipvs/ip_vs_wlc.c b/net/netfilter/ipvs/ip_vs_wlc.c
index 57b452bbb4ea..8e942565b47d 100644
--- a/net/netfilter/ipvs/ip_vs_wlc.c
+++ b/net/netfilter/ipvs/ip_vs_wlc.c
@@ -72,6 +72,7 @@ ip_vs_wlc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
72 goto nextstage; 72 goto nextstage;
73 } 73 }
74 } 74 }
75 IP_VS_ERR_RL("WLC: no destination available\n");
75 return NULL; 76 return NULL;
76 77
77 /* 78 /*
diff --git a/net/netfilter/ipvs/ip_vs_wrr.c b/net/netfilter/ipvs/ip_vs_wrr.c
index 2f618dc29c5b..f7d74ef1ecf9 100644
--- a/net/netfilter/ipvs/ip_vs_wrr.c
+++ b/net/netfilter/ipvs/ip_vs_wrr.c
@@ -155,6 +155,8 @@ ip_vs_wrr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
155 155
156 if (mark->cl == mark->cl->next) { 156 if (mark->cl == mark->cl->next) {
157 /* no dest entry */ 157 /* no dest entry */
158 IP_VS_ERR_RL("WRR: no destination available: "
159 "no destinations present\n");
158 dest = NULL; 160 dest = NULL;
159 goto out; 161 goto out;
160 } 162 }
@@ -168,8 +170,8 @@ ip_vs_wrr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
168 */ 170 */
169 if (mark->cw == 0) { 171 if (mark->cw == 0) {
170 mark->cl = &svc->destinations; 172 mark->cl = &svc->destinations;
171 IP_VS_ERR_RL("ip_vs_wrr_schedule(): " 173 IP_VS_ERR_RL("WRR: no destination "
172 "no available servers\n"); 174 "available\n");
173 dest = NULL; 175 dest = NULL;
174 goto out; 176 goto out;
175 } 177 }
@@ -191,6 +193,8 @@ ip_vs_wrr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
191 /* back to the start, and no dest is found. 193 /* back to the start, and no dest is found.
192 It is only possible when all dests are OVERLOADED */ 194 It is only possible when all dests are OVERLOADED */
193 dest = NULL; 195 dest = NULL;
196 IP_VS_ERR_RL("WRR: no destination available: "
197 "all destinations are overloaded\n");
194 goto out; 198 goto out;
195 } 199 }
196 } 200 }