diff options
author | Damjan Marion <damarion@cisco.com> | 2022-01-12 14:09:01 +0100 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2022-01-12 14:14:55 +0100 |
commit | b385b95c106123ab095b3bd459b7cbc91089b826 (patch) | |
tree | 698dcb911303757a2ea41a125352a59b3e23d216 /src/plugins | |
parent | f715b33f10028b1601e2be88c7eeb938a371016a (diff) |
dpdk: postpone updating runtime data
This prevents crash due to worker tread accessing device data
while device vector is growing.
Type: fix
Change-Id: I5cf9f53ddbe97fe52db8fd431ea7c0e480f3d4bc
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/dpdk/device/init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c index da7a12367ff..a515bca359d 100644 --- a/src/plugins/dpdk/device/init.c +++ b/src/plugins/dpdk/device/init.c @@ -552,7 +552,6 @@ dpdk_lib_init (dpdk_main_t * dm) vnm, xd->hw_if_index, q, VNET_HW_IF_RXQ_THREAD_ANY); } - vnet_hw_if_update_runtime_data (vnm, xd->hw_if_index); /*Get vnet hardware interface */ hi = vnet_get_hw_interface (vnm, xd->hw_if_index); @@ -597,6 +596,9 @@ dpdk_lib_init (dpdk_main_t * dm) format_dpdk_device_errors, xd); } + for (int i = 0; i < vec_len (dm->devices); i++) + vnet_hw_if_update_runtime_data (vnm, dm->devices[i].hw_if_index); + return 0; } |