From 2d6b2d6d1bbb130921ec525a1cc6e88f42717c79 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Wed, 25 Jan 2017 16:32:08 -0500 Subject: Repair plugin binary API message numbering Change-Id: I422a3f168bd483e011cfaf54af022cb79b78db02 Signed-off-by: Dave Barach --- src/vlibapi/vat_helper_macros.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/vlibapi/vat_helper_macros.h') diff --git a/src/vlibapi/vat_helper_macros.h b/src/vlibapi/vat_helper_macros.h index 7199364a389..dc91c9f5023 100644 --- a/src/vlibapi/vat_helper_macros.h +++ b/src/vlibapi/vat_helper_macros.h @@ -20,14 +20,13 @@ #define __vat_helper_macros_h__ /* M: construct, but don't yet send a message */ - -#define M(T,t) \ -do { \ - vam->result_ready = 0; \ - mp = vl_msg_api_alloc_as_if_client(sizeof(*mp)); \ - memset (mp, 0, sizeof (*mp)); \ - mp->_vl_msg_id = ntohs (VL_API_##T); \ - mp->client_index = vam->my_client_index; \ +#define M(T,t) \ +do { \ + vam->result_ready = 0; \ + mp = vl_msg_api_alloc_as_if_client(sizeof(*mp)); \ + memset (mp, 0, sizeof (*mp)); \ + mp->_vl_msg_id = ntohs (VL_API_##T+__plugin_msg_base); \ + mp->client_index = vam->my_client_index; \ } while(0); #define M2(T,t,n) \ @@ -35,11 +34,10 @@ do { \ vam->result_ready = 0; \ mp = vl_msg_api_alloc_as_if_client(sizeof(*mp)+(n)); \ memset (mp, 0, sizeof (*mp)); \ - mp->_vl_msg_id = ntohs (VL_API_##T); \ + mp->_vl_msg_id = ntohs (VL_API_##T+__plugin_msg_base); \ mp->client_index = vam->my_client_index; \ } while(0); - /* S: send a message */ #define S (vl_msg_api_send_shmem (vam->vl_input_queue, (u8 *)&mp)) -- cgit 1.2.3-korg