FD.io VPP  v20.01-rc1
Vector Packet Processing
api_main_t Struct Reference

API main structure, used by both vpp and binary API clients. More...

+ Collaboration diagram for api_main_t:

Data Fields

void(** msg_handlers )(void *)
 Message handler vector. More...
 
int(** pd_msg_handlers )(void *, int)
 Plaform-dependent (aka hardware) message handler vector. More...
 
void(** msg_cleanup_handlers )(void *)
 non-default message cleanup handler vector More...
 
void(** msg_endian_handlers )(void *)
 Message endian handler vector. More...
 
void(** msg_print_handlers )(void *, void *)
 Message print function vector. More...
 
const char ** msg_names
 Message name vector. More...
 
u8message_bounce
 Don't automatically free message buffer vetor. More...
 
u8is_mp_safe
 Message is mp safe vector. More...
 
struct ring_alloc_arings
 Allocator ring vectors (in shared memory) More...
 
u32 ring_misses
 Number of times that the ring allocator failed. More...
 
u32 garbage_collects
 Number of garbage-collected message buffers. More...
 
u32 missing_clients
 Number of missing clients / failed message sends. More...
 
vl_api_trace_trx_trace
 Received message trace configuration. More...
 
vl_api_trace_ttx_trace
 Sent message trace configuration. More...
 
int msg_print_flag
 Print every received message. More...
 
trace_cfg_tapi_trace_cfg
 Current trace configuration. More...
 
int our_pid
 Current process PID. More...
 
svm_region_tvlib_rp
 Current binary api segment descriptor. More...
 
svm_region_tvlib_primary_rp
 Primary api segment descriptor. More...
 
svm_region_t ** vlib_private_rps
 Vector of all mapped shared-VM segments. More...
 
svm_region_t ** mapped_shmem_regions
 
struct vl_shmem_hdr_shmem_hdr
 Binary API shared-memory segment header pointer. More...
 
vl_api_registration_t ** vl_clients
 vlib/vpp only: vector of client registrations More...
 
u8serialized_message_table_in_shmem
 vlib/vpp only: serialized (message, name, crc) table More...
 
u16 first_available_msg_id
 First available message ID, for theplugin msg allocator. More...
 
uwordmsg_range_by_name
 Message range by name hash. More...
 
vl_api_msg_range_tmsg_ranges
 vector of message ranges More...
 
int api_uid
 uid for the api shared memory region More...
 
int api_gid
 gid for the api shared memory region More...
 
u64 global_baseva
 base virtual address for global VM region More...
 
u64 global_size
 size of the global VM region More...
 
u64 api_size
 size of the API region More...
 
u64 global_pvt_heap_size
 size of the global VM private mheap More...
 
u64 api_pvt_heap_size
 size of the api private mheap More...
 
svm_queue_tvl_input_queue
 Peer input queue pointer. More...
 
int my_client_index
 All VLIB-side message handlers use my_client_index to identify the queue / client. More...
 
vl_api_registration_tmy_registration
 This is the (shared VM) address of the registration, don't use it to id the connection since it can't possibly work in simulator replay. More...
 
u32 vlib_input_queue_length
 vpp/vlib input queue length More...
 
uwordmsg_index_by_name_and_crc
 client message index hash table More...
 
api_version_tapi_version_list
 api version list More...
 
const char * region_name
 Shared VM binary API region name. More...
 
const char * root_path
 Chroot path to the shared memory API files. More...
 
int replay_in_progress
 Replay in progress? More...
 
u8save_msg_table_filename
 Dump (msg-name, crc) snapshot here at startup. More...
 
_vl_msg_api_function_list_elt_t * reaper_function_registrations
 List of API client reaper functions. More...
 
pthread_t rx_thread_handle
 Bin API thread handle. More...
 
elog_main_telog_main
 event log More...
 
int elog_trace_api_messages
 

Detailed Description

API main structure, used by both vpp and binary API clients.

Definition at line 225 of file api_common.h.

Field Documentation

◆ api_gid

int api_main_t::api_gid

gid for the api shared memory region

Definition at line 309 of file api_common.h.

◆ api_pvt_heap_size

u64 api_main_t::api_pvt_heap_size

size of the api private mheap

Definition at line 324 of file api_common.h.

◆ api_size

u64 api_main_t::api_size

size of the API region

Definition at line 318 of file api_common.h.

◆ api_trace_cfg

trace_cfg_t* api_main_t::api_trace_cfg

Current trace configuration.

Definition at line 272 of file api_common.h.

◆ api_uid

int api_main_t::api_uid

uid for the api shared memory region

Definition at line 306 of file api_common.h.

◆ api_version_list

api_version_t* api_main_t::api_version_list

api version list

Definition at line 348 of file api_common.h.

◆ arings

struct ring_alloc_* api_main_t::arings

Allocator ring vectors (in shared memory)

Definition at line 251 of file api_common.h.

◆ elog_main

elog_main_t* api_main_t::elog_main

event log

Definition at line 369 of file api_common.h.

◆ elog_trace_api_messages

int api_main_t::elog_trace_api_messages

Definition at line 370 of file api_common.h.

◆ first_available_msg_id

u16 api_main_t::first_available_msg_id

First available message ID, for theplugin msg allocator.

Definition at line 297 of file api_common.h.

◆ garbage_collects

u32 api_main_t::garbage_collects

Number of garbage-collected message buffers.

Definition at line 257 of file api_common.h.

◆ global_baseva

u64 api_main_t::global_baseva

base virtual address for global VM region

Definition at line 312 of file api_common.h.

◆ global_pvt_heap_size

u64 api_main_t::global_pvt_heap_size

size of the global VM private mheap

Definition at line 321 of file api_common.h.

◆ global_size

u64 api_main_t::global_size

size of the global VM region

Definition at line 315 of file api_common.h.

◆ is_mp_safe

u8* api_main_t::is_mp_safe

Message is mp safe vector.

Definition at line 248 of file api_common.h.

◆ mapped_shmem_regions

svm_region_t** api_main_t::mapped_shmem_regions

Definition at line 285 of file api_common.h.

◆ message_bounce

u8* api_main_t::message_bounce

Don't automatically free message buffer vetor.

Definition at line 245 of file api_common.h.

◆ missing_clients

u32 api_main_t::missing_clients

Number of missing clients / failed message sends.

Definition at line 260 of file api_common.h.

◆ msg_cleanup_handlers

void(** api_main_t::msg_cleanup_handlers) (void *)

non-default message cleanup handler vector

Definition at line 233 of file api_common.h.

◆ msg_endian_handlers

void(** api_main_t::msg_endian_handlers) (void *)

Message endian handler vector.

Definition at line 236 of file api_common.h.

◆ msg_handlers

void(** api_main_t::msg_handlers) (void *)

Message handler vector.

Definition at line 228 of file api_common.h.

◆ msg_index_by_name_and_crc

uword* api_main_t::msg_index_by_name_and_crc

client message index hash table

Definition at line 345 of file api_common.h.

◆ msg_names

const char** api_main_t::msg_names

Message name vector.

Definition at line 242 of file api_common.h.

◆ msg_print_flag

int api_main_t::msg_print_flag

Print every received message.

Definition at line 269 of file api_common.h.

◆ msg_print_handlers

void(** api_main_t::msg_print_handlers) (void *, void *)

Message print function vector.

Definition at line 239 of file api_common.h.

◆ msg_range_by_name

uword* api_main_t::msg_range_by_name

Message range by name hash.

Definition at line 300 of file api_common.h.

◆ msg_ranges

vl_api_msg_range_t* api_main_t::msg_ranges

vector of message ranges

Definition at line 303 of file api_common.h.

◆ my_client_index

int api_main_t::my_client_index

All VLIB-side message handlers use my_client_index to identify the queue / client.

This works in sim replay.

Definition at line 333 of file api_common.h.

◆ my_registration

vl_api_registration_t* api_main_t::my_registration

This is the (shared VM) address of the registration, don't use it to id the connection since it can't possibly work in simulator replay.

Definition at line 339 of file api_common.h.

◆ our_pid

int api_main_t::our_pid

Current process PID.

Definition at line 275 of file api_common.h.

◆ pd_msg_handlers

int(** api_main_t::pd_msg_handlers) (void *, int)

Plaform-dependent (aka hardware) message handler vector.

Definition at line 230 of file api_common.h.

◆ reaper_function_registrations

_vl_msg_api_function_list_elt_t* api_main_t::reaper_function_registrations

List of API client reaper functions.

Definition at line 363 of file api_common.h.

◆ region_name

const char* api_main_t::region_name

Shared VM binary API region name.

Definition at line 351 of file api_common.h.

◆ replay_in_progress

int api_main_t::replay_in_progress

Replay in progress?

Definition at line 357 of file api_common.h.

◆ ring_misses

u32 api_main_t::ring_misses

Number of times that the ring allocator failed.

Definition at line 254 of file api_common.h.

◆ root_path

const char* api_main_t::root_path

Chroot path to the shared memory API files.

Definition at line 354 of file api_common.h.

◆ rx_thread_handle

pthread_t api_main_t::rx_thread_handle

Bin API thread handle.

Definition at line 366 of file api_common.h.

◆ rx_trace

vl_api_trace_t* api_main_t::rx_trace

Received message trace configuration.

Definition at line 263 of file api_common.h.

◆ save_msg_table_filename

u8* api_main_t::save_msg_table_filename

Dump (msg-name, crc) snapshot here at startup.

Definition at line 360 of file api_common.h.

◆ serialized_message_table_in_shmem

u8* api_main_t::serialized_message_table_in_shmem

vlib/vpp only: serialized (message, name, crc) table

Definition at line 294 of file api_common.h.

◆ shmem_hdr

struct vl_shmem_hdr_* api_main_t::shmem_hdr

Binary API shared-memory segment header pointer.

Definition at line 288 of file api_common.h.

◆ tx_trace

vl_api_trace_t* api_main_t::tx_trace

Sent message trace configuration.

Definition at line 266 of file api_common.h.

◆ vl_clients

vl_api_registration_t** api_main_t::vl_clients

vlib/vpp only: vector of client registrations

Definition at line 291 of file api_common.h.

◆ vl_input_queue

svm_queue_t* api_main_t::vl_input_queue

Peer input queue pointer.

Definition at line 327 of file api_common.h.

◆ vlib_input_queue_length

u32 api_main_t::vlib_input_queue_length

vpp/vlib input queue length

Definition at line 342 of file api_common.h.

◆ vlib_primary_rp

svm_region_t* api_main_t::vlib_primary_rp

Primary api segment descriptor.

Definition at line 281 of file api_common.h.

◆ vlib_private_rps

svm_region_t** api_main_t::vlib_private_rps

Vector of all mapped shared-VM segments.

Definition at line 284 of file api_common.h.

◆ vlib_rp

svm_region_t* api_main_t::vlib_rp

Current binary api segment descriptor.

Definition at line 278 of file api_common.h.


The documentation for this struct was generated from the following file: