summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2021-10-11 15:43:15 +0000
committerDamjan Marion <dmarion@me.com>2021-10-12 13:09:32 +0000
commitfcef34dd1cf2e356cc8909e16dc7fa93fffbff2b (patch)
treed78ec3beea84f80d3e6a5234d5b247bb2176a32d /src/plugins/memif
parent23a15b34e410def81d4bb3e2c8f28f118b59dc5a (diff)
memif: fix the memif crash when slave disconnect
Type: fix Fixes: 3effb4e63068 ("memif: integrate with new tx infra") memif is recently integrated with new tx infra. But it introduces a crash when slave disconnect from master but interface is not deleted. Disconnect routine was missing unregister of all tx queues. This patch fixes it. Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I81c59cc1a03561248ec8595d5e3caa54f421833e
Diffstat (limited to 'src/plugins/memif')
-rw-r--r--src/plugins/memif/memif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/memif/memif.c b/src/plugins/memif/memif.c
index 55d9b84fd4c..886721aef75 100644
--- a/src/plugins/memif/memif.c
+++ b/src/plugins/memif/memif.c
@@ -147,7 +147,6 @@ memif_disconnect (memif_if_t * mif, clib_error_t * err)
}
}
vnet_hw_if_unregister_all_rx_queues (vnm, mif->hw_if_index);
- vnet_hw_if_update_runtime_data (vnm, mif->hw_if_index);
/* *INDENT-OFF* */
vec_foreach_index (i, mif->tx_queues)
@@ -163,6 +162,8 @@ memif_disconnect (memif_if_t * mif, clib_error_t * err)
}
mq->ring = 0;
}
+ vnet_hw_if_unregister_all_tx_queues (vnm, mif->hw_if_index);
+ vnet_hw_if_update_runtime_data (vnm, mif->hw_if_index);
/* free tx and rx queues */
vec_foreach (mq, mif->rx_queues)