virtio/user: negotiate VHOST_USER_PROTOCOL_F_CONFIG
It was introduced a while after the original GET/SET_CONFIG implementation in QEMU, but within the same QEMU release (2.12?). It is required by the vhost-user spec. Rte_vhost doesn't check it, so everything worked so far, but other implementations might (and should) reject our GET_CONFIG requests right now. As a part of this feature, we should also check the same flag before sending GET/SET_CONFIG messages to respect those devices that really don't implement F_CONFIG. This is done in a separate patch. Change-Id: Ib7e9b11a0074f4aee70609af0cad2ef59a8bf427 Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/417459 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
0b9e4c8ff7
commit
48322f0c37
@ -47,7 +47,8 @@
|
||||
#include "spdk_internal/virtio.h"
|
||||
|
||||
#define VIRTIO_USER_SUPPORTED_PROTOCOL_FEATURES \
|
||||
((1ULL << VHOST_USER_PROTOCOL_F_MQ))
|
||||
((1ULL << VHOST_USER_PROTOCOL_F_MQ) | \
|
||||
(1ULL << VHOST_USER_PROTOCOL_F_CONFIG))
|
||||
|
||||
static int
|
||||
virtio_user_create_queue(struct virtio_dev *vdev, uint32_t queue_sel)
|
||||
|
@ -47,6 +47,10 @@
|
||||
#define VHOST_USER_PROTOCOL_F_MQ 0
|
||||
#endif
|
||||
|
||||
#ifndef VHOST_USER_PROTOCOL_F_CONFIG
|
||||
#define VHOST_USER_PROTOCOL_F_CONFIG 9
|
||||
#endif
|
||||
|
||||
enum vhost_user_request {
|
||||
VHOST_USER_NONE = 0,
|
||||
VHOST_USER_GET_FEATURES = 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user