diff options
author | Damjan Marion <damarion@cisco.com> | 2020-09-09 17:40:02 +0200 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-09-11 11:11:02 +0000 |
commit | 171d6aceb039a7f0b0d67c837ff74359dae01ae4 (patch) | |
tree | 51823e58dcee988384ccf465ff4fd3f18b469c4d /src/plugins/avf/input.c | |
parent | 268e3b647733807dbecf402fcebedceff4c85544 (diff) |
avf: fix race between avf and cli/api process
device pool my grow during suspemd which will cause crash in avf process
after it exits from suspend.
Type: fix
Change-Id: I51fec90088c909cfbaaca6c245272a28c0827ca0
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/avf/input.c')
-rw-r--r-- | src/plugins/avf/input.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/avf/input.c b/src/plugins/avf/input.c index da5556a391e..0ccf7721835 100644 --- a/src/plugins/avf/input.c +++ b/src/plugins/avf/input.c @@ -444,14 +444,13 @@ VLIB_NODE_FN (avf_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { u32 n_rx = 0; - avf_main_t *am = &avf_main; vnet_device_input_runtime_t *rt = (void *) node->runtime_data; vnet_device_and_queue_t *dq; foreach_device_and_queue (dq, rt->devices_and_queues) { avf_device_t *ad; - ad = vec_elt_at_index (am->devices, dq->dev_instance); + ad = avf_get_device (dq->dev_instance); if ((ad->flags & AVF_DEVICE_F_ADMIN_UP) == 0) continue; n_rx += avf_device_input_inline (vm, node, frame, ad, dq->queue_id); |