aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vhost
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-06-24 10:10:25 -0400
committerMichael S. Tsirkin <mst@redhat.com>2010-07-16 05:18:17 -0400
commit95c0ec6a97ae82d39a6e13fc01aa76861a4a76d0 (patch)
treea581adc7aa2fdd2330790adb3e76b93b112c3ef4 /drivers/vhost
parent1680e9063ea28099a1efa8ca11cee069cc7a9bc3 (diff)
vhost: avoid pr_err on condition guest can trigger
Guest can trigger packet truncation by posting a very short buffer and disabling buffer merging. Convert pr_err to pr_debug to avoid log from filling up when this happens. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/net.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 2764e0fbf29b..2f6185c845e0 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -177,8 +177,8 @@ static void handle_tx(struct vhost_net *net)
177 break; 177 break;
178 } 178 }
179 if (err != len) 179 if (err != len)
180 pr_err("Truncated TX packet: " 180 pr_debug("Truncated TX packet: "
181 " len %d != %zd\n", err, len); 181 " len %d != %zd\n", err, len);
182 vhost_add_used_and_signal(&net->dev, vq, head, 0); 182 vhost_add_used_and_signal(&net->dev, vq, head, 0);
183 total_len += len; 183 total_len += len;
184 if (unlikely(total_len >= VHOST_NET_WEIGHT)) { 184 if (unlikely(total_len >= VHOST_NET_WEIGHT)) {
@@ -275,8 +275,8 @@ static void handle_rx(struct vhost_net *net)
275 } 275 }
276 /* TODO: Should check and handle checksum. */ 276 /* TODO: Should check and handle checksum. */
277 if (err > len) { 277 if (err > len) {
278 pr_err("Discarded truncated rx packet: " 278 pr_debug("Discarded truncated rx packet: "
279 " len %d > %zd\n", err, len); 279 " len %d > %zd\n", err, len);
280 vhost_discard_vq_desc(vq); 280 vhost_discard_vq_desc(vq);
281 continue; 281 continue;
282 } 282 }