X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvlibapi%2Fapi_common.h;h=3fdc1bbdd36d573f1eaaa9ff97b34d357317db3e;hb=1a19552eee24e447e6087de43a2eeb9250b8cae7;hp=2105f1bd430b475ff3fbcf0f7a4f005be45f33bd;hpb=0aa4013e20471a7b23bc3252649c95c81b5d7519;p=vpp.git diff --git a/src/vlibapi/api_common.h b/src/vlibapi/api_common.h index 2105f1bd430..3fdc1bbdd36 100644 --- a/src/vlibapi/api_common.h +++ b/src/vlibapi/api_common.h @@ -20,7 +20,8 @@ #ifndef included_api_common_h #define included_api_common_h -/** \file API common definitions +/** \file api_common.h + * API common definitions * See api_doc.md for more info */ @@ -56,6 +57,7 @@ typedef struct vl_api_registration_ f64 last_heard; int last_queue_head; int unanswered_pings; + int is_being_removed; /** shared memory only: pointer to client input queue */ svm_queue_t *vl_input_queue; @@ -131,6 +133,7 @@ typedef struct int replay; /**< is this message to be replayed? */ int message_bounce; /**< do not free message after processing */ int is_mp_safe; /**< worker thread barrier required? */ + int is_autoendian; /**< endian conversion required? */ } vl_msg_api_msg_config_t; /** Message header structure */ @@ -222,7 +225,7 @@ typedef struct } api_version_t; /** API main structure, used by both vpp and binary API clients */ -typedef struct +typedef struct api_main_t { /** Message handler vector */ void (**msg_handlers) (void *); @@ -247,6 +250,9 @@ typedef struct /** Message is mp safe vector */ u8 *is_mp_safe; + /** Message requires us to do endian conversion */ + u8 *is_autoendian; + /** Allocator ring vectors (in shared memory) */ struct ring_alloc_ *arings; @@ -369,6 +375,12 @@ typedef struct elog_main_t *elog_main; int elog_trace_api_messages; + /** performance counter callback **/ + void (**perf_counter_cbs) + (struct api_main_t *, u32 id, int before_or_after); + void (**perf_counter_cbs_tmp) + (struct api_main_t *, u32 id, int before_or_after); + } api_main_t; extern __thread api_main_t *my_api_main;