aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/memif_test.c
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2017-09-08 15:40:32 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2017-09-11 10:15:43 +0000
commita19e1054b58024891691eaebeb13700cdce57fea (patch)
tree1fa8043e94b45a22dd27a40876534d4f5ea12983 /src/plugins/memif/memif_test.c
parent1500254bee11355bbd69cc1dd9705be4f002f2bd (diff)
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 <sluong@cisco.com>
Diffstat (limited to 'src/plugins/memif/memif_test.c')
-rw-r--r--src/plugins/memif/memif_test.c7
1 files changed, 5 insertions, 2 deletions
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 <id>] [socket <path>] [ring_size <size>] " \
"[buffer_size <size>] [hw_addr <mac_address>] " \
- "<master|slave>") \
+ "[secret <string>] [mode ip] <master|slave>") \
_(memif_delete, "<sw_if_index>") \
_(memif_dump, "")