summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2022-11-17 14:04:49 +0000
committerBeno�t Ganne <bganne@cisco.com>2022-11-25 12:43:40 +0000
commit530c5ee1fe178895e718ea752d2addc7b21c01ba (patch)
tree64e6e6aa72807b5b5e596b593397e54900bfbc25 /src/vnet/devices
parent1a9dc75fe8099fdde9b1dd248a8fca35b001f9fc (diff)
interface: remove the pending interrupt from deleting interface
Type: fix Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I3138f97519d216b89a9c46865271db1f9ddd53cd
Diffstat (limited to 'src/vnet/devices')
-rw-r--r--src/vnet/devices/af_packet/af_packet.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/vnet/devices/af_packet/af_packet.c b/src/vnet/devices/af_packet/af_packet.c
index 010bc1c266c..f5493dd088e 100644
--- a/src/vnet/devices/af_packet/af_packet.c
+++ b/src/vnet/devices/af_packet/af_packet.c
@@ -785,6 +785,10 @@ af_packet_delete_if (u8 *host_if_name)
/* bring down the interface */
vnet_hw_interface_set_flags (vnm, apif->hw_if_index, 0);
+ if (apif->mode != AF_PACKET_IF_MODE_IP)
+ ethernet_delete_interface (vnm, apif->hw_if_index);
+ else
+ vnet_delete_hw_interface (vnm, apif->hw_if_index);
/* clean up */
vec_foreach (rx_queue, apif->rx_queues)
@@ -807,11 +811,6 @@ af_packet_delete_if (u8 *host_if_name)
mhash_unset (&apm->if_index_by_host_if_name, host_if_name, p);
- if (apif->mode != AF_PACKET_IF_MODE_IP)
- ethernet_delete_interface (vnm, apif->hw_if_index);
- else
- vnet_delete_hw_interface (vnm, apif->hw_if_index);
-
memset (apif, 0, sizeof (*apif));
pool_put (apm->interfaces, apif);