aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2018-07-31 10:05:04 +0200
committerNeale Ranns <nranns@cisco.com>2018-08-03 14:43:59 +0000
commit248ff9280abba7c705c2db47ad22d36f06e64bbc (patch)
tree6a658f8746d6f4fe7022c18ed9a8ee1927a6a8f6 /src
parent717de096c4d715eab6b783aaa28f26a9114925da (diff)
avf: add avf_create_reply_handler to avf_test
Change-Id: I2f376a777081da131110227e760ca0069438c918 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/avf/avf_test.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/plugins/avf/avf_test.c b/src/plugins/avf/avf_test.c
index c980779eeac..7bcb1081179 100644
--- a/src/plugins/avf/avf_test.c
+++ b/src/plugins/avf/avf_test.c
@@ -64,7 +64,6 @@ typedef struct
avf_test_main_t avf_test_main;
#define foreach_standard_reply_retval_handler \
-_(avf_create_reply) \
_(avf_delete_reply)
#define _(n) \
@@ -134,6 +133,24 @@ api_avf_create (vat_main_t * vam)
return ret;
}
+/* avf-create reply handler */
+static void
+vl_api_avf_create_reply_t_handler (vl_api_avf_create_reply_t * mp)
+{
+ vat_main_t *vam = avf_test_main.vat_main;
+ i32 retval = ntohl (mp->retval);
+
+ if (retval == 0)
+ {
+ fformat (vam->ofp, "created avf with sw_if_index %d\n",
+ ntohl (mp->sw_if_index));
+ }
+
+ vam->retval = retval;
+ vam->result_ready = 1;
+ vam->regenerate_interface_table = 1;
+}
+
/* avf delete API */
static int
api_avf_delete (vat_main_t * vam)