FD.io VPP
v20.09-64-g4f7b92f0a
Vector Packet Processing
|
Go to the source code of this file.
Data Structures | |
struct | memif_conn_args_t |
Memif connection arguments. More... | |
struct | memif_buffer_t |
Memif buffer. More... | |
struct | memif_queue_details_t |
Memif queue details. More... | |
struct | memif_region_details_t |
Memif region details. More... | |
struct | memif_details_t |
Memif details. More... | |
Macros | |
#define | LIBMEMIF_VERSION "3.1" |
Libmemif version. More... | |
#define | MEMIF_DEFAULT_APP_NAME "libmemif-app" |
Default name of application using libmemif. More... | |
#define | MEMIF_FD_EVENT_READ (1 << 0) |
user needs to set events that occured on fd and pass them to memif_control_fd_handler More... | |
#define | MEMIF_FD_EVENT_WRITE (1 << 1) |
#define | MEMIF_FD_EVENT_ERROR (1 << 2) |
inform libmemif that error occured on fd More... | |
#define | MEMIF_FD_EVENT_DEL (1 << 3) |
if set, informs that fd is going to be closed (user may want to stop watching for events on this fd) More... | |
#define | MEMIF_FD_EVENT_MOD (1 << 4) |
update events More... | |
#define | MEMIF_BUFFER_FLAG_NEXT (1 << 0) |
next buffer present (chained buffers) More... | |
#define | MEMIF_BUFFER_FLAG_RX (1 << 1) |
states that buffer is from rx ring More... | |
#define | MEMIF_QUEUE_FLAG_POLLING 1 |
if set queue is in polling mode, else in interrupt mode More... | |
#define | MEMIF_HAVE_CANCEL_POLL_EVENT 1 |
Send signal to stop concurrently running memif_poll_event(). More... | |
Typedefs | |
typedef void * | memif_per_thread_main_handle_t |
Memif per thread main handle Pointer of type void, pointing to internal structure. More... | |
typedef void * | memif_conn_handle_t |
Memif connection handle pointer of type void, pointing to internal structure. More... | |
typedef void * | memif_socket_handle_t |
Memif socket handle pointer of type void, pointing to internal structure. More... | |
typedef void *() | memif_alloc_t(size_t size) |
Memif allocator alloc. More... | |
typedef void *() | memif_realloc_t(void *ptr, size_t size) |
Memif realloc. More... | |
typedef void() | memif_free_t(void *ptr) |
Memif allocator free. More... | |
typedef int() | memif_control_fd_update_t(int fd, uint8_t events, void *private_ctx) |
Memif control file descriptor update (callback function) More... | |
typedef int() | memif_connection_update_t(memif_conn_handle_t conn, void *private_ctx) |
Memif connection status update (callback function) More... | |
typedef int() | memif_interrupt_t(memif_conn_handle_t conn, void *private_ctx, uint16_t qid) |
Memif interrupt occured (callback function) More... | |
typedef uint32_t() | memif_get_external_buffer_offset_t(void *private_ctx) |
Get external buffer offset (optional) More... | |
typedef int() | memif_add_external_region_t(void **addr, uint32_t size, int *fd, void *private_ctx) |
Add external region. More... | |
typedef void *() | memif_get_external_region_addr_t(uint32_t size, int fd, void *private_ctx) |
Get external region address. More... | |
typedef int() | memif_del_external_region_t(void *addr, uint32_t size, int fd, void *private_ctx) |
Delete external region. More... | |
#define LIBMEMIF_VERSION "3.1" |
Libmemif version.
Definition at line 26 of file libmemif.h.
#define MEMIF_BUFFER_FLAG_NEXT (1 << 0) |
next buffer present (chained buffers)
Definition at line 329 of file libmemif.h.
#define MEMIF_BUFFER_FLAG_RX (1 << 1) |
states that buffer is from rx ring
Definition at line 331 of file libmemif.h.
#define MEMIF_DEFAULT_APP_NAME "libmemif-app" |
Default name of application using libmemif.
Definition at line 28 of file libmemif.h.
#define MEMIF_QUEUE_FLAG_POLLING 1 |
if set queue is in polling mode, else in interrupt mode
Definition at line 359 of file libmemif.h.
typedef void*() memif_alloc_t(size_t size) |
Memif allocator alloc.
size | - requested allocation size |
custom memory allocator: alloc function template
Definition at line 120 of file libmemif.h.
typedef void* memif_conn_handle_t |
Memif connection handle pointer of type void, pointing to internal structure.
Definition at line 108 of file libmemif.h.
typedef void() memif_free_t(void *ptr) |
Memif allocator free.
size | - requested allocation size |
custom memory allocator: free function template
Definition at line 136 of file libmemif.h.
typedef void* memif_per_thread_main_handle_t |
Memif per thread main handle Pointer of type void, pointing to internal structure.
Used to identify internal per thread database.
Definition at line 103 of file libmemif.h.
typedef void*() memif_realloc_t(void *ptr, size_t size) |
Memif realloc.
ptr | - pointer to memory block |
size | - requested allocation size |
custom memory reallocation
Definition at line 129 of file libmemif.h.
typedef void* memif_socket_handle_t |
Memif socket handle pointer of type void, pointing to internal structure.
Definition at line 113 of file libmemif.h.
enum memif_err_t |
Error codes
Enumerator | |
---|---|
MEMIF_ERR_SUCCESS | success |
MEMIF_ERR_SYSCALL | other syscall error |
MEMIF_ERR_CONNREFUSED | connection refused |
MEMIF_ERR_ACCES | permission denied |
MEMIF_ERR_NO_FILE | file does not exist |
MEMIF_ERR_FILE_LIMIT | system open file limit |
MEMIF_ERR_PROC_FILE_LIMIT | process open file limit |
MEMIF_ERR_ALREADY | connection already requested |
MEMIF_ERR_AGAIN | fd is not socket, or operation would block |
MEMIF_ERR_BAD_FD | invalid fd |
MEMIF_ERR_NOMEM | out of memory |
MEMIF_ERR_INVAL_ARG | invalid argument |
MEMIF_ERR_NOCONN | handle points to no connection |
MEMIF_ERR_CONN | handle points to existing connection |
MEMIF_ERR_CB_FDUPDATE | user defined callback memif_control_fd_update_t error |
MEMIF_ERR_FILE_NOT_SOCK | file specified by socket filename exists, but it's not socket |
MEMIF_ERR_NO_SHMFD | missing shm fd |
MEMIF_ERR_COOKIE | wrong cookie on ring |
MEMIF_ERR_NOBUF_RING | ring buffer full |
MEMIF_ERR_NOBUF | not enough memif buffers |
MEMIF_ERR_NOBUF_DET | memif details needs larger buffer |
MEMIF_ERR_INT_WRITE | send interrupt error |
MEMIF_ERR_MFMSG | malformed msg received |
MEMIF_ERR_QID | invalid queue id |
MEMIF_ERR_PROTO | incompatible protocol version |
MEMIF_ERR_ID | unmatched interface id |
MEMIF_ERR_ACCSLAVE | slave cannot accept connection requests |
MEMIF_ERR_ALRCONN | memif is already connected |
MEMIF_ERR_MODE | mode mismatch |
MEMIF_ERR_SECRET | secret mismatch |
MEMIF_ERR_NOSECRET | secret required |
MEMIF_ERR_MAXREG | max region limit reached |
MEMIF_ERR_MAXRING | max ring limit reached |
MEMIF_ERR_NO_INTFD | missing interrupt fd |
MEMIF_ERR_DISCONNECT | disconnect received |
MEMIF_ERR_DISCONNECTED | peer interface disconnected |
MEMIF_ERR_UNKNOWN_MSG | unknown message type |
MEMIF_ERR_POLL_CANCEL | memif_poll_event() was cancelled |
MEMIF_ERR_MAX_RING | too large ring size |
MEMIF_ERR_PRIVHDR | private hdrs not supported |
Definition at line 34 of file libmemif.h.