datapath: Convert net_ratelimit uses to net_<level>_ratelimited
authorJoe Perches <joe@perches.com>
Fri, 25 May 2012 18:09:56 +0000 (11:09 -0700)
committerJesse Gross <jesse@nicira.com>
Fri, 25 May 2012 18:17:34 +0000 (11:17 -0700)
Standardize the net core ratelimited logging functions.

Coalesce formats, align arguments.
Change a printk then vprintk sequence to use printf extension %pV.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/vport-netdev.c

index 6e921359cea443882042c3d260e79cc249ce3e70..009855478a749688e738c49429d7b874601cd2b0 100644 (file)
@@ -303,9 +303,9 @@ static int netdev_send(struct vport *vport, struct sk_buff *skb)
        int len;
 
        if (unlikely(packet_length(skb) > mtu && !skb_is_gso(skb))) {
-               if (net_ratelimit())
-                       pr_warn("%s: dropped over-mtu packet: %d > %d\n",
-                               ovs_dp_name(vport->dp), packet_length(skb), mtu);
+               net_warn_ratelimited("%s: dropped over-mtu packet: %d > %d\n",
+                                    ovs_dp_name(vport->dp),
+                                    packet_length(skb), mtu);
                goto error;
        }