summaryrefslogtreecommitdiffstats
path: root/src/vpp-api
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2021-09-27 17:11:34 +0200
committerFlorin Coras <florin.coras@gmail.com>2021-09-28 15:17:37 +0000
commit3459ece6da90627b161e2128b5926f1e58e7db65 (patch)
tree1416cae6fa48c233cfe1cf7b69d0446fef77aa50 /src/vpp-api
parent7d0e30bc642f9137188e962f3d1fe38303e674ba (diff)
misc: vpe.api messages dynamically allocated
This is the last in the series of moving API messages from vpp/api/vpe.api to vlibmemory/memclnt.api. This patch makes the remaining vpe.api messages dynamic, to help VAT2 binary-api command. Moves the VAT test code to a separate file and removes the now unnused API meta files. Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I01dd78eaff1d3715dff17d2643bf0f7f0089935b Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp-api')
-rw-r--r--src/vpp-api/client/client.c16
-rw-r--r--src/vpp-api/client/test.c6
2 files changed, 7 insertions, 15 deletions
diff --git a/src/vpp-api/client/client.c b/src/vpp-api/client/client.c
index 902ed3bd625..542df9d414b 100644
--- a/src/vpp-api/client/client.c
+++ b/src/vpp-api/client/client.c
@@ -30,7 +30,8 @@
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
-#include <vpp/api/vpe_msg_enum.h>
+#include <vlibmemory/memclnt.api_enum.h>
+#include <vlibmemory/memclnt.api_types.h>
#include "vppapiclient.h"
@@ -48,14 +49,6 @@ bool rx_thread_done;
* vac_read() -> resumes RX thread
*/
-#define vl_typedefs /* define message structures */
-#include <vpp/api/vpe_all_api_h.h>
-#undef vl_typedefs
-
-#define vl_endianfun /* define message structures */
-#include <vpp/api/vpe_all_api_h.h>
-#undef vl_endianfun
-
typedef struct {
u8 connected_to_vlib;
pthread_t rx_thread_handle;
@@ -497,10 +490,11 @@ vac_read (char **p, int *l, u16 timeout)
/*
* XXX: Makes the assumption that client_index is the first member
*/
-typedef VL_API_PACKED(struct _vl_api_header {
+typedef struct _vl_api_header
+{
u16 _vl_msg_id;
u32 client_index;
-}) vl_api_header_t;
+} __attribute__ ((packed)) vl_api_header_t;
static u32
vac_client_index (void)
diff --git a/src/vpp-api/client/test.c b/src/vpp-api/client/test.c
index 4e98dc03a14..b7e6f017445 100644
--- a/src/vpp-api/client/test.c
+++ b/src/vpp-api/client/test.c
@@ -32,7 +32,6 @@
#include <vlib/unix/unix.h>
#include <vlibapi/api.h>
#include <vppinfra/time.h>
-#include <vpp/api/vpe_msg_enum.h>
#include <signal.h>
#include "vppapiclient.h"
#include "stat_client.h"
@@ -40,9 +39,8 @@
#include <vlibmemory/vlib.api_enum.h>
#include <vlibmemory/vlib.api_types.h>
-#define vl_typedefs /* define message structures */
-#include <vpp/api/vpe_all_api_h.h>
-#undef vl_typedefs
+#include <vpp/api/vpe.api_enum.h>
+#include <vpp/api/vpe.api_types.h>
volatile int sigterm_received = 0;
volatile u32 result_ready;