mos-stack/mOS-networking-stack

how to use vhost-user in mOS

Opened this issue · 3 comments

Is there any way using mOS with dpdk vhost-user?

@shawnjava,

Unfortunately we do not provide support for vhost-user at the moment. However we encourage you to write the driver module for mOS. We already provide support for DPDK bare metal (core/src/dpdk_module.c), netmap bare metal (core/src/netmap_module.c). and PCAP (core/src/pcap_module.c). You can use any of these files as a template to build a new vhost-user module file (or you can update dpdk_module.c file) as well. Let me know if you need any assistance in this regard.

@ajamshed,
Thank you for your response. First, I've made a mistake when raising the question. The word 'vhost-user' is actually 'virtio_user', which can be regarded as a virtual port dpdk provided for an app. When using this feature, we just need to pass the option '--vdev' to EAL parameters.
I notice you used fixed parameters in rte_eal_init() in file dpdk_module.c, can I add the '--vdev' to argv[]? Will this affect the whole program?

Yes. You can update argc value accordingly as well. You may want to check DPDK documentation to see whether some additional initialization routines may be required to support virto_user vdev.