summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/vhost_user_inline.h
diff options
context:
space:
mode:
authorJuraj Sloboda <jsloboda@cisco.com>2018-10-01 12:42:07 +0200
committerOle Trøan <otroan@employees.org>2018-10-02 12:21:36 +0000
commitb192feba004e7a52b57ff9f68246b1c94e8b667b (patch)
tree01fc0f06005aba8e29f157a7b7d5147e2dbe73c4 /src/vnet/devices/virtio/vhost_user_inline.h
parent83c46a2c5c97320e029b4dd154a45212530f221d (diff)
vhost-user: Interface state updates
Fix inconsistencies between admin and link interface states Admin down should imply link down: link_up = admin_up && link_ready Change-Id: I4d668d82d035b5d2ae508727f34f1722a0c3e677 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/vhost_user_inline.h')
-rw-r--r--src/vnet/devices/virtio/vhost_user_inline.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/vhost_user_inline.h b/src/vnet/devices/virtio/vhost_user_inline.h
index 9f6135165ae..7e988eb9969 100644
--- a/src/vnet/devices/virtio/vhost_user_inline.h
+++ b/src/vnet/devices/virtio/vhost_user_inline.h
@@ -251,6 +251,12 @@ vhost_user_send_call (vlib_main_t * vm, vhost_user_vring_t * vq)
vq->int_deadline = vlib_time_now (vm) + vum->coalesce_time;
}
+static_always_inline u8
+vui_is_link_up (vhost_user_intf_t * vui)
+{
+ return vui->admin_up && vui->is_ready;
+}
+
#endif
/*