Skip to contentSkip to conversation

vmxnet3: silence warning

PATCH Superseded Michael S. Tsirkin 2 participants 2 messages Nov 30, 2015

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 vmxnet3: silence warning

vmxnet3 always produces a warning under qtest.

This is not a user error, don't warn.

---
 hw/net/vmxnet3.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
hw/net/vmxnet3.c +4 -1
index 5e3a233..0e9e6d9 100644
@@ -25,6 +25,7 @@
 #include "qemu/bswap.h"
 #include "hw/pci/msix.h"
 #include "hw/pci/msi.h"
+#include "sysemu/qtest.h"
 
 #include "vmxnet3.h"
 #include "vmxnet_debug.h"
@@ -2015,7 +2016,9 @@ static bool vmxnet3_peer_has_vnet_hdr(VMXNET3State *s)
         return true;
     }
 
-    VMW_WRPRN("Peer has no virtio extension. Task offloads will be emulated.");
+    if (!qtest_enabled()) {
+        VMW_WRPRN("Peer has no virtio extension. Task offloads will be emulated.");
+    }
     return false;
 }
 
Signature · 1 line
MST
#1 lore raw
Quoted 24 lines · Michael S. Tsirkin

vmxnet3 always produces a warning under qtest.

This is not a user error, don't warn.

---
 hw/net/vmxnet3.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
hw/net/vmxnet3.c +1 -0
index 5e3a233..0e9e6d9 100644
@@ -25,6 +25,7 @@
 #include "qemu/bswap.h"
 #include "hw/pci/msix.h"
 #include "hw/pci/msi.h"
+#include "sysemu/qtest.h"
 
 #include "vmxnet3.h"
 #include "vmxnet_debug.h"

hw/net/vmxnet3.c static bool vmxnet3_peer_has_vnet_hdr(VMXNET3State *s) · line 2024

Quoted 10 lines
hw/net/vmxnet3.c +3 -1
@@ -2015,7 +2016,9 @@ static bool vmxnet3_peer_has_vnet_hdr(VMXNET3State *s)
         return true;
     }
 
-    VMW_WRPRN("Peer has no virtio extension. Task offloads will be emulated.");
+    if (!qtest_enabled()) {
+        VMW_WRPRN("Peer has no virtio extension. Task offloads will be emulated.");
+    }
     return false;
 }
 

Isn't this v1 again? :)

Paolo