-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vdpa/sfc: resolve race between libvhost and sfc_vdpa_pmd
libvhost calls vdps_sfc_pmd's dev_conf() before prosessing the VHOST_USER_SET_VRING_CALL message for the last VQ. So this message is processed after dev_conf() returns. However sfc_vdpa_pmd's dev_conf() spawns a thread to set rte_vhost_host_notifier_ctrl() before returning control to libvhost. This parallel thread in turn invokes get_notify_area(). To get the notify_area, sfc_vdpa_pmd needs to query the HW and for this query it needs an enabled VQ. But at the same time libvhost is processing the last VHOST_USER_SET_VRING_CALL, and to do that it disables the last VQ. Hence there is a race b/w the libvhost and sfc_vdpa_pmd To resolve this race condition, query the HW and cache notify_area inside dev_conf() instead of doing it the parallel thread. Signed-off-by: Abhimanyu Saini <[email protected]>
- Loading branch information
Abhimanyu Saini
committed
Jun 15, 2022
1 parent
3ee1b6d
commit 3736e32
Showing
2 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters