From 5d5f85f5e4003476fb6d9a0ccd6ad58ad90e5138 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Fri, 3 Dec 2021 10:48:13 +0000 Subject: api: refactor to use REPLY_MSG_ID_BASE #define REPLY_MSG_ID_BASE is the standard way to define reply message id base, so this refactor makes all the files use that. This is a preparation patch for future safety add-ons which rely on REPLY_MACRO* parameters to be preprocessor tokens identifying the message instead, Type: refactor Signed-off-by: Klement Sekera Change-Id: Ibe3e056a3d9326d08af45bbcb25588b11e870141 --- src/plugins/avf/avf_api.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/plugins/avf') diff --git a/src/plugins/avf/avf_api.c b/src/plugins/avf/avf_api.c index 883b374331f..366a983f373 100644 --- a/src/plugins/avf/avf_api.c +++ b/src/plugins/avf/avf_api.c @@ -29,6 +29,7 @@ #include #include +#define REPLY_MSG_ID_BASE (am->msg_id_base) #include static void @@ -52,10 +53,8 @@ vl_api_avf_create_t_handler (vl_api_avf_create_t * mp) rv = args.rv; /* *INDENT-OFF* */ - REPLY_MACRO2 (VL_API_AVF_CREATE_REPLY + am->msg_id_base, - ({ - rmp->sw_if_index = ntohl (args.sw_if_index); - })); + REPLY_MACRO2 (VL_API_AVF_CREATE_REPLY, + ({ rmp->sw_if_index = ntohl (args.sw_if_index); })); /* *INDENT-ON* */ } @@ -82,7 +81,7 @@ vl_api_avf_delete_t_handler (vl_api_avf_delete_t * mp) AVF_PROCESS_EVENT_DELETE_IF, hw->dev_instance); reply: - REPLY_MACRO (VL_API_AVF_DELETE_REPLY + am->msg_id_base); + REPLY_MACRO (VL_API_AVF_DELETE_REPLY); } /* set tup the API message handling tables */ -- cgit 1.2.3-korg