Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vswitchd: Wait for a bridge exit before replying to exit unixctl.
Before the cleanup option, the bridge_exit() call was fairly fast, because it didn't include any particularly long operations. However, with the cleanup flag, this function destroys a lot of datapath resources freeing a lot of memory, waiting on RCU and talking to the kernel. That may take a noticeable amount of time, especially on a busy system or under profilers/sanitizers. However, the unixctl 'exit' command replies instantly without waiting for any work to actually be done. This may cause system test failures or other issues where scripts expect ovs-vswitchd to exit or destroy all the datapath resources shortly after appctl call. Fix that by waiting for the bridge_exit() before replying to the user. At least, all the datapath resources will actually be destroyed by the time ovs-appctl exits. Also moving a structure from stack to global. Seems cleaner this way. Since we're not replying right away and it's technically possible to have multiple clients requesting exit at the same time, storing connections in an rray. Fixes: fe13ccd ("vswitchd: Add --cleanup option to the 'appctl exit' command") Signed-off-by: Ilya Maximets <[email protected]>
- Loading branch information