From 45ca2c7a9c0835e1b5d5641ca230f720b49e8cf4 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Fri, 16 Jun 2017 22:06:00 +0200 Subject: memif: add ip mode In IP mode memif interface is L3 point-to-point interfaces and we don't pass l2 header. There is no l2 header rewrite operation and received packets are sent straight to ip4-input / ip6-input nodes. Change-Id: I4177f3fce3004da7ecf14d235006ae053fcf3f09 Signed-off-by: Damjan Marion --- src/plugins/memif/cli.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/plugins/memif/cli.c') diff --git a/src/plugins/memif/cli.c b/src/plugins/memif/cli.c index 34c77def..8af76164 100644 --- a/src/plugins/memif/cli.c +++ b/src/plugins/memif/cli.c @@ -62,6 +62,8 @@ memif_create_command_fn (vlib_main_t * vm, unformat_input_t * input, args.is_master = 1; else if (unformat (line_input, "slave")) args.is_master = 0; + else if (unformat (line_input, "mode ip")) + args.mode = MEMIF_INTERFACE_MODE_IP; else if (unformat (line_input, "hw-addr %U", unformat_ethernet_address, args.hw_addr)) args.hw_addr_set = 1; @@ -107,7 +109,8 @@ VLIB_CLI_COMMAND (memif_create_command, static) = { .path = "create memif", .short_help = "create memif [id ] [socket ] " "[ring-size ] [buffer-size ] [hw-addr ] " - " [rx-queues ] [tx-queues ]", + " [rx-queues ] [tx-queues ]" + "[mode ip]", .function = memif_create_command_fn, }; /* *INDENT-ON* */ -- cgit 1.2.3-korg