376d893a20
We used to rely on lcore >= 0 for sessions that are started (have their pollers running) and in order to prevent data races, that lcore field had to be set from the same thread that runs the pollers, directly after registering/unregistering them. The lcore was always set to spdk_env_get_current_core(), but we won't be able to use an equivalent get_current_poll_group() function after we switch to poll groups. We will have a poll group object only inside spdk_vhost_session_send_event() that's called from the DPDK rte_vhost thread. In order to change the lcore field (or a poll group one) from spdk_vhost_session_send_event(), we'll need a separate field to maintain the started/stopped status that's only going to be modified from the session's thread. Change-Id: Idb09cae3c4715eebb20282aad203987b26be707b Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452394 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
||
---|---|---|
.. | ||
vhost.c | ||
Makefile | ||
test_vhost.c |