diff options
-rw-r--r-- | drivers/net/virtio_net.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index cbf8b0625352..26c502e4b871 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -212,8 +212,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi, | |||
212 | * the case of a broken device. | 212 | * the case of a broken device. |
213 | */ | 213 | */ |
214 | if (unlikely(len > MAX_SKB_FRAGS * PAGE_SIZE)) { | 214 | if (unlikely(len > MAX_SKB_FRAGS * PAGE_SIZE)) { |
215 | if (net_ratelimit()) | 215 | net_dbg_ratelimited("%s: too much data\n", skb->dev->name); |
216 | pr_debug("%s: too much data\n", skb->dev->name); | ||
217 | dev_kfree_skb(skb); | 216 | dev_kfree_skb(skb); |
218 | return NULL; | 217 | return NULL; |
219 | } | 218 | } |
@@ -333,9 +332,8 @@ static void receive_buf(struct net_device *dev, void *buf, unsigned int len) | |||
333 | skb_shinfo(skb)->gso_type = SKB_GSO_TCPV6; | 332 | skb_shinfo(skb)->gso_type = SKB_GSO_TCPV6; |
334 | break; | 333 | break; |
335 | default: | 334 | default: |
336 | if (net_ratelimit()) | 335 | net_warn_ratelimited("%s: bad gso type %u.\n", |
337 | printk(KERN_WARNING "%s: bad gso type %u.\n", | 336 | dev->name, hdr->hdr.gso_type); |
338 | dev->name, hdr->hdr.gso_type); | ||
339 | goto frame_err; | 337 | goto frame_err; |
340 | } | 338 | } |
341 | 339 | ||
@@ -344,9 +342,7 @@ static void receive_buf(struct net_device *dev, void *buf, unsigned int len) | |||
344 | 342 | ||
345 | skb_shinfo(skb)->gso_size = hdr->hdr.gso_size; | 343 | skb_shinfo(skb)->gso_size = hdr->hdr.gso_size; |
346 | if (skb_shinfo(skb)->gso_size == 0) { | 344 | if (skb_shinfo(skb)->gso_size == 0) { |
347 | if (net_ratelimit()) | 345 | net_warn_ratelimited("%s: zero gso size.\n", dev->name); |
348 | printk(KERN_WARNING "%s: zero gso size.\n", | ||
349 | dev->name); | ||
350 | goto frame_err; | 346 | goto frame_err; |
351 | } | 347 | } |
352 | 348 | ||