1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2016 Intel Corporation
9 #include <linux/major.h>
11 #include <sys/sysmacros.h>
12 #include <sys/socket.h>
14 #include <rte_malloc.h>
15 #include <rte_kvargs.h>
16 #include <ethdev_vdev.h>
17 #include <rte_bus_vdev.h>
18 #include <rte_alarm.h>
19 #include <rte_cycles.h>
21 #include "virtio_ethdev.h"
22 #include "virtio_logs.h"
24 #include "virtqueue.h"
25 #include "virtio_rxtx.h"
26 #include "virtio_user/virtio_user_dev.h"
27 #include "virtio_user/vhost.h"
29 #define virtio_user_get_dev(hwp) container_of(hwp, struct virtio_user_dev, hw)
32 virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
33 void *dst, int length)
36 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
38 if (offset == offsetof(struct virtio_net_config, mac) &&
39 length == RTE_ETHER_ADDR_LEN) {
40 for (i = 0; i < RTE_ETHER_ADDR_LEN; ++i)
41 ((uint8_t *)dst)[i] = dev->mac_addr[i];
45 if (offset == offsetof(struct virtio_net_config, status)) {
46 virtio_user_dev_update_link_state(dev);
48 *(uint16_t *)dst = dev->net_status;
51 if (offset == offsetof(struct virtio_net_config, max_virtqueue_pairs))
52 *(uint16_t *)dst = dev->max_queue_pairs;
56 virtio_user_write_dev_config(struct virtio_hw *hw, size_t offset,
57 const void *src, int length)
60 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
62 if ((offset == offsetof(struct virtio_net_config, mac)) &&
63 (length == RTE_ETHER_ADDR_LEN))
64 for (i = 0; i < RTE_ETHER_ADDR_LEN; ++i)
65 dev->mac_addr[i] = ((const uint8_t *)src)[i];
67 PMD_DRV_LOG(ERR, "not supported offset=%zu, len=%d",
72 virtio_user_reset(struct virtio_hw *hw)
74 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
76 if (dev->status & VIRTIO_CONFIG_STATUS_DRIVER_OK)
77 virtio_user_stop_device(dev);
81 virtio_user_set_status(struct virtio_hw *hw, uint8_t status)
83 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
84 uint8_t old_status = dev->status;
86 if (status & VIRTIO_CONFIG_STATUS_FEATURES_OK &&
87 ~old_status & VIRTIO_CONFIG_STATUS_FEATURES_OK)
88 virtio_user_dev_set_features(dev);
89 if (status & VIRTIO_CONFIG_STATUS_DRIVER_OK)
90 virtio_user_start_device(dev);
91 else if (status == VIRTIO_CONFIG_STATUS_RESET)
92 virtio_user_reset(hw);
94 virtio_user_dev_set_status(dev, status);
98 virtio_user_get_status(struct virtio_hw *hw)
100 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
102 virtio_user_dev_update_status(dev);
108 virtio_user_get_features(struct virtio_hw *hw)
110 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
112 /* unmask feature bits defined in vhost user protocol */
113 return (dev->device_features | dev->frontend_features) &
114 VIRTIO_PMD_SUPPORTED_GUEST_FEATURES;
118 virtio_user_set_features(struct virtio_hw *hw, uint64_t features)
120 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
122 dev->features = features & (dev->device_features | dev->frontend_features);
126 virtio_user_features_ok(struct virtio_hw *hw __rte_unused)
132 virtio_user_get_isr(struct virtio_hw *hw __rte_unused)
134 /* rxq interrupts and config interrupt are separated in virtio-user,
135 * here we only report config change.
137 return VIRTIO_ISR_CONFIG;
141 virtio_user_set_config_irq(struct virtio_hw *hw __rte_unused,
142 uint16_t vec __rte_unused)
148 virtio_user_set_queue_irq(struct virtio_hw *hw __rte_unused,
149 struct virtqueue *vq __rte_unused,
152 /* pretend we have done that */
156 /* This function is to get the queue size, aka, number of descs, of a specified
157 * queue. Different with the VHOST_USER_GET_QUEUE_NUM, which is used to get the
158 * max supported queues.
161 virtio_user_get_queue_num(struct virtio_hw *hw, uint16_t queue_id __rte_unused)
163 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
165 /* Currently, each queue has same queue size */
166 return dev->queue_size;
170 virtio_user_setup_queue_packed(struct virtqueue *vq,
171 struct virtio_user_dev *dev)
173 uint16_t queue_idx = vq->vq_queue_index;
174 struct vring_packed *vring;
180 vring = &dev->packed_vrings[queue_idx];
181 desc_addr = (uintptr_t)vq->vq_ring_virt_mem;
182 avail_addr = desc_addr + vq->vq_nentries *
183 sizeof(struct vring_packed_desc);
184 used_addr = RTE_ALIGN_CEIL(avail_addr +
185 sizeof(struct vring_packed_desc_event),
187 vring->num = vq->vq_nentries;
188 vring->desc = (void *)(uintptr_t)desc_addr;
189 vring->driver = (void *)(uintptr_t)avail_addr;
190 vring->device = (void *)(uintptr_t)used_addr;
191 dev->packed_queues[queue_idx].avail_wrap_counter = true;
192 dev->packed_queues[queue_idx].used_wrap_counter = true;
194 for (i = 0; i < vring->num; i++)
195 vring->desc[i].flags = 0;
199 virtio_user_setup_queue_split(struct virtqueue *vq, struct virtio_user_dev *dev)
201 uint16_t queue_idx = vq->vq_queue_index;
202 uint64_t desc_addr, avail_addr, used_addr;
204 desc_addr = (uintptr_t)vq->vq_ring_virt_mem;
205 avail_addr = desc_addr + vq->vq_nentries * sizeof(struct vring_desc);
206 used_addr = RTE_ALIGN_CEIL(avail_addr + offsetof(struct vring_avail,
207 ring[vq->vq_nentries]),
210 dev->vrings[queue_idx].num = vq->vq_nentries;
211 dev->vrings[queue_idx].desc = (void *)(uintptr_t)desc_addr;
212 dev->vrings[queue_idx].avail = (void *)(uintptr_t)avail_addr;
213 dev->vrings[queue_idx].used = (void *)(uintptr_t)used_addr;
217 virtio_user_setup_queue(struct virtio_hw *hw, struct virtqueue *vq)
219 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
221 if (virtio_with_packed_queue(hw))
222 virtio_user_setup_queue_packed(vq, dev);
224 virtio_user_setup_queue_split(vq, dev);
230 virtio_user_del_queue(struct virtio_hw *hw, struct virtqueue *vq)
232 /* For legacy devices, write 0 to VIRTIO_PCI_QUEUE_PFN port, QEMU
233 * correspondingly stops the ioeventfds, and reset the status of
235 * For modern devices, set queue desc, avail, used in PCI bar to 0,
236 * not see any more behavior in QEMU.
238 * Here we just care about what information to deliver to vhost-user
239 * or vhost-kernel. So we just close ioeventfd for now.
241 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
243 close(dev->callfds[vq->vq_queue_index]);
244 close(dev->kickfds[vq->vq_queue_index]);
248 virtio_user_notify_queue(struct virtio_hw *hw, struct virtqueue *vq)
251 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
253 if (hw->cvq && (virtnet_cq_to_vq(hw->cvq) == vq)) {
254 if (virtio_with_packed_queue(vq->hw))
255 virtio_user_handle_cq_packed(dev, vq->vq_queue_index);
257 virtio_user_handle_cq(dev, vq->vq_queue_index);
261 if (write(dev->kickfds[vq->vq_queue_index], &buf, sizeof(buf)) < 0)
262 PMD_DRV_LOG(ERR, "failed to kick backend: %s",
267 virtio_user_dev_close(struct virtio_hw *hw)
269 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
271 virtio_user_dev_uninit(dev);
276 const struct virtio_ops virtio_user_ops = {
277 .read_dev_cfg = virtio_user_read_dev_config,
278 .write_dev_cfg = virtio_user_write_dev_config,
279 .get_status = virtio_user_get_status,
280 .set_status = virtio_user_set_status,
281 .get_features = virtio_user_get_features,
282 .set_features = virtio_user_set_features,
283 .features_ok = virtio_user_features_ok,
284 .get_isr = virtio_user_get_isr,
285 .set_config_irq = virtio_user_set_config_irq,
286 .set_queue_irq = virtio_user_set_queue_irq,
287 .get_queue_num = virtio_user_get_queue_num,
288 .setup_queue = virtio_user_setup_queue,
289 .del_queue = virtio_user_del_queue,
290 .notify_queue = virtio_user_notify_queue,
291 .dev_close = virtio_user_dev_close,
294 static const char *valid_args[] = {
295 #define VIRTIO_USER_ARG_QUEUES_NUM "queues"
296 VIRTIO_USER_ARG_QUEUES_NUM,
297 #define VIRTIO_USER_ARG_CQ_NUM "cq"
298 VIRTIO_USER_ARG_CQ_NUM,
299 #define VIRTIO_USER_ARG_MAC "mac"
301 #define VIRTIO_USER_ARG_PATH "path"
302 VIRTIO_USER_ARG_PATH,
303 #define VIRTIO_USER_ARG_QUEUE_SIZE "queue_size"
304 VIRTIO_USER_ARG_QUEUE_SIZE,
305 #define VIRTIO_USER_ARG_INTERFACE_NAME "iface"
306 VIRTIO_USER_ARG_INTERFACE_NAME,
307 #define VIRTIO_USER_ARG_SERVER_MODE "server"
308 VIRTIO_USER_ARG_SERVER_MODE,
309 #define VIRTIO_USER_ARG_MRG_RXBUF "mrg_rxbuf"
310 VIRTIO_USER_ARG_MRG_RXBUF,
311 #define VIRTIO_USER_ARG_IN_ORDER "in_order"
312 VIRTIO_USER_ARG_IN_ORDER,
313 #define VIRTIO_USER_ARG_PACKED_VQ "packed_vq"
314 VIRTIO_USER_ARG_PACKED_VQ,
315 #define VIRTIO_USER_ARG_SPEED "speed"
316 VIRTIO_USER_ARG_SPEED,
317 #define VIRTIO_USER_ARG_VECTORIZED "vectorized"
318 VIRTIO_USER_ARG_VECTORIZED,
322 #define VIRTIO_USER_DEF_CQ_EN 0
323 #define VIRTIO_USER_DEF_Q_NUM 1
324 #define VIRTIO_USER_DEF_Q_SZ 256
325 #define VIRTIO_USER_DEF_SERVER_MODE 0
328 get_string_arg(const char *key __rte_unused,
329 const char *value, void *extra_args)
331 if (!value || !extra_args)
334 *(char **)extra_args = strdup(value);
336 if (!*(char **)extra_args)
343 get_integer_arg(const char *key __rte_unused,
344 const char *value, void *extra_args)
346 uint64_t integer = 0;
347 if (!value || !extra_args)
350 integer = strtoull(value, NULL, 0);
351 /* extra_args keeps default value, it should be replaced
352 * only in case of successful parsing of the 'value' arg
355 *(uint64_t *)extra_args = integer;
360 vdpa_dynamic_major_num(void)
369 fp = fopen("/proc/devices", "r");
371 PMD_INIT_LOG(ERR, "Cannot open /proc/devices: %s",
373 return UNNAMED_MAJOR;
376 while (getline(&line, &size, fp) > 0) {
377 char *stripped = line + strspn(line, " ");
378 if ((sscanf(stripped, "%u %10s", &num, name) == 2) &&
379 (strncmp(name, "vhost-vdpa", 10) == 0)) {
386 return found ? num : UNNAMED_MAJOR;
389 static enum virtio_user_backend_type
390 virtio_user_backend_type(const char *path)
394 if (stat(path, &sb) == -1) {
396 return VIRTIO_USER_BACKEND_VHOST_USER;
398 PMD_INIT_LOG(ERR, "Stat fails: %s (%s)\n", path,
400 return VIRTIO_USER_BACKEND_UNKNOWN;
403 if (S_ISSOCK(sb.st_mode)) {
404 return VIRTIO_USER_BACKEND_VHOST_USER;
405 } else if (S_ISCHR(sb.st_mode)) {
406 if (major(sb.st_rdev) == MISC_MAJOR)
407 return VIRTIO_USER_BACKEND_VHOST_KERNEL;
408 if (major(sb.st_rdev) == vdpa_dynamic_major_num())
409 return VIRTIO_USER_BACKEND_VHOST_VDPA;
411 return VIRTIO_USER_BACKEND_UNKNOWN;
414 static struct rte_eth_dev *
415 virtio_user_eth_dev_alloc(struct rte_vdev_device *vdev)
417 struct rte_eth_dev *eth_dev;
418 struct rte_eth_dev_data *data;
419 struct virtio_hw *hw;
420 struct virtio_user_dev *dev;
422 eth_dev = rte_eth_vdev_allocate(vdev, sizeof(*dev));
424 PMD_INIT_LOG(ERR, "cannot alloc rte_eth_dev");
428 data = eth_dev->data;
429 dev = eth_dev->data->dev_private;
432 hw->port_id = data->port_id;
433 VIRTIO_OPS(hw) = &virtio_user_ops;
438 hw->use_inorder_rx = 0;
439 hw->use_inorder_tx = 0;
445 virtio_user_eth_dev_free(struct rte_eth_dev *eth_dev)
447 rte_eth_dev_release_port(eth_dev);
450 /* Dev initialization routine. Invoked once for each virtio vdev at
451 * EAL init time, see rte_bus_probe().
452 * Returns 0 on success.
455 virtio_user_pmd_probe(struct rte_vdev_device *vdev)
457 struct rte_kvargs *kvlist = NULL;
458 struct rte_eth_dev *eth_dev;
459 struct virtio_hw *hw;
460 struct virtio_user_dev *dev;
461 enum virtio_user_backend_type backend_type = VIRTIO_USER_BACKEND_UNKNOWN;
462 uint64_t queues = VIRTIO_USER_DEF_Q_NUM;
463 uint64_t cq = VIRTIO_USER_DEF_CQ_EN;
464 uint64_t queue_size = VIRTIO_USER_DEF_Q_SZ;
465 uint64_t server_mode = VIRTIO_USER_DEF_SERVER_MODE;
466 uint64_t mrg_rxbuf = 1;
467 uint64_t in_order = 1;
468 uint64_t packed_vq = 0;
469 uint64_t vectorized = 0;
472 char *mac_addr = NULL;
475 RTE_BUILD_BUG_ON(offsetof(struct virtio_user_dev, hw) != 0);
477 if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
478 const char *name = rte_vdev_device_name(vdev);
479 eth_dev = rte_eth_dev_attach_secondary(name);
481 PMD_INIT_LOG(ERR, "Failed to probe %s", name);
485 dev = eth_dev->data->dev_private;
487 VIRTIO_OPS(hw) = &virtio_user_ops;
489 if (eth_virtio_dev_init(eth_dev) < 0) {
490 PMD_INIT_LOG(ERR, "eth_virtio_dev_init fails");
491 rte_eth_dev_release_port(eth_dev);
495 eth_dev->dev_ops = &virtio_user_secondary_eth_dev_ops;
496 eth_dev->device = &vdev->device;
497 rte_eth_dev_probing_finish(eth_dev);
501 kvlist = rte_kvargs_parse(rte_vdev_device_args(vdev), valid_args);
503 PMD_INIT_LOG(ERR, "error when parsing param");
507 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1) {
508 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_PATH,
509 &get_string_arg, &path) < 0) {
510 PMD_INIT_LOG(ERR, "error to parse %s",
511 VIRTIO_USER_ARG_PATH);
515 PMD_INIT_LOG(ERR, "arg %s is mandatory for virtio_user",
516 VIRTIO_USER_ARG_PATH);
520 backend_type = virtio_user_backend_type(path);
521 if (backend_type == VIRTIO_USER_BACKEND_UNKNOWN) {
523 "unable to determine backend type for path %s",
527 PMD_INIT_LOG(INFO, "Backend type detected: %s",
528 virtio_user_backend_strings[backend_type]);
530 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_INTERFACE_NAME) == 1) {
531 if (backend_type != VIRTIO_USER_BACKEND_VHOST_KERNEL) {
533 "arg %s applies only to vhost-kernel backend",
534 VIRTIO_USER_ARG_INTERFACE_NAME);
538 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_INTERFACE_NAME,
539 &get_string_arg, &ifname) < 0) {
540 PMD_INIT_LOG(ERR, "error to parse %s",
541 VIRTIO_USER_ARG_INTERFACE_NAME);
546 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_MAC) == 1) {
547 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_MAC,
548 &get_string_arg, &mac_addr) < 0) {
549 PMD_INIT_LOG(ERR, "error to parse %s",
550 VIRTIO_USER_ARG_MAC);
555 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_QUEUE_SIZE) == 1) {
556 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_QUEUE_SIZE,
557 &get_integer_arg, &queue_size) < 0) {
558 PMD_INIT_LOG(ERR, "error to parse %s",
559 VIRTIO_USER_ARG_QUEUE_SIZE);
564 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_QUEUES_NUM) == 1) {
565 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_QUEUES_NUM,
566 &get_integer_arg, &queues) < 0) {
567 PMD_INIT_LOG(ERR, "error to parse %s",
568 VIRTIO_USER_ARG_QUEUES_NUM);
573 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_SERVER_MODE) == 1) {
574 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_SERVER_MODE,
575 &get_integer_arg, &server_mode) < 0) {
576 PMD_INIT_LOG(ERR, "error to parse %s",
577 VIRTIO_USER_ARG_SERVER_MODE);
582 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_CQ_NUM) == 1) {
583 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_CQ_NUM,
584 &get_integer_arg, &cq) < 0) {
585 PMD_INIT_LOG(ERR, "error to parse %s",
586 VIRTIO_USER_ARG_CQ_NUM);
589 } else if (queues > 1) {
593 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PACKED_VQ) == 1) {
594 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_PACKED_VQ,
595 &get_integer_arg, &packed_vq) < 0) {
596 PMD_INIT_LOG(ERR, "error to parse %s",
597 VIRTIO_USER_ARG_PACKED_VQ);
602 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_VECTORIZED) == 1) {
603 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_VECTORIZED,
604 &get_integer_arg, &vectorized) < 0) {
605 PMD_INIT_LOG(ERR, "error to parse %s",
606 VIRTIO_USER_ARG_VECTORIZED);
611 if (queues > 1 && cq == 0) {
612 PMD_INIT_LOG(ERR, "multi-q requires ctrl-q");
616 if (queues > VIRTIO_MAX_VIRTQUEUE_PAIRS) {
617 PMD_INIT_LOG(ERR, "arg %s %" PRIu64 " exceeds the limit %u",
618 VIRTIO_USER_ARG_QUEUES_NUM, queues,
619 VIRTIO_MAX_VIRTQUEUE_PAIRS);
623 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_MRG_RXBUF) == 1) {
624 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_MRG_RXBUF,
625 &get_integer_arg, &mrg_rxbuf) < 0) {
626 PMD_INIT_LOG(ERR, "error to parse %s",
627 VIRTIO_USER_ARG_MRG_RXBUF);
632 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_IN_ORDER) == 1) {
633 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_IN_ORDER,
634 &get_integer_arg, &in_order) < 0) {
635 PMD_INIT_LOG(ERR, "error to parse %s",
636 VIRTIO_USER_ARG_IN_ORDER);
641 eth_dev = virtio_user_eth_dev_alloc(vdev);
643 PMD_INIT_LOG(ERR, "virtio_user fails to alloc device");
647 dev = eth_dev->data->dev_private;
649 if (virtio_user_dev_init(dev, path, queues, cq,
650 queue_size, mac_addr, &ifname, server_mode,
651 mrg_rxbuf, in_order, packed_vq, backend_type) < 0) {
652 PMD_INIT_LOG(ERR, "virtio_user_dev_init fails");
653 virtio_user_eth_dev_free(eth_dev);
657 /* previously called by pci probing for physical dev */
658 if (eth_virtio_dev_init(eth_dev) < 0) {
659 PMD_INIT_LOG(ERR, "eth_virtio_dev_init fails");
660 virtio_user_eth_dev_free(eth_dev);
666 #if defined(CC_AVX512_SUPPORT) || defined(RTE_ARCH_ARM)
671 "building environment do not support packed ring vectorized");
678 rte_eth_dev_probing_finish(eth_dev);
683 rte_kvargs_free(kvlist);
694 virtio_user_pmd_remove(struct rte_vdev_device *vdev)
697 struct rte_eth_dev *eth_dev;
702 name = rte_vdev_device_name(vdev);
703 PMD_DRV_LOG(INFO, "Un-Initializing %s", name);
704 eth_dev = rte_eth_dev_allocated(name);
705 /* Port has already been released by close. */
709 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
710 return rte_eth_dev_release_port(eth_dev);
712 /* make sure the device is stopped, queues freed */
713 return rte_eth_dev_close(eth_dev->data->port_id);
716 static int virtio_user_pmd_dma_map(struct rte_vdev_device *vdev, void *addr,
717 uint64_t iova, size_t len)
720 struct rte_eth_dev *eth_dev;
721 struct virtio_user_dev *dev;
726 name = rte_vdev_device_name(vdev);
727 eth_dev = rte_eth_dev_allocated(name);
728 /* Port has already been released by close. */
732 dev = eth_dev->data->dev_private;
734 if (dev->ops->dma_map)
735 return dev->ops->dma_map(dev, addr, iova, len);
740 static int virtio_user_pmd_dma_unmap(struct rte_vdev_device *vdev, void *addr,
741 uint64_t iova, size_t len)
744 struct rte_eth_dev *eth_dev;
745 struct virtio_user_dev *dev;
750 name = rte_vdev_device_name(vdev);
751 eth_dev = rte_eth_dev_allocated(name);
752 /* Port has already been released by close. */
756 dev = eth_dev->data->dev_private;
758 if (dev->ops->dma_unmap)
759 return dev->ops->dma_unmap(dev, addr, iova, len);
764 static struct rte_vdev_driver virtio_user_driver = {
765 .probe = virtio_user_pmd_probe,
766 .remove = virtio_user_pmd_remove,
767 .dma_map = virtio_user_pmd_dma_map,
768 .dma_unmap = virtio_user_pmd_dma_unmap,
769 .drv_flags = RTE_VDEV_DRV_NEED_IOVA_AS_VA,
772 RTE_PMD_REGISTER_VDEV(net_virtio_user, virtio_user_driver);
773 RTE_PMD_REGISTER_ALIAS(net_virtio_user, virtio_user);
774 RTE_PMD_REGISTER_PARAM_STRING(net_virtio_user,