Spdk/lib/bdev/virtio/rte_virtio/virtio_user
Dariusz Stojaczyk 1f5316e95c rte_virtio: cleanup feature negotiation
Moved virtio backend specific code out
of common feature negotiation path.

virtio-pci features are stored in PCI
register. Before feature negotiation
they can be considered device (host)
features. They have to be negotiated
with local features and written back
into the very same register.

For virtio-user, the situation is a
bit different - vhost-user protocol
contains two feature-related commands
GET_FEATURES and SET_FEATURES. While
SET_ sends already negotiated features,
GET_ always returns device (host)
features.

Previously, we used to store native
device (host) features in local
variables to (ineptly) make the
negotiation path the same for
virtio-pci and virtio-user.

Instead of fixing this functionality,
it has been removed. Now, the
vtpci->get_features might be either
negotiated or not. This is now stated
in this function's doc.

This solution doesn't have any
drawbacks and simplifies the code.

Change-Id: I270e9cad8baaeae61b58992ee06e9069eac10aaf
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/381472
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-06 17:15:19 -04:00
..
vhost_user.c rte_virtio: fix access to unaligned struct 2017-10-05 19:15:12 -04:00
vhost.h rte_virtio: added virtio_queue.c/.h 2017-09-15 16:32:20 -04:00
virtio_user_dev.c rte_virtio: cleanup feature negotiation 2017-10-06 17:15:19 -04:00
virtio_user_dev.h rte_virtio: cleanup feature negotiation 2017-10-06 17:15:19 -04:00