From: Steven Luong Date: Thu, 16 Jan 2020 16:45:53 +0000 (-0800) Subject: misc: binary-api sw_interface_vhost_user_dump is broken X-Git-Tag: v20.09-rc0~739 X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commitdiff_plain;h=1bf83b9d9bd9013cd07435c5bf0c5a584906857a misc: binary-api sw_interface_vhost_user_dump is broken Recent modificaton to vhost_user APIs for typing which added a sw_if_index filter to the API sw_interface_vhost_user_dump with the default value -1 to mean all interfaces. But the default is not set from api_format.c, causing the binary-api command for sw_interface_vhost_user_dump to display nothing. Also missing is the proper display on custom dump for the aformentioned API. Type: fix Signed-off-by: Steven Luong Change-Id: I05546e2318165af7531977fbed66ea7224c4a7ce --- diff --git a/src/vat/api_format.c b/src/vat/api_format.c index 690a15fd97e..02e1c8d1517 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -12638,6 +12638,7 @@ api_sw_interface_vhost_user_dump (vat_main_t * vam) /* Get list of vhost-user interfaces */ M (SW_INTERFACE_VHOST_USER_DUMP, mp); + mp->sw_if_index = ntohl (~0); S (mp); /* Use a control ping for synchronization */ diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index 6e47a79a616..f79f7cc9a7d 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -1767,6 +1767,7 @@ static void *vl_api_sw_interface_vhost_user_dump_t_print u8 *s; s = format (0, "SCRIPT: sw_interface_vhost_user_dump "); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; }