summaryrefslogtreecommitdiffstats
path: root/nsh-plugin
diff options
context:
space:
mode:
authorHongjun Ni <hongjun.ni@intel.com>2017-02-15 23:15:47 +0800
committerHongjun Ni <hongjun.ni@intel.com>2017-02-15 23:16:29 +0800
commitad076b3b19da12de1fc76674da4e1a2204a2b0ac (patch)
treef49ac889e665d247b03eee4c5f3f6f9f5c13b57c /nsh-plugin
parentd90f85ca4a250b4884ad8caacd22117d2e03f9ab (diff)
Add NSH Egress Classifier feature
Change-Id: Ib539f0f98ed03613429e0b6e952b7502f393c2b1 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Diffstat (limited to 'nsh-plugin')
-rw-r--r--nsh-plugin/nsh/nsh.c7
-rw-r--r--nsh-plugin/nsh/nsh.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/nsh-plugin/nsh/nsh.c b/nsh-plugin/nsh/nsh.c
index f03e176..86fc88d 100644
--- a/nsh-plugin/nsh/nsh.c
+++ b/nsh-plugin/nsh/nsh.c
@@ -190,6 +190,11 @@ u8 * format_nsh_map (u8 * s, va_list * args)
s = format (s, "encapped by VXLAN6 intf: %d", map->sw_if_index);
break;
}
+ case NSH_NODE_NEXT_DECAP_ETH_INPUT:
+ {
+ s = format (s, "encap-none");
+ break;
+ }
default:
s = format (s, "only GRE and VXLANGPE support in this rev");
}
@@ -433,7 +438,7 @@ nsh_add_del_map_command_fn (vlib_main_t * vm,
else if (unformat (line_input, "encap-vxlan6-intf %d", &sw_if_index))
next_node = NSH_NODE_NEXT_ENCAP_VXLAN6;
else if (unformat (line_input, "encap-none"))
- next_node = NSH_NODE_NEXT_DROP; // Once moved to NSHSFC see nsh.h:foreach_nsh_input_next to handle this case
+ next_node = NSH_NODE_NEXT_DECAP_ETH_INPUT;
else
return clib_error_return (0, "parse error: '%U'",
format_unformat_error, line_input);
diff --git a/nsh-plugin/nsh/nsh.h b/nsh-plugin/nsh/nsh.h
index f74c3b1..632a2c4 100644
--- a/nsh-plugin/nsh/nsh.h
+++ b/nsh-plugin/nsh/nsh.h
@@ -142,9 +142,9 @@ typedef enum {
_(ENCAP_VXLANGPE, "vxlan-gpe-encap" ) \
_(ENCAP_VXLAN4, "vxlan4-encap" ) \
_(ENCAP_VXLAN6, "vxlan6-encap" ) \
+ _(DECAP_ETH_INPUT, "ethernet-input" ) \
/* /\* TODO once moved to Project:NSH_SFC *\/ */
/* _(ENCAP_ETHERNET, "*** TX TO ETHERNET ***") \ */
-/* _(DECAP_ETHERNET_LOOKUP, "ethernet-input" ) \ */
/* _(DECAP_IP4_INPUT, "ip4-input") \ */
/* _(DECAP_IP6_INPUT, "ip6-input" ) \ */