summaryrefslogtreecommitdiffstats
path: root/nsh-plugin
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-11-03 14:16:26 +0100
committerMarek Gradzki <mgradzki@cisco.com>2016-11-03 14:16:34 +0100
commit37a5ce7bdcc9bfc39d3ebabcfbdc4f4ffad3b7f0 (patch)
treec7a41b784415b847781af0a18765547ed019b648 /nsh-plugin
parentad43a56f743f8fe133b06c1d4477078daae984f4 (diff)
Remove unused nsh_control_ping
The nsh_control_ping was intended to be temporary workaround for jvpp problems. Now it can be safely removed. Change-Id: I8ea65f84617f1ab772432902ea13c102e165f026 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'nsh-plugin')
-rw-r--r--nsh-plugin/java/Makefile.am2
-rw-r--r--nsh-plugin/nsh/nsh.api22
-rw-r--r--nsh-plugin/nsh/nsh.c17
-rw-r--r--nsh-plugin/nsh/nsh_test.c39
4 files changed, 3 insertions, 77 deletions
diff --git a/nsh-plugin/java/Makefile.am b/nsh-plugin/java/Makefile.am
index 10c4cfa..3d9ebbe 100644
--- a/nsh-plugin/java/Makefile.am
+++ b/nsh-plugin/java/Makefile.am
@@ -47,7 +47,7 @@ jvpp/io_fd_vpp_jvpp_nsh_JVppNshImpl.h: defs_nsh_sfc_papi.py
mkdir -p $(java_gendir)/$(java_packagedir); \
cd $(java_gendir)/$(java_packagedir); \
mkdir -p dto future callfacade callback notification test; \
- $(jvpp_gen) -i $${dir}/defs_nsh_sfc_papi.py --plugin_name nsh --control_ping_class NshControlPing; \
+ $(jvpp_gen) -i $${dir}/defs_nsh_sfc_papi.py --plugin_name nsh; \
cd -; \
mv -f $(java_gendir)/$(java_packagedir)/jvpp_nsh_gen.h jvpp/jvpp_nsh_gen.h; \
cp $(srcdir)/pom.xml jvpp/; \
diff --git a/nsh-plugin/nsh/nsh.api b/nsh-plugin/nsh/nsh.api
index 9434ba5..8ee4943 100644
--- a/nsh-plugin/nsh/nsh.api
+++ b/nsh-plugin/nsh/nsh.api
@@ -116,25 +116,3 @@ define nsh_map_details {
u32 sw_if_index;
u32 next_node;
};
-
-/** \brief Control ping from client to api server request
- @param client_index - opaque cookie to identify the sender
- @param context - sender context, to match reply w/ request
-*/
-define nsh_control_ping {
- u32 client_index;
- u32 context;
-};
-
-/** \brief Control ping from the client to the server response
- @param client_index - opaque cookie to identify the sender
- @param context - sender context, to match reply w/ request
- @param retval - return code for the request
- @param vpe_pid - the pid of the vpe, returned by the server
-*/
-define nsh_control_ping_reply {
- u32 context;
- i32 retval;
- u32 client_index;
- u32 vpe_pid;
-};
diff --git a/nsh-plugin/nsh/nsh.c b/nsh-plugin/nsh/nsh.c
index 780b385..ae440b8 100644
--- a/nsh-plugin/nsh/nsh.c
+++ b/nsh-plugin/nsh/nsh.c
@@ -98,8 +98,7 @@
_(NSH_ADD_DEL_ENTRY, nsh_add_del_entry) \
_(NSH_ENTRY_DUMP, nsh_entry_dump) \
_(NSH_ADD_DEL_MAP, nsh_add_del_map) \
- _(NSH_MAP_DUMP, nsh_map_dump) \
- _(NSH_CONTROL_PING, nsh_control_ping)
+ _(NSH_MAP_DUMP, nsh_map_dump)
clib_error_t *
vlib_plugin_register (vlib_main_t * vm, vnet_plugin_handoff_t * h,
@@ -118,20 +117,6 @@ typedef struct {
nsh_header_t nsh_header;
} nsh_input_trace_t;
-
-static void vl_api_nsh_control_ping_t_handler
-(vl_api_nsh_control_ping_t *mp)
-{
- nsh_main_t * nm = &nsh_main;
- vl_api_nsh_control_ping_reply_t * rmp;
- int rv = 0;
-
- REPLY_MACRO2(VL_API_NSH_CONTROL_PING_REPLY,
- ({
- rmp->vpe_pid = ntohl (getpid());
- }));
-}
-
u8 * format_nsh_header (u8 * s, va_list * args)
{
nsh_header_t * nsh = va_arg (*args, nsh_header_t *);
diff --git a/nsh-plugin/nsh/nsh_test.c b/nsh-plugin/nsh/nsh_test.c
index 08f7ddf..c5d30ef 100644
--- a/nsh-plugin/nsh/nsh_test.c
+++ b/nsh-plugin/nsh/nsh_test.c
@@ -85,8 +85,7 @@ foreach_standard_reply_retval_handler;
_(NSH_ADD_DEL_ENTRY_REPLY, nsh_add_del_entry_reply) \
_(NSH_ENTRY_DETAILS, nsh_entry_details) \
_(NSH_ADD_DEL_MAP_REPLY, nsh_add_del_map_reply) \
-_(NSH_MAP_DETAILS, nsh_map_details) \
-_(NSH_CONTROL_PING_REPLY, nsh_control_ping_reply)
+_(NSH_MAP_DETAILS, nsh_map_details)
/* M: construct, but don't yet send a message */
@@ -125,42 +124,6 @@ do { \
return -99; \
} while(0);
-
-static void vl_api_nsh_control_ping_reply_t_handler
-(vl_api_nsh_control_ping_reply_t * mp)
-{
- vat_main_t * vam = &vat_main;
- i32 retval = ntohl(mp->retval);
- if (vam->async_mode) {
- vam->async_errors += (retval < 0);
- } else {
- vam->retval = retval;
- vam->result_ready = 1;
- }
-}
-
-static void vl_api_nsh_control_ping_reply_t_handler_json
-(vl_api_nsh_control_ping_reply_t * mp)
-{
- vat_main_t * vam = &vat_main;
- i32 retval = ntohl(mp->retval);
-
- if (VAT_JSON_NONE != vam->json_tree.type) {
- vat_json_print(vam->ofp, &vam->json_tree);
- vat_json_free(&vam->json_tree);
- vam->json_tree.type = VAT_JSON_NONE;
- } else {
- /* just print [] */
- vat_json_init_array(&vam->json_tree);
- vat_json_print(vam->ofp, &vam->json_tree);
- vam->json_tree.type = VAT_JSON_NONE;
- }
-
- vam->retval = retval;
- vam->result_ready = 1;
-}
-
-
static int api_nsh_add_del_entry (vat_main_t * vam)
{
nsh_test_main_t * sm = &nsh_test_main;