tap: move the api msg_id_base to tap_main_t 97/33797/3
authorMohsin Kazmi <sykazmi@cisco.com>
Wed, 22 Sep 2021 20:03:28 +0000 (20:03 +0000)
committerBeno�t Ganne <bganne@cisco.com>
Mon, 27 Sep 2021 09:30:42 +0000 (09:30 +0000)
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ia4065550a7ad1109e3a2592ef2c21b5e23fa85b5

src/vnet/devices/tap/tap.h
src/vnet/devices/tap/tapv2_api.c

index 2efaa51..d898098 100644 (file)
@@ -98,8 +98,10 @@ typedef struct
 
   /* host mtu size, configurable through startup.conf */
   int host_mtu_size;
+  u16 msg_id_base;
 } tap_main_t;
 
+extern tap_main_t tap_main;
 void tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args);
 int tap_delete_if (vlib_main_t * vm, u32 sw_if_index);
 int tap_gso_enable_disable (vlib_main_t * vm, u32 sw_if_index,
index 08dca0d..64a0088 100644 (file)
 #include <vnet/devices/tap/tapv2.api_enum.h>
 #include <vnet/devices/tap/tapv2.api_types.h>
 
-#define REPLY_MSG_ID_BASE msg_id_base
+#define REPLY_MSG_ID_BASE tap_main.msg_id_base
 #include <vlibapi/api_helper_macros.h>
 
-static u16 msg_id_base;
-
 static void
 vl_api_tap_create_v2_t_handler (vl_api_tap_create_v2_t * mp)
 {