virtio: fix link up/down flag 41/26141/2
authorMohsin Kazmi <[email protected]>
Thu, 19 Mar 2020 13:03:31 +0000 (14:03 +0100)
committerAndrew Yourtchenko <[email protected]>
Fri, 27 Mar 2020 12:23:06 +0000 (12:23 +0000)
commitffe2caf9da1105c4fedd7c152deea456816eed17
tree7e0c4ce393d736ceac80ffc8b45207a2b7695fff
parentedef5b00eda2220a8c56348ffdb33a076fc1e699
virtio: fix link up/down flag

Type: fix

"set int state <interface> down" puts the virtio device link
down. It will not put the link in "UP" state, when
"set int state <interface up>" will be used again to change
the interface admin up. This patch fixes it.

To test:
create tap
set int state tap0 up
set int state tap0 down
sh hardware
sh int
set int state tap0 up
sh int
sh hardware

Change-Id: I3c0e31539f8a2a1e40220e7fb57eedecf408f067
Signed-off-by: Mohsin Kazmi <[email protected]>
(cherry picked from commit 529f0e97b6064039c500adce0d54b738954b2ffa)
src/vnet/devices/virtio/device.c