From 66bb7dd64ee2377103e18b96f1e6bf6405de44b5 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Thu, 20 Aug 2020 17:28:20 +0200 Subject: avf: fix race between avf process node and avf_delete_if(...) It may happen that process node is suspended while it waits for response from adminq and during that time CLI or API process can call avf_delete_if. When avf process node resumes, it may happen that device is not there anymeore. This patch delegates interface deletion to process node, so CLI/API process just sends signal instead of deleting device instance itself. Type: fix Change-Id: I7f12e12df3071650f6e60ad7eb5af23b7acfe335 Signed-off-by: Damjan Marion --- src/plugins/avf/avf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/avf/avf.h') diff --git a/src/plugins/avf/avf.h b/src/plugins/avf/avf.h index 5d517826009..4b35899da38 100644 --- a/src/plugins/avf/avf.h +++ b/src/plugins/avf/avf.h @@ -200,7 +200,7 @@ typedef struct typedef enum { AVF_PROCESS_EVENT_START = 1, - AVF_PROCESS_EVENT_STOP = 2, + AVF_PROCESS_EVENT_DELETE_IF = 2, AVF_PROCESS_EVENT_AQ_INT = 3, } avf_process_event_t; @@ -246,9 +246,9 @@ typedef struct } avf_create_if_args_t; void avf_create_if (vlib_main_t * vm, avf_create_if_args_t * args); -void avf_delete_if (vlib_main_t * vm, avf_device_t * ad); extern vlib_node_registration_t avf_input_node; +extern vlib_node_registration_t avf_process_node; extern vnet_device_class_t avf_device_class; /* format.c */ -- cgit 1.2.3-korg