aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorRoberto Nibali <ratz@drugphish.ch>2006-01-03 17:22:59 -0500
committerDavid S. Miller <davem@davemloft.net>2006-01-03 17:22:59 -0500
commit4b5bdf5cc3695dc5caba011b9c616b40e6299638 (patch)
tree898ccc98f7501c08cd8153621137045143775c7e /net
parentfd30333d0fab9e870af89e112454996c188655e9 (diff)
[IPVS]: Cleanup IP_VS_DBG statements.
From: Roberto Nibali <ratz@drugphish.ch> The attached patch (against current -GIT) is a cleanup patch which does following: o lookup debug messages shifted back to 9 o added more informational value to flags and refcnt since those entries can be in multiple referenced structures o cleanup 80 char violation It's the prepatch to the session pool implementation and helps very much to debug and monitor important variables and structures regarding the threshold limitation and persistency without the thousands of lookup messages which noone is interested in. Signed-off-by: Horms <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/ipvs/ip_vs_conn.c18
-rw-r--r--net/ipv4/ipvs/ip_vs_core.c2
-rw-r--r--net/ipv4/ipvs/ip_vs_ctl.c9
-rw-r--r--net/ipv4/ipvs/ip_vs_proto_tcp.c2
4 files changed, 17 insertions, 14 deletions
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c
index d35cea31cb55..ed5bd56a501d 100644
--- a/net/ipv4/ipvs/ip_vs_conn.c
+++ b/net/ipv4/ipvs/ip_vs_conn.c
@@ -221,7 +221,7 @@ struct ip_vs_conn *ip_vs_conn_in_get
221 if (!cp && atomic_read(&ip_vs_conn_no_cport_cnt)) 221 if (!cp && atomic_read(&ip_vs_conn_no_cport_cnt))
222 cp = __ip_vs_conn_in_get(protocol, s_addr, 0, d_addr, d_port); 222 cp = __ip_vs_conn_in_get(protocol, s_addr, 0, d_addr, d_port);
223 223
224 IP_VS_DBG(7, "lookup/in %s %u.%u.%u.%u:%d->%u.%u.%u.%u:%d %s\n", 224 IP_VS_DBG(9, "lookup/in %s %u.%u.%u.%u:%d->%u.%u.%u.%u:%d %s\n",
225 ip_vs_proto_name(protocol), 225 ip_vs_proto_name(protocol),
226 NIPQUAD(s_addr), ntohs(s_port), 226 NIPQUAD(s_addr), ntohs(s_port),
227 NIPQUAD(d_addr), ntohs(d_port), 227 NIPQUAD(d_addr), ntohs(d_port),
@@ -256,7 +256,7 @@ struct ip_vs_conn *ip_vs_ct_in_get
256 out: 256 out:
257 ct_read_unlock(hash); 257 ct_read_unlock(hash);
258 258
259 IP_VS_DBG(7, "template lookup/in %s %u.%u.%u.%u:%d->%u.%u.%u.%u:%d %s\n", 259 IP_VS_DBG(9, "template lookup/in %s %u.%u.%u.%u:%d->%u.%u.%u.%u:%d %s\n",
260 ip_vs_proto_name(protocol), 260 ip_vs_proto_name(protocol),
261 NIPQUAD(s_addr), ntohs(s_port), 261 NIPQUAD(s_addr), ntohs(s_port),
262 NIPQUAD(d_addr), ntohs(d_port), 262 NIPQUAD(d_addr), ntohs(d_port),
@@ -297,7 +297,7 @@ struct ip_vs_conn *ip_vs_conn_out_get
297 297
298 ct_read_unlock(hash); 298 ct_read_unlock(hash);
299 299
300 IP_VS_DBG(7, "lookup/out %s %u.%u.%u.%u:%d->%u.%u.%u.%u:%d %s\n", 300 IP_VS_DBG(9, "lookup/out %s %u.%u.%u.%u:%d->%u.%u.%u.%u:%d %s\n",
301 ip_vs_proto_name(protocol), 301 ip_vs_proto_name(protocol),
302 NIPQUAD(s_addr), ntohs(s_port), 302 NIPQUAD(s_addr), ntohs(s_port),
303 NIPQUAD(d_addr), ntohs(d_port), 303 NIPQUAD(d_addr), ntohs(d_port),
@@ -393,8 +393,9 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest)
393 cp->flags |= atomic_read(&dest->conn_flags); 393 cp->flags |= atomic_read(&dest->conn_flags);
394 cp->dest = dest; 394 cp->dest = dest;
395 395
396 IP_VS_DBG(9, "Bind-dest %s c:%u.%u.%u.%u:%d v:%u.%u.%u.%u:%d " 396 IP_VS_DBG(7, "Bind-dest %s c:%u.%u.%u.%u:%d v:%u.%u.%u.%u:%d "
397 "d:%u.%u.%u.%u:%d fwd:%c s:%u flg:%X cnt:%d destcnt:%d\n", 397 "d:%u.%u.%u.%u:%d fwd:%c s:%u conn->flags:%X conn->refcnt:%d "
398 "dest->refcnt:%d\n",
398 ip_vs_proto_name(cp->protocol), 399 ip_vs_proto_name(cp->protocol),
399 NIPQUAD(cp->caddr), ntohs(cp->cport), 400 NIPQUAD(cp->caddr), ntohs(cp->cport),
400 NIPQUAD(cp->vaddr), ntohs(cp->vport), 401 NIPQUAD(cp->vaddr), ntohs(cp->vport),
@@ -432,8 +433,9 @@ static inline void ip_vs_unbind_dest(struct ip_vs_conn *cp)
432 if (!dest) 433 if (!dest)
433 return; 434 return;
434 435
435 IP_VS_DBG(9, "Unbind-dest %s c:%u.%u.%u.%u:%d v:%u.%u.%u.%u:%d " 436 IP_VS_DBG(7, "Unbind-dest %s c:%u.%u.%u.%u:%d v:%u.%u.%u.%u:%d "
436 "d:%u.%u.%u.%u:%d fwd:%c s:%u flg:%X cnt:%d destcnt:%d\n", 437 "d:%u.%u.%u.%u:%d fwd:%c s:%u conn->flags:%X conn->refcnt:%d "
438 "dest->refcnt:%d\n",
437 ip_vs_proto_name(cp->protocol), 439 ip_vs_proto_name(cp->protocol),
438 NIPQUAD(cp->caddr), ntohs(cp->cport), 440 NIPQUAD(cp->caddr), ntohs(cp->cport),
439 NIPQUAD(cp->vaddr), ntohs(cp->vport), 441 NIPQUAD(cp->vaddr), ntohs(cp->vport),
@@ -573,7 +575,7 @@ static void ip_vs_conn_expire(unsigned long data)
573 ip_vs_conn_hash(cp); 575 ip_vs_conn_hash(cp);
574 576
575 expire_later: 577 expire_later:
576 IP_VS_DBG(7, "delayed: refcnt-1=%d conn.n_control=%d\n", 578 IP_VS_DBG(7, "delayed: conn->refcnt-1=%d conn->n_control=%d\n",
577 atomic_read(&cp->refcnt)-1, 579 atomic_read(&cp->refcnt)-1,
578 atomic_read(&cp->n_control)); 580 atomic_read(&cp->n_control));
579 581
diff --git a/net/ipv4/ipvs/ip_vs_core.c b/net/ipv4/ipvs/ip_vs_core.c
index 1a0843cd58a9..1aca94a9fd8b 100644
--- a/net/ipv4/ipvs/ip_vs_core.c
+++ b/net/ipv4/ipvs/ip_vs_core.c
@@ -426,7 +426,7 @@ ip_vs_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
426 return NULL; 426 return NULL;
427 427
428 IP_VS_DBG(6, "Schedule fwd:%c c:%u.%u.%u.%u:%u v:%u.%u.%u.%u:%u " 428 IP_VS_DBG(6, "Schedule fwd:%c c:%u.%u.%u.%u:%u v:%u.%u.%u.%u:%u "
429 "d:%u.%u.%u.%u:%u flg:%X cnt:%d\n", 429 "d:%u.%u.%u.%u:%u conn->flags:%X conn->refcnt:%d\n",
430 ip_vs_fwd_tag(cp), 430 ip_vs_fwd_tag(cp),
431 NIPQUAD(cp->caddr), ntohs(cp->cport), 431 NIPQUAD(cp->caddr), ntohs(cp->cport),
432 NIPQUAD(cp->vaddr), ntohs(cp->vport), 432 NIPQUAD(cp->vaddr), ntohs(cp->vport),
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index fe2c39d2a002..c935c5086d33 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -448,7 +448,7 @@ ip_vs_service_get(__u32 fwmark, __u16 protocol, __u32 vaddr, __u16 vport)
448 out: 448 out:
449 read_unlock(&__ip_vs_svc_lock); 449 read_unlock(&__ip_vs_svc_lock);
450 450
451 IP_VS_DBG(6, "lookup service: fwm %u %s %u.%u.%u.%u:%u %s\n", 451 IP_VS_DBG(9, "lookup service: fwm %u %s %u.%u.%u.%u:%u %s\n",
452 fwmark, ip_vs_proto_name(protocol), 452 fwmark, ip_vs_proto_name(protocol),
453 NIPQUAD(vaddr), ntohs(vport), 453 NIPQUAD(vaddr), ntohs(vport),
454 svc?"hit":"not hit"); 454 svc?"hit":"not hit");
@@ -598,7 +598,7 @@ ip_vs_trash_get_dest(struct ip_vs_service *svc, __u32 daddr, __u16 dport)
598 */ 598 */
599 list_for_each_entry_safe(dest, nxt, &ip_vs_dest_trash, n_list) { 599 list_for_each_entry_safe(dest, nxt, &ip_vs_dest_trash, n_list) {
600 IP_VS_DBG(3, "Destination %u/%u.%u.%u.%u:%u still in trash, " 600 IP_VS_DBG(3, "Destination %u/%u.%u.%u.%u:%u still in trash, "
601 "refcnt=%d\n", 601 "dest->refcnt=%d\n",
602 dest->vfwmark, 602 dest->vfwmark,
603 NIPQUAD(dest->addr), ntohs(dest->port), 603 NIPQUAD(dest->addr), ntohs(dest->port),
604 atomic_read(&dest->refcnt)); 604 atomic_read(&dest->refcnt));
@@ -805,7 +805,7 @@ ip_vs_add_dest(struct ip_vs_service *svc, struct ip_vs_dest_user *udest)
805 dest = ip_vs_trash_get_dest(svc, daddr, dport); 805 dest = ip_vs_trash_get_dest(svc, daddr, dport);
806 if (dest != NULL) { 806 if (dest != NULL) {
807 IP_VS_DBG(3, "Get destination %u.%u.%u.%u:%u from trash, " 807 IP_VS_DBG(3, "Get destination %u.%u.%u.%u:%u from trash, "
808 "refcnt=%d, service %u/%u.%u.%u.%u:%u\n", 808 "dest->refcnt=%d, service %u/%u.%u.%u.%u:%u\n",
809 NIPQUAD(daddr), ntohs(dport), 809 NIPQUAD(daddr), ntohs(dport),
810 atomic_read(&dest->refcnt), 810 atomic_read(&dest->refcnt),
811 dest->vfwmark, 811 dest->vfwmark,
@@ -950,7 +950,8 @@ static void __ip_vs_del_dest(struct ip_vs_dest *dest)
950 atomic_dec(&dest->svc->refcnt); 950 atomic_dec(&dest->svc->refcnt);
951 kfree(dest); 951 kfree(dest);
952 } else { 952 } else {
953 IP_VS_DBG(3, "Moving dest %u.%u.%u.%u:%u into trash, refcnt=%d\n", 953 IP_VS_DBG(3, "Moving dest %u.%u.%u.%u:%u into trash, "
954 "dest->refcnt=%d\n",
954 NIPQUAD(dest->addr), ntohs(dest->port), 955 NIPQUAD(dest->addr), ntohs(dest->port),
955 atomic_read(&dest->refcnt)); 956 atomic_read(&dest->refcnt));
956 list_add(&dest->n_list, &ip_vs_dest_trash); 957 list_add(&dest->n_list, &ip_vs_dest_trash);
diff --git a/net/ipv4/ipvs/ip_vs_proto_tcp.c b/net/ipv4/ipvs/ip_vs_proto_tcp.c
index 638ba8c9e8b5..bc28b1160a3a 100644
--- a/net/ipv4/ipvs/ip_vs_proto_tcp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_tcp.c
@@ -426,7 +426,7 @@ set_tcp_state(struct ip_vs_protocol *pp, struct ip_vs_conn *cp,
426 struct ip_vs_dest *dest = cp->dest; 426 struct ip_vs_dest *dest = cp->dest;
427 427
428 IP_VS_DBG(8, "%s %s [%c%c%c%c] %u.%u.%u.%u:%d->" 428 IP_VS_DBG(8, "%s %s [%c%c%c%c] %u.%u.%u.%u:%d->"
429 "%u.%u.%u.%u:%d state: %s->%s cnt:%d\n", 429 "%u.%u.%u.%u:%d state: %s->%s conn->refcnt:%d\n",
430 pp->name, 430 pp->name,
431 (state_off==TCP_DIR_OUTPUT)?"output ":"input ", 431 (state_off==TCP_DIR_OUTPUT)?"output ":"input ",
432 th->syn? 'S' : '.', 432 th->syn? 'S' : '.',