tap: clean-up when linux will delete the tap interface 66/18966/2
authorMohsin Kazmi <sykazmi@cisco.com>
Wed, 17 Apr 2019 10:06:57 +0000 (12:06 +0200)
committerDave Barach <openvpp@barachs.net>
Wed, 17 Apr 2019 14:33:50 +0000 (14:33 +0000)
commite4ac48e792f4eebfce296cfde844ee73b1abd62f
tree491e4422433a1c2d57dcd23d1b392f9aca4537e5
parenta7dd0c8a278c1735eb6b0f75749a0d76dac350b3
tap: clean-up when linux will delete the tap interface

When container is deleted which has tap interface attached,
Linux also delete the tap interface leaving the VPP side of
tap. This patch does a clean up job to remove that VPP side
of tap interface.

To produce the behavior:
In VPP:
  create tap
On linux:
  sudo ip netns add ns1
  sudo ip link set dev tap0 netns ns1
  sudo ip netns del ns1

Change-Id: Iaed1700073a9dc64e626c1d0c449f466c143f3ae
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
src/vnet/devices/tap/tap.c
src/vnet/devices/virtio/virtio.h