dbfa62d63f
* support calling rte_vhost_driver_register after rte_vhost_driver_session_start * add mutext to protect fdset from concurrent access * add busy flag in fdentry. this flag is set before cb and cleared after cb is finished. mutex lock scenario in vhost: * event_dispatch(in rte_vhost_driver_session_start) runs in a separate thread, infinitely processing vhost messages through cb(callback). * event_dispatch acquires the lock, get the cb and its context, mark the busy flag, and releases the mutex. * vserver_new_vq_conn cb calls fdset_add, which acquires the mutex and add new fd into fdset. * vserver_message_handler cb frees data context, marks remove flag to request to delete connfd(connection fd) from fdset. * after cb returns, event_dispatch 1. clears busy flag. 2. if there is remove request, call fdset_del, which acquires mutex, checks busy flag, and removes connfd from fdset. * rte_vhost_driver_unregister(not implemented) runs in another thread, acquires the mutex, calls fdset_del to remove fd(listenerfd) from fdset. Then it could free data context. The above steps ensures fd data context isn't freed when cb is using. VM(s) should have been shutdown before rte_vhost_driver_unregister. Signed-off-by: Huawei Xie <huawei.xie@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp> |
||
---|---|---|
.. | ||
librte_acl | ||
librte_cfgfile | ||
librte_cmdline | ||
librte_compat | ||
librte_distributor | ||
librte_eal | ||
librte_ether | ||
librte_hash | ||
librte_ip_frag | ||
librte_ivshmem | ||
librte_kni | ||
librte_kvargs | ||
librte_lpm | ||
librte_malloc | ||
librte_mbuf | ||
librte_mempool | ||
librte_meter | ||
librte_net | ||
librte_pipeline | ||
librte_pmd_af_packet | ||
librte_pmd_bond | ||
librte_pmd_e1000 | ||
librte_pmd_enic | ||
librte_pmd_fm10k | ||
librte_pmd_i40e | ||
librte_pmd_ixgbe | ||
librte_pmd_pcap | ||
librte_pmd_ring | ||
librte_pmd_virtio | ||
librte_pmd_vmxnet3 | ||
librte_pmd_xenvirt | ||
librte_port | ||
librte_power | ||
librte_reorder | ||
librte_ring | ||
librte_sched | ||
librte_table | ||
librte_timer | ||
librte_vhost | ||
Makefile |