[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V5 for 3.1 2/5] net: hub: suppress warnings of n
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PATCH V5 for 3.1 2/5] net: hub: suppress warnings of no host network for qtest |
Date: |
Tue, 4 Dec 2018 06:58:46 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 2018-12-04 04:53, Jason Wang wrote:
> If we want to qtest through hub, it would be much more simpler and
> safer to configure the hub without host network. So silent this
> warnings for qtest.
>
> Signed-off-by: Jason Wang <address@hidden>
> ---
> net/hub.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/hub.c b/net/hub.c
> index 78b671ed95..5795a678ed 100644
> --- a/net/hub.c
> +++ b/net/hub.c
> @@ -20,6 +20,7 @@
> #include "hub.h"
> #include "qemu/iov.h"
> #include "qemu/error-report.h"
> +#include "sysemu/qtest.h"
>
> /*
> * A hub broadcasts incoming packets to all its ports except the source port.
> @@ -346,7 +347,7 @@ void net_hub_check_clients(void)
> if (has_host_dev && !has_nic) {
> warn_report("hub %d with no nics", hub->id);
> }
> - if (has_nic && !has_host_dev) {
> + if (has_nic && !has_host_dev && !qtest_enabled()) {
> warn_report("hub %d is not connected to host network", hub->id);
> }
> }
Sounds fine to me.
Reviewed-by: Thomas Huth <address@hidden>
- [Qemu-devel] [PATCH V5 for 3.1 0/5] Fix possible OOB during queuing packets, Jason Wang, 2018/12/03
- [Qemu-devel] [PATCH V5 for 3.1 4/5] virtio-net-test: remove unused macro, Jason Wang, 2018/12/03
- [Qemu-devel] [PATCH V5 for 3.1 2/5] net: hub: suppress warnings of no host network for qtest, Jason Wang, 2018/12/03
- Re: [Qemu-devel] [PATCH V5 for 3.1 2/5] net: hub: suppress warnings of no host network for qtest,
Thomas Huth <=
- [Qemu-devel] [PATCH V5 for 3.1 1/5] net: drop too large packet early, Jason Wang, 2018/12/03
- [Qemu-devel] [PATCH V5 for 3.1 3/5] virtio-net-test: accept variable length argument in pci_test_start(), Jason Wang, 2018/12/03
- [Qemu-devel] [PATCH V5 for 3.1 5/5] virtio-net-test: add large tx buffer test, Jason Wang, 2018/12/03
- Re: [Qemu-devel] [PATCH V5 for 3.1 0/5] Fix possible OOB during queuing packets, Peter Maydell, 2018/12/04