[v2,2/4] common/virtio: support cryptodev in vdev setup
Checks
Commit Message
Support cryptodev in vdev setup.
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
drivers/common/virtio/virtio_user/vhost_vdpa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -123,6 +123,7 @@ struct virtio_user_dev {
#define VIRTIO_NET_F_CTRL_VQ 17
#define VIRTIO_F_IOMMU_PLATFORM 33
#define VIRTIO_ID_NETWORK 0x01
+#define VIRTIO_ID_CRYPTO 0x20
static int
vhost_vdpa_set_owner(struct virtio_user_dev *dev)
@@ -561,7 +562,7 @@ vhost_vdpa_setup(struct virtio_user_dev *dev)
}
if (ioctl(data->vhostfd, VHOST_VDPA_GET_DEVICE_ID, &did) < 0 ||
- did != VIRTIO_ID_NETWORK) {
+ (did != VIRTIO_ID_NETWORK) || (did != VIRTIO_ID_CRYPTO)) {
PMD_DRV_LOG(ERR, "Invalid vdpa device ID: %u", did);
close(data->vhostfd);
free(data);