]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/netfilter/ipvs/ip_vs_lblc.c
IPVS: use pr_err and friends instead of IP_VS_ERR and friends
[net-next-2.6.git] / net / netfilter / ipvs / ip_vs_lblc.c
index 9394f539966aea9f91dd37a6165969d31b5a8ee8..c1757f3620cd502a5d16e3ef743273ac63b5f56d 100644 (file)
@@ -39,6 +39,9 @@
  * me to write this module.
  */
 
+#define KMSG_COMPONENT "IPVS"
+#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+
 #include <linux/ip.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -199,7 +202,7 @@ ip_vs_lblc_new(struct ip_vs_lblc_table *tbl, const union nf_inet_addr *daddr,
        if (!en) {
                en = kmalloc(sizeof(*en), GFP_ATOMIC);
                if (!en) {
-                       IP_VS_ERR("ip_vs_lblc_new(): no memory\n");
+                       pr_err("%s(): no memory\n", __func__);
                        return NULL;
                }
 
@@ -332,7 +335,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc)
         */
        tbl = kmalloc(sizeof(*tbl), GFP_ATOMIC);
        if (tbl == NULL) {
-               IP_VS_ERR("ip_vs_lblc_init_svc(): no memory\n");
+               pr_err("%s(): no memory\n", __func__);
                return -ENOMEM;
        }
        svc->sched_data = tbl;
@@ -477,7 +480,7 @@ ip_vs_lblc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
 
        ip_vs_fill_iphdr(svc->af, skb_network_header(skb), &iph);
 
-       IP_VS_DBG(6, "ip_vs_lblc_schedule(): Scheduling...\n");
+       IP_VS_DBG(6, "%s(): Scheduling...\n", __func__);
 
        /* First look in our cache */
        read_lock(&svc->sched_lock);
@@ -507,7 +510,7 @@ ip_vs_lblc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
        /* No cache entry or it is invalid, time to schedule */
        dest = __ip_vs_lblc_schedule(svc);
        if (!dest) {
-               IP_VS_DBG(1, "no destination available\n");
+               IP_VS_ERR_RL("LBLC: no destination available\n");
                return NULL;
        }