From a19e1054b58024891691eaebeb13700cdce57fea Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 8 Sep 2017 15:40:32 -0700 Subject: memif: mode ip is not settable from binary API While mode ip is supported via the CLI for creating a memif interface, it is not settable from the binary API due to missing code. While at it, update the help usage to include the missing keyword secret. Change-Id: Ia9c71f4017210a5e1733ce4992fbb566b7d20c1a Signed-off-by: Steven --- src/plugins/memif/memif_test.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/plugins/memif/memif_test.c') diff --git a/src/plugins/memif/memif_test.c b/src/plugins/memif/memif_test.c index a7c23daae9c..4ca7526df13 100644 --- a/src/plugins/memif/memif_test.c +++ b/src/plugins/memif/memif_test.c @@ -129,7 +129,7 @@ api_memif_create (vat_main_t * vam) u32 rx_queues = MEMIF_DEFAULT_RX_QUEUES; u32 tx_queues = MEMIF_DEFAULT_TX_QUEUES; int ret; - + u8 mode = MEMIF_INTERFACE_MODE_ETHERNET; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { @@ -148,6 +148,8 @@ api_memif_create (vat_main_t * vam) else if (unformat (i, "slave %U", unformat_memif_queues, &rx_queues, &tx_queues)) role = 1; + else if (unformat (i, "mode ip")) + mode = MEMIF_INTERFACE_MODE_IP; else if (unformat (i, "hw_addr %U", unformat_ethernet_address, hw_addr)) ; else @@ -177,6 +179,7 @@ api_memif_create (vat_main_t * vam) M (MEMIF_CREATE, mp); + mp->mode = mode; mp->id = clib_host_to_net_u32 (id); mp->role = role; mp->ring_size = clib_host_to_net_u32 (ring_size); @@ -309,7 +312,7 @@ static void vl_api_memif_details_t_handler (vl_api_memif_details_t * mp) #define foreach_vpe_api_msg \ _(memif_create, "[id ] [socket ] [ring_size ] " \ "[buffer_size ] [hw_addr ] " \ - "") \ + "[secret ] [mode ip] ") \ _(memif_delete, "") \ _(memif_dump, "") -- cgit 1.2.3-korg