summaryrefslogtreecommitdiffstats
path: root/nsh-plugin
diff options
context:
space:
mode:
authorHongjun Ni <hongjun.ni@intel.com>2016-10-27 18:54:21 +0800
committerHongjun Ni <hongjun.ni@intel.com>2016-10-27 18:54:21 +0800
commite556e7c0272b37a695c38549ead57ba002ff2c01 (patch)
tree00f20f07a7fc58678979dd8a95ea9495b1aa6cae /nsh-plugin
parent210d394002fea31edb345b5c6adfaf4e6078e545 (diff)
Add NSH Entry error counter
Change-Id: I4c0180ba52b50d8adad9cf1d0501a0cc2dd2fdb3 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Diffstat (limited to 'nsh-plugin')
-rw-r--r--nsh-plugin/nsh/nsh.c6
-rw-r--r--nsh-plugin/nsh/nsh.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/nsh-plugin/nsh/nsh.c b/nsh-plugin/nsh/nsh.c
index 3045be1..780b385 100644
--- a/nsh-plugin/nsh/nsh.c
+++ b/nsh-plugin/nsh/nsh.c
@@ -945,12 +945,12 @@ nsh_input_map (vlib_main_t * vm,
if (PREDICT_FALSE(entry0 == 0))
{
- error0 = NSH_INPUT_ERROR_NO_MAPPING;
+ error0 = NSH_INPUT_ERROR_NO_ENTRY;
goto trace0;
}
if (PREDICT_FALSE(entry1 == 0))
{
- error1 = NSH_INPUT_ERROR_NO_MAPPING;
+ error1 = NSH_INPUT_ERROR_NO_ENTRY;
goto trace1;
}
@@ -1027,7 +1027,7 @@ nsh_input_map (vlib_main_t * vm,
if (PREDICT_FALSE(entry0 == 0))
{
- error0 = NSH_INPUT_ERROR_NO_MAPPING;
+ error0 = NSH_INPUT_ERROR_NO_ENTRY;
goto trace00;
}
diff --git a/nsh-plugin/nsh/nsh.h b/nsh-plugin/nsh/nsh.h
index 363711e..539a45d 100644
--- a/nsh-plugin/nsh/nsh.h
+++ b/nsh-plugin/nsh/nsh.h
@@ -103,6 +103,7 @@ _(c4)
#define foreach_nsh_input_error \
_(MAPPED, "NSH header found and mapped") \
_(NO_MAPPING, "no mapping for nsh key") \
+_(NO_ENTRY, "no entry for nsh key") \
_(INVALID_NEXT_PROTOCOL, "invalid next protocol") \
typedef enum {