diff options
author | Damjan Marion <damarion@cisco.com> | 2020-09-11 14:11:11 +0200 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-09-11 13:56:10 +0000 |
commit | 698eeb126d01427313949241b961c27347db8c72 (patch) | |
tree | 08ce4ba63d11737874d43b47df8a70a0e5aba9ed /src/plugins | |
parent | 160a2a9a8c5c4e054dcc0e8ebeb3de7654718582 (diff) |
avf: add assert to ensure that adminq is used only from avf process
Type: improvement
Change-Id: Ib64c9b8207776986656e5a26c13a221edc6cc950
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/avf/device.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c index 8430997b060..2b4801e2c81 100644 --- a/src/plugins/avf/device.c +++ b/src/plugins/avf/device.c @@ -399,6 +399,11 @@ avf_send_to_pf (vlib_main_t * vm, avf_device_t * ad, virtchnl_ops_t op, u32 head; f64 t0, suspend_time = AVF_SEND_TO_PF_SUSPEND_TIME; + /* adminq operations should be only done from process node after device + * is initialized */ + ASSERT ((ad->flags & AVF_DEVICE_F_INITIALIZED) == 0 || + vlib_get_current_process_node_index (vm) == avf_process_node.index); + /* suppress interrupt in the next adminq receive slot as we are going to wait for response we only need interrupts when event is received */ |