From 248ff9280abba7c705c2db47ad22d36f06e64bbc Mon Sep 17 00:00:00 2001 From: Jakub Grajciar Date: Tue, 31 Jul 2018 10:05:04 +0200 Subject: avf: add avf_create_reply_handler to avf_test Change-Id: I2f376a777081da131110227e760ca0069438c918 Signed-off-by: Jakub Grajciar --- src/plugins/avf/avf_test.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/plugins/avf') 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) -- cgit 1.2.3-korg