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 & VIRTIO_PMD_SUPPORTED_GUEST_FEATURES;
117 virtio_user_set_features(struct virtio_hw *hw, uint64_t features)
119 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
121 dev->features = features & dev->device_features;
125 virtio_user_features_ok(struct virtio_hw *hw __rte_unused)
131 virtio_user_get_isr(struct virtio_hw *hw __rte_unused)
133 /* rxq interrupts and config interrupt are separated in virtio-user,
134 * here we only report config change.
136 return VIRTIO_ISR_CONFIG;
140 virtio_user_set_config_irq(struct virtio_hw *hw __rte_unused,
141 uint16_t vec __rte_unused)
147 virtio_user_set_queue_irq(struct virtio_hw *hw __rte_unused,
148 struct virtqueue *vq __rte_unused,
151 /* pretend we have done that */
155 /* This function is to get the queue size, aka, number of descs, of a specified
156 * queue. Different with the VHOST_USER_GET_QUEUE_NUM, which is used to get the
157 * max supported queues.
160 virtio_user_get_queue_num(struct virtio_hw *hw, uint16_t queue_id __rte_unused)
162 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
164 /* Currently, each queue has same queue size */
165 return dev->queue_size;
169 virtio_user_setup_queue_packed(struct virtqueue *vq,
170 struct virtio_user_dev *dev)
172 uint16_t queue_idx = vq->vq_queue_index;
173 struct vring_packed *vring;
179 vring = &dev->packed_vrings[queue_idx];
180 desc_addr = (uintptr_t)vq->vq_ring_virt_mem;
181 avail_addr = desc_addr + vq->vq_nentries *
182 sizeof(struct vring_packed_desc);
183 used_addr = RTE_ALIGN_CEIL(avail_addr +
184 sizeof(struct vring_packed_desc_event),
186 vring->num = vq->vq_nentries;
187 vring->desc = (void *)(uintptr_t)desc_addr;
188 vring->driver = (void *)(uintptr_t)avail_addr;
189 vring->device = (void *)(uintptr_t)used_addr;
190 dev->packed_queues[queue_idx].avail_wrap_counter = true;
191 dev->packed_queues[queue_idx].used_wrap_counter = true;
193 for (i = 0; i < vring->num; i++)
194 vring->desc[i].flags = 0;
198 virtio_user_setup_queue_split(struct virtqueue *vq, struct virtio_user_dev *dev)
200 uint16_t queue_idx = vq->vq_queue_index;
201 uint64_t desc_addr, avail_addr, used_addr;
203 desc_addr = (uintptr_t)vq->vq_ring_virt_mem;
204 avail_addr = desc_addr + vq->vq_nentries * sizeof(struct vring_desc);
205 used_addr = RTE_ALIGN_CEIL(avail_addr + offsetof(struct vring_avail,
206 ring[vq->vq_nentries]),
209 dev->vrings[queue_idx].num = vq->vq_nentries;
210 dev->vrings[queue_idx].desc = (void *)(uintptr_t)desc_addr;
211 dev->vrings[queue_idx].avail = (void *)(uintptr_t)avail_addr;
212 dev->vrings[queue_idx].used = (void *)(uintptr_t)used_addr;
216 virtio_user_setup_queue(struct virtio_hw *hw, struct virtqueue *vq)
218 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
220 if (virtio_with_packed_queue(hw))
221 virtio_user_setup_queue_packed(vq, dev);
223 virtio_user_setup_queue_split(vq, dev);
229 virtio_user_del_queue(struct virtio_hw *hw, struct virtqueue *vq)
231 /* For legacy devices, write 0 to VIRTIO_PCI_QUEUE_PFN port, QEMU
232 * correspondingly stops the ioeventfds, and reset the status of
234 * For modern devices, set queue desc, avail, used in PCI bar to 0,
235 * not see any more behavior in QEMU.
237 * Here we just care about what information to deliver to vhost-user
238 * or vhost-kernel. So we just close ioeventfd for now.
240 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
242 close(dev->callfds[vq->vq_queue_index]);
243 close(dev->kickfds[vq->vq_queue_index]);
247 virtio_user_notify_queue(struct virtio_hw *hw, struct virtqueue *vq)
250 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
252 if (hw->cvq && (virtnet_cq_to_vq(hw->cvq) == vq)) {
253 if (virtio_with_packed_queue(vq->hw))
254 virtio_user_handle_cq_packed(dev, vq->vq_queue_index);
256 virtio_user_handle_cq(dev, vq->vq_queue_index);
260 if (write(dev->kickfds[vq->vq_queue_index], &buf, sizeof(buf)) < 0)
261 PMD_DRV_LOG(ERR, "failed to kick backend: %s",
266 virtio_user_dev_close(struct virtio_hw *hw)
268 struct virtio_user_dev *dev = virtio_user_get_dev(hw);
270 virtio_user_dev_uninit(dev);
275 const struct virtio_ops virtio_user_ops = {
276 .read_dev_cfg = virtio_user_read_dev_config,
277 .write_dev_cfg = virtio_user_write_dev_config,
278 .get_status = virtio_user_get_status,
279 .set_status = virtio_user_set_status,
280 .get_features = virtio_user_get_features,
281 .set_features = virtio_user_set_features,
282 .features_ok = virtio_user_features_ok,
283 .get_isr = virtio_user_get_isr,
284 .set_config_irq = virtio_user_set_config_irq,
285 .set_queue_irq = virtio_user_set_queue_irq,
286 .get_queue_num = virtio_user_get_queue_num,
287 .setup_queue = virtio_user_setup_queue,
288 .del_queue = virtio_user_del_queue,
289 .notify_queue = virtio_user_notify_queue,
290 .dev_close = virtio_user_dev_close,
293 static const char *valid_args[] = {
294 #define VIRTIO_USER_ARG_QUEUES_NUM "queues"
295 VIRTIO_USER_ARG_QUEUES_NUM,
296 #define VIRTIO_USER_ARG_CQ_NUM "cq"
297 VIRTIO_USER_ARG_CQ_NUM,
298 #define VIRTIO_USER_ARG_MAC "mac"
300 #define VIRTIO_USER_ARG_PATH "path"
301 VIRTIO_USER_ARG_PATH,
302 #define VIRTIO_USER_ARG_QUEUE_SIZE "queue_size"
303 VIRTIO_USER_ARG_QUEUE_SIZE,
304 #define VIRTIO_USER_ARG_INTERFACE_NAME "iface"
305 VIRTIO_USER_ARG_INTERFACE_NAME,
306 #define VIRTIO_USER_ARG_SERVER_MODE "server"
307 VIRTIO_USER_ARG_SERVER_MODE,
308 #define VIRTIO_USER_ARG_MRG_RXBUF "mrg_rxbuf"
309 VIRTIO_USER_ARG_MRG_RXBUF,
310 #define VIRTIO_USER_ARG_IN_ORDER "in_order"
311 VIRTIO_USER_ARG_IN_ORDER,
312 #define VIRTIO_USER_ARG_PACKED_VQ "packed_vq"
313 VIRTIO_USER_ARG_PACKED_VQ,
314 #define VIRTIO_USER_ARG_SPEED "speed"
315 VIRTIO_USER_ARG_SPEED,
316 #define VIRTIO_USER_ARG_VECTORIZED "vectorized"
317 VIRTIO_USER_ARG_VECTORIZED,
321 #define VIRTIO_USER_DEF_CQ_EN 0
322 #define VIRTIO_USER_DEF_Q_NUM 1
323 #define VIRTIO_USER_DEF_Q_SZ 256
324 #define VIRTIO_USER_DEF_SERVER_MODE 0
327 get_string_arg(const char *key __rte_unused,
328 const char *value, void *extra_args)
330 if (!value || !extra_args)
333 *(char **)extra_args = strdup(value);
335 if (!*(char **)extra_args)
342 get_integer_arg(const char *key __rte_unused,
343 const char *value, void *extra_args)
345 uint64_t integer = 0;
346 if (!value || !extra_args)
349 integer = strtoull(value, NULL, 0);
350 /* extra_args keeps default value, it should be replaced
351 * only in case of successful parsing of the 'value' arg
354 *(uint64_t *)extra_args = integer;
359 vdpa_dynamic_major_num(void)
368 fp = fopen("/proc/devices", "r");
370 PMD_INIT_LOG(ERR, "Cannot open /proc/devices: %s",
372 return UNNAMED_MAJOR;
375 while (getline(&line, &size, fp) > 0) {
376 char *stripped = line + strspn(line, " ");
377 if ((sscanf(stripped, "%u %10s", &num, name) == 2) &&
378 (strncmp(name, "vhost-vdpa", 10) == 0)) {
384 return found ? num : UNNAMED_MAJOR;
387 static enum virtio_user_backend_type
388 virtio_user_backend_type(const char *path)
392 if (stat(path, &sb) == -1) {
394 return VIRTIO_USER_BACKEND_VHOST_USER;
396 PMD_INIT_LOG(ERR, "Stat fails: %s (%s)\n", path,
398 return VIRTIO_USER_BACKEND_UNKNOWN;
401 if (S_ISSOCK(sb.st_mode)) {
402 return VIRTIO_USER_BACKEND_VHOST_USER;
403 } else if (S_ISCHR(sb.st_mode)) {
404 if (major(sb.st_rdev) == MISC_MAJOR)
405 return VIRTIO_USER_BACKEND_VHOST_KERNEL;
406 if (major(sb.st_rdev) == vdpa_dynamic_major_num())
407 return VIRTIO_USER_BACKEND_VHOST_VDPA;
409 return VIRTIO_USER_BACKEND_UNKNOWN;
412 static struct rte_eth_dev *
413 virtio_user_eth_dev_alloc(struct rte_vdev_device *vdev)
415 struct rte_eth_dev *eth_dev;
416 struct rte_eth_dev_data *data;
417 struct virtio_hw *hw;
418 struct virtio_user_dev *dev;
420 eth_dev = rte_eth_vdev_allocate(vdev, sizeof(*dev));
422 PMD_INIT_LOG(ERR, "cannot alloc rte_eth_dev");
426 data = eth_dev->data;
427 dev = eth_dev->data->dev_private;
430 hw->port_id = data->port_id;
431 VIRTIO_OPS(hw) = &virtio_user_ops;
436 hw->use_inorder_rx = 0;
437 hw->use_inorder_tx = 0;
443 virtio_user_eth_dev_free(struct rte_eth_dev *eth_dev)
445 rte_eth_dev_release_port(eth_dev);
448 /* Dev initialization routine. Invoked once for each virtio vdev at
449 * EAL init time, see rte_bus_probe().
450 * Returns 0 on success.
453 virtio_user_pmd_probe(struct rte_vdev_device *vdev)
455 struct rte_kvargs *kvlist = NULL;
456 struct rte_eth_dev *eth_dev;
457 struct virtio_hw *hw;
458 struct virtio_user_dev *dev;
459 enum virtio_user_backend_type backend_type = VIRTIO_USER_BACKEND_UNKNOWN;
460 uint64_t queues = VIRTIO_USER_DEF_Q_NUM;
461 uint64_t cq = VIRTIO_USER_DEF_CQ_EN;
462 uint64_t queue_size = VIRTIO_USER_DEF_Q_SZ;
463 uint64_t server_mode = VIRTIO_USER_DEF_SERVER_MODE;
464 uint64_t mrg_rxbuf = 1;
465 uint64_t in_order = 1;
466 uint64_t packed_vq = 0;
467 uint64_t vectorized = 0;
470 char *mac_addr = NULL;
473 RTE_BUILD_BUG_ON(offsetof(struct virtio_user_dev, hw) != 0);
475 if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
476 const char *name = rte_vdev_device_name(vdev);
477 eth_dev = rte_eth_dev_attach_secondary(name);
479 PMD_INIT_LOG(ERR, "Failed to probe %s", name);
483 dev = eth_dev->data->dev_private;
485 VIRTIO_OPS(hw) = &virtio_user_ops;
487 if (eth_virtio_dev_init(eth_dev) < 0) {
488 PMD_INIT_LOG(ERR, "eth_virtio_dev_init fails");
489 rte_eth_dev_release_port(eth_dev);
493 eth_dev->dev_ops = &virtio_user_secondary_eth_dev_ops;
494 eth_dev->device = &vdev->device;
495 rte_eth_dev_probing_finish(eth_dev);
499 kvlist = rte_kvargs_parse(rte_vdev_device_args(vdev), valid_args);
501 PMD_INIT_LOG(ERR, "error when parsing param");
505 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1) {
506 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_PATH,
507 &get_string_arg, &path) < 0) {
508 PMD_INIT_LOG(ERR, "error to parse %s",
509 VIRTIO_USER_ARG_PATH);
513 PMD_INIT_LOG(ERR, "arg %s is mandatory for virtio_user",
514 VIRTIO_USER_ARG_PATH);
518 backend_type = virtio_user_backend_type(path);
519 if (backend_type == VIRTIO_USER_BACKEND_UNKNOWN) {
521 "unable to determine backend type for path %s",
525 PMD_INIT_LOG(INFO, "Backend type detected: %s",
526 virtio_user_backend_strings[backend_type]);
528 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_INTERFACE_NAME) == 1) {
529 if (backend_type != VIRTIO_USER_BACKEND_VHOST_KERNEL) {
531 "arg %s applies only to vhost-kernel backend",
532 VIRTIO_USER_ARG_INTERFACE_NAME);
536 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_INTERFACE_NAME,
537 &get_string_arg, &ifname) < 0) {
538 PMD_INIT_LOG(ERR, "error to parse %s",
539 VIRTIO_USER_ARG_INTERFACE_NAME);
544 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_MAC) == 1) {
545 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_MAC,
546 &get_string_arg, &mac_addr) < 0) {
547 PMD_INIT_LOG(ERR, "error to parse %s",
548 VIRTIO_USER_ARG_MAC);
553 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_QUEUE_SIZE) == 1) {
554 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_QUEUE_SIZE,
555 &get_integer_arg, &queue_size) < 0) {
556 PMD_INIT_LOG(ERR, "error to parse %s",
557 VIRTIO_USER_ARG_QUEUE_SIZE);
562 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_QUEUES_NUM) == 1) {
563 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_QUEUES_NUM,
564 &get_integer_arg, &queues) < 0) {
565 PMD_INIT_LOG(ERR, "error to parse %s",
566 VIRTIO_USER_ARG_QUEUES_NUM);
571 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_SERVER_MODE) == 1) {
572 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_SERVER_MODE,
573 &get_integer_arg, &server_mode) < 0) {
574 PMD_INIT_LOG(ERR, "error to parse %s",
575 VIRTIO_USER_ARG_SERVER_MODE);
580 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_CQ_NUM) == 1) {
581 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_CQ_NUM,
582 &get_integer_arg, &cq) < 0) {
583 PMD_INIT_LOG(ERR, "error to parse %s",
584 VIRTIO_USER_ARG_CQ_NUM);
587 } else if (queues > 1) {
591 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PACKED_VQ) == 1) {
592 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_PACKED_VQ,
593 &get_integer_arg, &packed_vq) < 0) {
594 PMD_INIT_LOG(ERR, "error to parse %s",
595 VIRTIO_USER_ARG_PACKED_VQ);
600 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_VECTORIZED) == 1) {
601 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_VECTORIZED,
602 &get_integer_arg, &vectorized) < 0) {
603 PMD_INIT_LOG(ERR, "error to parse %s",
604 VIRTIO_USER_ARG_VECTORIZED);
609 if (queues > 1 && cq == 0) {
610 PMD_INIT_LOG(ERR, "multi-q requires ctrl-q");
614 if (queues > VIRTIO_MAX_VIRTQUEUE_PAIRS) {
615 PMD_INIT_LOG(ERR, "arg %s %" PRIu64 " exceeds the limit %u",
616 VIRTIO_USER_ARG_QUEUES_NUM, queues,
617 VIRTIO_MAX_VIRTQUEUE_PAIRS);
621 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_MRG_RXBUF) == 1) {
622 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_MRG_RXBUF,
623 &get_integer_arg, &mrg_rxbuf) < 0) {
624 PMD_INIT_LOG(ERR, "error to parse %s",
625 VIRTIO_USER_ARG_MRG_RXBUF);
630 if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_IN_ORDER) == 1) {
631 if (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_IN_ORDER,
632 &get_integer_arg, &in_order) < 0) {
633 PMD_INIT_LOG(ERR, "error to parse %s",
634 VIRTIO_USER_ARG_IN_ORDER);
639 eth_dev = virtio_user_eth_dev_alloc(vdev);
641 PMD_INIT_LOG(ERR, "virtio_user fails to alloc device");
645 dev = eth_dev->data->dev_private;
647 if (virtio_user_dev_init(dev, path, queues, cq,
648 queue_size, mac_addr, &ifname, server_mode,
649 mrg_rxbuf, in_order, packed_vq, backend_type) < 0) {
650 PMD_INIT_LOG(ERR, "virtio_user_dev_init fails");
651 virtio_user_eth_dev_free(eth_dev);
655 /* previously called by pci probing for physical dev */
656 if (eth_virtio_dev_init(eth_dev) < 0) {
657 PMD_INIT_LOG(ERR, "eth_virtio_dev_init fails");
658 virtio_user_eth_dev_free(eth_dev);
664 #if defined(CC_AVX512_SUPPORT) || defined(RTE_ARCH_ARM)
669 "building environment do not support packed ring vectorized");
676 rte_eth_dev_probing_finish(eth_dev);
681 rte_kvargs_free(kvlist);
692 virtio_user_pmd_remove(struct rte_vdev_device *vdev)
695 struct rte_eth_dev *eth_dev;
700 name = rte_vdev_device_name(vdev);
701 PMD_DRV_LOG(INFO, "Un-Initializing %s", name);
702 eth_dev = rte_eth_dev_allocated(name);
703 /* Port has already been released by close. */
707 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
708 return rte_eth_dev_release_port(eth_dev);
710 /* make sure the device is stopped, queues freed */
711 return rte_eth_dev_close(eth_dev->data->port_id);
714 static int virtio_user_pmd_dma_map(struct rte_vdev_device *vdev, void *addr,
715 uint64_t iova, size_t len)
718 struct rte_eth_dev *eth_dev;
719 struct virtio_user_dev *dev;
724 name = rte_vdev_device_name(vdev);
725 eth_dev = rte_eth_dev_allocated(name);
726 /* Port has already been released by close. */
730 dev = eth_dev->data->dev_private;
732 if (dev->ops->dma_map)
733 return dev->ops->dma_map(dev, addr, iova, len);
738 static int virtio_user_pmd_dma_unmap(struct rte_vdev_device *vdev, void *addr,
739 uint64_t iova, size_t len)
742 struct rte_eth_dev *eth_dev;
743 struct virtio_user_dev *dev;
748 name = rte_vdev_device_name(vdev);
749 eth_dev = rte_eth_dev_allocated(name);
750 /* Port has already been released by close. */
754 dev = eth_dev->data->dev_private;
756 if (dev->ops->dma_unmap)
757 return dev->ops->dma_unmap(dev, addr, iova, len);
762 static struct rte_vdev_driver virtio_user_driver = {
763 .probe = virtio_user_pmd_probe,
764 .remove = virtio_user_pmd_remove,
765 .dma_map = virtio_user_pmd_dma_map,
766 .dma_unmap = virtio_user_pmd_dma_unmap,
767 .drv_flags = RTE_VDEV_DRV_NEED_IOVA_AS_VA,
770 RTE_PMD_REGISTER_VDEV(net_virtio_user, virtio_user_driver);
771 RTE_PMD_REGISTER_ALIAS(net_virtio_user, virtio_user);
772 RTE_PMD_REGISTER_PARAM_STRING(net_virtio_user,