af14759181
We used to use rte_vhost_driver_session_start() to trigger the vhost-user session. It takes no argument, thus it's a global trigger. And it could be problematic. The issue is, currently, rte_vhost_driver_register(path, flags) actually tries to put it into the session loop (by fdset_add). However, it needs a set of APIs to set a vhost-user driver properly: * rte_vhost_driver_register(path, flags); * rte_vhost_driver_set_features(path, features); * rte_vhost_driver_callback_register(path, vhost_device_ops); If a new vhost-user driver is registered after the trigger (think OVS-DPDK that could add a port dynamically from cmdline), the current code will effectively starts the session for the new driver just after the first API rte_vhost_driver_register() is invoked, leaving later calls taking no effect at all. To handle the case properly, this patch introduce a new API, rte_vhost_driver_start(path), to trigger a specific vhost-user driver. To do that, the rte_vhost_driver_register(path, flags) is simplified to create the socket only and let rte_vhost_driver_start(path) to actually put it into the session loop. Meanwhile, the rte_vhost_driver_session_start is removed: we could hide the session thread internally (create the thread if it has not been created). This would also simplify the application. NOTE: the API order in prog guide is slightly adjusted for showing the correct invoke order. Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> |
||
---|---|---|
.. | ||
img | ||
build_app.rst | ||
cryptodev_lib.rst | ||
dev_kit_build_system.rst | ||
dev_kit_root_make_help.rst | ||
efd_lib.rst | ||
env_abstraction_layer.rst | ||
ext_app_lib_make_help.rst | ||
extend_dpdk.rst | ||
glossary.rst | ||
hash_lib.rst | ||
index.rst | ||
intro.rst | ||
ip_fragment_reassembly_lib.rst | ||
kernel_nic_interface.rst | ||
link_bonding_poll_mode_drv_lib.rst | ||
lpm6_lib.rst | ||
lpm_lib.rst | ||
mbuf_lib.rst | ||
mempool_lib.rst | ||
multi_proc_support.rst | ||
overview.rst | ||
packet_classif_access_ctrl.rst | ||
packet_distrib_lib.rst | ||
packet_framework.rst | ||
pdump_lib.rst | ||
perf_opt_guidelines.rst | ||
poll_mode_drv.rst | ||
port_hotplug_framework.rst | ||
power_man.rst | ||
profile_app.rst | ||
qos_framework.rst | ||
reorder_lib.rst | ||
ring_lib.rst | ||
rte_flow.rst | ||
source_org.rst | ||
thread_safety_dpdk_functions.rst | ||
timer_lib.rst | ||
vhost_lib.rst | ||
writing_efficient_code.rst |