summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/vhost_user_output.c
diff options
context:
space:
mode:
authorJerome Tollet <jtollet@cisco.com>2018-10-02 11:41:11 +0200
committerDamjan Marion <damarion@cisco.com>2018-10-02 16:28:57 +0200
commit2f54c27f7fd0d2c24e7d6b1d48809e8b58ec1abf (patch)
treec86d8e316796d9cfce9c52eed3241862609de9df /src/vnet/devices/virtio/vhost_user_output.c
parent5507192339aed14634929b3e8d7c5d3e5ea8f997 (diff)
vhost-user: add support for vlib_log API
Change-Id: I0af68f6b41d0024aa64b93a8b18e2d179bf939b0 Signed-off-by: Jerome Tollet <jtollet@cisco.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/vhost_user_output.c')
-rw-r--r--src/vnet/devices/virtio/vhost_user_output.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/vnet/devices/virtio/vhost_user_output.c b/src/vnet/devices/virtio/vhost_user_output.c
index f4d1c2c6a7c..c77cdb6a2ee 100644
--- a/src/vnet/devices/virtio/vhost_user_output.c
+++ b/src/vnet/devices/virtio/vhost_user_output.c
@@ -100,14 +100,17 @@ vhost_user_name_renumber (vnet_hw_interface_t * hi, u32 new_dev_instance)
{
// FIXME: check if the new dev instance is already used
vhost_user_main_t *vum = &vhost_user_main;
+ vhost_user_intf_t *vui = pool_elt_at_index (vum->vhost_user_interfaces,
+ hi->dev_instance);
+
vec_validate_init_empty (vum->show_dev_instance_by_real_dev_instance,
hi->dev_instance, ~0);
vum->show_dev_instance_by_real_dev_instance[hi->dev_instance] =
new_dev_instance;
- DBG_SOCK ("renumbered vhost-user interface dev_instance %d to %d",
- hi->dev_instance, new_dev_instance);
+ vu_log_debug (vui, "renumbered vhost-user interface dev_instance %d to %d",
+ hi->dev_instance, new_dev_instance);
return 0;
}
@@ -605,8 +608,8 @@ vhost_user_interface_rx_mode_change (vnet_main_t * vnm, u32 hw_if_index,
txvq->used->flags = 0;
else
{
- clib_warning ("BUG: unhandled mode %d changed for if %d queue %d", mode,
- hw_if_index, qid);
+ vu_log_err (vui, "unhandled mode %d changed for if %d queue %d", mode,
+ hw_if_index, qid);
return clib_error_return (0, "unsupported");
}