diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2019-02-26 07:28:33 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-02-28 09:17:37 +0000 |
commit | b9625cbdb1bbb5c67e792bd28fbb6b0801a257b4 (patch) | |
tree | 1e51aa87958d6d7a8c53b98e02a1485d9e47547d /src/plugins/l2e/l2e_api.c | |
parent | 901cbb9e4dcda09e93452129096c057efea4e390 (diff) |
l2e: Migrate old MULTIARCH macros to VLIB_NODE_FN
Change-Id: I55f45d84212e2293e3798dff6850d86d75414d02
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/plugins/l2e/l2e_api.c')
-rw-r--r-- | src/plugins/l2e/l2e_api.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/plugins/l2e/l2e_api.c b/src/plugins/l2e/l2e_api.c index 045bc7ddb96..d2658ddc51e 100644 --- a/src/plugins/l2e/l2e_api.c +++ b/src/plugins/l2e/l2e_api.c @@ -56,21 +56,12 @@ #define foreach_l2e_api_msg \ _(L2_EMULATION, l2_emulation) -/** - * L2 Emulation Main - */ -typedef struct l2_emulation_main_t_ -{ - u16 msg_id_base; -} l2_emulation_main_t; - -static l2_emulation_main_t l2_emulation_main; - -#define L2E_MSG_BASE l2_emulation_main.msg_id_base +#define L2E_MSG_BASE l2em->msg_id_base static void vl_api_l2_emulation_t_handler (vl_api_l2_emulation_t * mp) { + l2_emulation_main_t *l2em = &l2_emulation_main; vl_api_l2_emulation_reply_t *rmp; int rv = 0; @@ -102,6 +93,7 @@ vl_api_l2_emulation_t_handler (vl_api_l2_emulation_t * mp) static void setup_message_id_table (api_main_t * am) { + l2_emulation_main_t *l2em = &l2_emulation_main; #define _(id,n,crc) \ vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + L2E_MSG_BASE); foreach_vl_msg_name_crc_l2e; @@ -111,6 +103,7 @@ setup_message_id_table (api_main_t * am) static void l2e_api_hookup (vlib_main_t * vm) { + l2_emulation_main_t *l2em = &l2_emulation_main; #define _(N,n) \ vl_msg_api_set_handlers(VL_API_##N + L2E_MSG_BASE, \ #n, \ |