diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-06-15 11:41:44 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-06-15 11:41:44 +0100 |
commit | 91fe7a376ad46e3cc5e82d418aad22173c948a3c (patch) | |
tree | 076c5367d214228c7344bd08cf16e5aa3fb1ad4d | |
parent | 409c241f887a38bb7a2ac12e34d3a8d73922a9a5 (diff) | |
parent | c67daf4a24442d1bb404a11a6a54dc45ea10f234 (diff) |
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
# gpg: Signature made Fri 15 Jun 2018 03:47:09 BST
# gpg: using RSA key EF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211
* remotes/jasowang/tags/net-pull-request:
vhost-user: delete net client if necessary
e1000e: Do not auto-clear ICR bits which aren't set in EIAC
net: Fix a potential segfault
tap: set vhostfd passed from qemu cli to non-blocking
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/net/e1000e_core.c | 4 | ||||
-rw-r--r-- | net/net.c | 4 | ||||
-rw-r--r-- | net/tap.c | 2 | ||||
-rw-r--r-- | net/vhost-user.c | 3 |
4 files changed, 8 insertions, 5 deletions
diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index c93c4661ed..950489160a 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -2022,10 +2022,6 @@ e1000e_msix_notify_one(E1000ECore *core, uint32_t cause, uint32_t int_cfg) effective_eiac = core->mac[EIAC] & cause; - if (effective_eiac == E1000_ICR_OTHER) { - effective_eiac |= E1000_ICR_OTHER_CAUSES; - } - core->mac[ICR] &= ~effective_eiac; if (!(core->mac[CTRL_EXT] & E1000_CTRL_EXT_IAME)) { @@ -1093,7 +1093,9 @@ static int net_client_init(QemuOpts *opts, bool is_netdev, Error **errp) int ret = -1; Visitor *v = opts_visitor_new(opts); - if (is_netdev && is_help_option(qemu_opt_get(opts, "type"))) { + const char *type = qemu_opt_get(opts, "type"); + + if (is_netdev && type && is_help_option(type)) { show_netdevs(); exit(0); } else { @@ -40,6 +40,7 @@ #include "qemu-common.h" #include "qemu/cutils.h" #include "qemu/error-report.h" +#include "qemu/sockets.h" #include "net/tap.h" @@ -693,6 +694,7 @@ static void net_init_tap_one(const NetdevTapOptions *tap, NetClientState *peer, } return; } + qemu_set_nonblock(vhostfd); } else { vhostfd = open("/dev/vhost-net", O_RDWR); if (vhostfd < 0) { diff --git a/net/vhost-user.c b/net/vhost-user.c index 608b837175..a39f9c9974 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -345,6 +345,9 @@ err: s->vhost_user = NULL; } } + if (nc0) { + qemu_del_net_client(nc0); + } return -1; } |