aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlibapi
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-09-14 18:54:45 -0700
committerOle Tr�an <otroan@employees.org>2021-09-27 07:04:51 +0000
commit248210c6ca1716ee2c5e6c974051218930fa4c26 (patch)
tree5c4e8e1c53800e8ec43da7a8dbc4fbe73e5c9672 /src/vlibapi
parent1b6c7932a8feb419aae73a00a6784d7c110decdc (diff)
misc: move part of vpe apis to vlibmemory
VPE apis are actually vlib apis. This moves those that are not tightly coupled with vapi to vlib_api Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I456a64ce49a0cdeff4a0931c6ea513cb639f683e Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vlibapi')
-rw-r--r--src/vlibapi/api_helper_macros.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/vlibapi/api_helper_macros.h b/src/vlibapi/api_helper_macros.h
index d49282e9e65..2e0a62229f3 100644
--- a/src/vlibapi/api_helper_macros.h
+++ b/src/vlibapi/api_helper_macros.h
@@ -271,12 +271,8 @@ do { \
/* "trust, but verify" */
-
-static inline uword
-vnet_sw_if_index_is_api_valid (u32 sw_if_index)
-{
- return vnet_sw_interface_is_api_valid (vnet_get_main (), sw_if_index);
-}
+#define vnet_sw_if_index_is_api_valid(sw_if_index) \
+ vnet_sw_interface_is_api_valid (vnet_get_main (), sw_if_index)
#define VALIDATE_SW_IF_INDEX(mp) \
do { u32 __sw_if_index = ntohl((mp)->sw_if_index); \
@@ -423,7 +419,7 @@ typedef struct
/* convenience */
vlib_main_t *vlib_main;
- vnet_main_t *vnet_main;
+ struct vnet_main_t *vnet_main;
} vpe_api_main_t;
extern vpe_api_main_t vpe_api_main;