diff options
author | Steven Luong <sluong@cisco.com> | 2019-07-18 18:38:52 -0700 |
---|---|---|
committer | Yichen Wang <yicwang@cisco.com> | 2019-07-23 16:53:52 +0000 |
commit | f92205ff63841c2ebfc4c6df731b43830125762d (patch) | |
tree | 3338bd1e533cbaf9da3f8b748f0c82f4a4dde582 | |
parent | bef25c30a1b77863de2c673903266397e4350e78 (diff) |
devices: vhost handling VHOST_USER_SET_FEATURES
Some combinations of new qemu (2.11) and old dpdk (16.10) may
send VHOST_USER_SET_FEATURES at the end of the protocol exchange
which the vhost interface is already declared up and ready.
Unfortunately, the process of VHOST_USER_SET_FEATURES will cause
the interface to go down. Not sure if it is correct or needed.
Because there is no additional messages thereafter, the hardware
interface stays down.
The fix is to check the interface again at the end of processing
VHOST_USER_SET_FEATURES. If it is up and ready, we bring back
the hardware interface.
Type: fix
Change-Id: I490cd03820deacbd8b44d8f2cb38c26349dbe3b2
Signed-off-by: Steven Luong <sluong@cisco.com>
(cherry picked from commit 545866b5b3115b7de114bdb7883f5ece59b702d4)
-rw-r--r-- | src/vnet/devices/virtio/vhost_user.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/vhost_user.c b/src/vnet/devices/virtio/vhost_user.c index 1d52b42b73b..f16d015ef5a 100644 --- a/src/vnet/devices/virtio/vhost_user.c +++ b/src/vnet/devices/virtio/vhost_user.c @@ -494,6 +494,7 @@ vhost_user_socket_read (clib_file_t * uf) ASSERT (vui->virtio_net_hdr_sz < VLIB_BUFFER_PRE_DATA_SIZE); vnet_hw_interface_set_flags (vnm, vui->hw_if_index, 0); vui->is_ready = 0; + vhost_user_update_iface_state (vui); break; case VHOST_USER_SET_MEM_TABLE: |