FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
daq_vpp.c File Reference
+ Include dependency graph for daq_vpp.c:

Go to the source code of this file.

Macros

#define DAQ_VPP_VERSION   1
 
#define VPP_DAQ_PAUSE()   __builtin_ia32_pause ()
 
#define SET_ERROR(modinst, ...)   daq_base_api.set_errbuf (modinst, __VA_ARGS__)
 
#define ERR(rv, ...)
 

Typedefs

typedef struct _vpp_msg_pool VPPMsgPool
 
typedef struct _vpp_desc_data VPPDescData
 
typedef struct _vpp_bpool VPPBufferPool
 
typedef struct _vpp_qpair VPPQueuePair
 
typedef struct _vpp_context VPP_Context_t
 

Enumerations

enum  daq_vpp_input_mode_t { DAQ_VPP_INPUT_MODE_INTERRUPT = 0, DAQ_VPP_INPUT_MODE_POLLING }
 

Functions

static int vpp_daq_qpair_lock (VPPQueuePair *p)
 
static void vpp_daq_qpair_unlock (VPPQueuePair *p)
 
static int vpp_daq_module_load (const DAQ_BaseAPI_t *base_api)
 
static int vpp_daq_module_unload (void)
 
static int vpp_daq_get_variable_descs (const DAQ_VariableDesc_t **var_desc_table)
 
static int vpp_daq_recvmsg (int fd, daq_vpp_msg_t *msg, int n_fds, int *fds)
 
static void vpp_daq_destroy (void *handle)
 
static int vpp_daq_instantiate (const DAQ_ModuleConfig_h modcfg, DAQ_ModuleInstance_h modinst, void **ctxt_ptr)
 
static int vpp_daq_start (void *handle)
 
static int vpp_daq_interrupt (void *handle)
 
static int vpp_daq_get_stats (void *handle, DAQ_Stats_t *stats)
 
static void vpp_daq_reset_stats (void *handle)
 
static uint32_t vpp_daq_get_capabilities (void *handle)
 
static int vpp_daq_get_datalink_type (void *handle)
 
static uint32_t vpp_daq_msg_receive_one (VPP_Context_t *vc, VPPQueuePair *qp, const DAQ_Msg_t *msgs[], unsigned max_recv)
 
static unsigned vpp_daq_msg_receive (void *handle, const unsigned max_recv, const DAQ_Msg_t *msgs[], DAQ_RecvStatus *rstat)
 
static int vpp_daq_msg_finalize (void *handle, const DAQ_Msg_t *msg, DAQ_Verdict verdict)
 
static int vpp_daq_get_msg_pool_info (void *handle, DAQ_MsgPoolInfo_t *info)
 

Variables

static DAQ_VariableDesc_t vpp_variable_descriptions []
 
static DAQ_BaseAPI_t daq_base_api
 
static VPP_Context_tglobal_vpp_ctx = 0
 
const DAQ_SO_PUBLIC DAQ_ModuleAPI_t DAQ_MODULE_DATA
 

Macro Definition Documentation

◆ DAQ_VPP_VERSION

#define DAQ_VPP_VERSION   1

Definition at line 22 of file daq_vpp.c.

◆ ERR

#define ERR (   rv,
  ... 
)
Value:
{ \
SET_ERROR (modinst, __VA_ARGS__); \
rval = rv; \
goto err; \
}

Definition at line 257 of file daq_vpp.c.

◆ SET_ERROR

#define SET_ERROR (   modinst,
  ... 
)    daq_base_api.set_errbuf (modinst, __VA_ARGS__)

Definition at line 39 of file daq_vpp.c.

◆ VPP_DAQ_PAUSE

#define VPP_DAQ_PAUSE ( )    __builtin_ia32_pause ()

Definition at line 25 of file daq_vpp.c.

Typedef Documentation

◆ VPP_Context_t

typedef struct _vpp_context VPP_Context_t

◆ VPPBufferPool

typedef struct _vpp_bpool VPPBufferPool

◆ VPPDescData

typedef struct _vpp_desc_data VPPDescData

◆ VPPMsgPool

typedef struct _vpp_msg_pool VPPMsgPool

◆ VPPQueuePair

typedef struct _vpp_qpair VPPQueuePair

Enumeration Type Documentation

◆ daq_vpp_input_mode_t

Enumerator
DAQ_VPP_INPUT_MODE_INTERRUPT 
DAQ_VPP_INPUT_MODE_POLLING 

Definition at line 77 of file daq_vpp.c.

Function Documentation

◆ vpp_daq_destroy()

static void vpp_daq_destroy ( void *  handle)
static

Definition at line 212 of file daq_vpp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vpp_daq_get_capabilities()

static uint32_t vpp_daq_get_capabilities ( void *  handle)
static

Definition at line 506 of file daq_vpp.c.

◆ vpp_daq_get_datalink_type()

static int vpp_daq_get_datalink_type ( void *  handle)
static

Definition at line 513 of file daq_vpp.c.

◆ vpp_daq_get_msg_pool_info()

static int vpp_daq_get_msg_pool_info ( void *  handle,
DAQ_MsgPoolInfo_t *  info 
)
static

Definition at line 676 of file daq_vpp.c.

◆ vpp_daq_get_stats()

static int vpp_daq_get_stats ( void *  handle,
DAQ_Stats_t *  stats 
)
static

Definition at line 494 of file daq_vpp.c.

◆ vpp_daq_get_variable_descs()

static int vpp_daq_get_variable_descs ( const DAQ_VariableDesc_t **  var_desc_table)
static

Definition at line 161 of file daq_vpp.c.

◆ vpp_daq_instantiate()

static int vpp_daq_instantiate ( const DAQ_ModuleConfig_h  modcfg,
DAQ_ModuleInstance_h  modinst,
void **  ctxt_ptr 
)
static

Definition at line 265 of file daq_vpp.c.

+ Here is the call graph for this function:

◆ vpp_daq_interrupt()

static int vpp_daq_interrupt ( void *  handle)
static

Definition at line 484 of file daq_vpp.c.

◆ vpp_daq_module_load()

static int vpp_daq_module_load ( const DAQ_BaseAPI_t *  base_api)
static

Definition at line 142 of file daq_vpp.c.

◆ vpp_daq_module_unload()

static int vpp_daq_module_unload ( void  )
static

Definition at line 154 of file daq_vpp.c.

◆ vpp_daq_msg_finalize()

static int vpp_daq_msg_finalize ( void *  handle,
const DAQ_Msg_t *  msg,
DAQ_Verdict  verdict 
)
static

Definition at line 640 of file daq_vpp.c.

+ Here is the call graph for this function:

◆ vpp_daq_msg_receive()

static unsigned vpp_daq_msg_receive ( void *  handle,
const unsigned  max_recv,
const DAQ_Msg_t *  msgs[],
DAQ_RecvStatus *  rstat 
)
static

Definition at line 560 of file daq_vpp.c.

+ Here is the call graph for this function:

◆ vpp_daq_msg_receive_one()

static uint32_t vpp_daq_msg_receive_one ( VPP_Context_t vc,
VPPQueuePair qp,
const DAQ_Msg_t *  msgs[],
unsigned  max_recv 
)
inlinestatic

Definition at line 519 of file daq_vpp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vpp_daq_qpair_lock()

static int vpp_daq_qpair_lock ( VPPQueuePair p)
static

Definition at line 122 of file daq_vpp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vpp_daq_qpair_unlock()

static void vpp_daq_qpair_unlock ( VPPQueuePair p)
static

Definition at line 136 of file daq_vpp.c.

+ Here is the caller graph for this function:

◆ vpp_daq_recvmsg()

static int vpp_daq_recvmsg ( int  fd,
daq_vpp_msg_t msg,
int  n_fds,
int *  fds 
)
static

Definition at line 169 of file daq_vpp.c.

+ Here is the caller graph for this function:

◆ vpp_daq_reset_stats()

static void vpp_daq_reset_stats ( void *  handle)
static

Definition at line 501 of file daq_vpp.c.

◆ vpp_daq_start()

static int vpp_daq_start ( void *  handle)
static

Definition at line 478 of file daq_vpp.c.

Variable Documentation

◆ daq_base_api

DAQ_BaseAPI_t daq_base_api
static

Definition at line 37 of file daq_vpp.c.

◆ DAQ_MODULE_DATA

const DAQ_SO_PUBLIC DAQ_ModuleAPI_t DAQ_MODULE_DATA
Initial value:
= {
DAQ_MODULE_API_VERSION,
sizeof (DAQ_ModuleAPI_t),
"vpp",
DAQ_TYPE_INTF_CAPABLE | DAQ_TYPE_INLINE_CAPABLE |
DAQ_TYPE_MULTI_INSTANCE,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}

Definition at line 689 of file daq_vpp.c.

◆ global_vpp_ctx

VPP_Context_t* global_vpp_ctx = 0
static

Definition at line 119 of file daq_vpp.c.

◆ vpp_variable_descriptions

DAQ_VariableDesc_t vpp_variable_descriptions[]
static
Initial value:
= {
{ "debug", "Enable debugging output to stdout",
DAQ_VAR_DESC_FORBIDS_ARGUMENT },
}

Definition at line 32 of file daq_vpp.c.

vpp_daq_start
static int vpp_daq_start(void *handle)
Definition: daq_vpp.c:478
vpp_daq_msg_receive
static unsigned vpp_daq_msg_receive(void *handle, const unsigned max_recv, const DAQ_Msg_t *msgs[], DAQ_RecvStatus *rstat)
Definition: daq_vpp.c:560
vpp_daq_get_variable_descs
static int vpp_daq_get_variable_descs(const DAQ_VariableDesc_t **var_desc_table)
Definition: daq_vpp.c:161
vpp_daq_destroy
static void vpp_daq_destroy(void *handle)
Definition: daq_vpp.c:212
vpp_daq_get_capabilities
static uint32_t vpp_daq_get_capabilities(void *handle)
Definition: daq_vpp.c:506
vpp_daq_module_unload
static int vpp_daq_module_unload(void)
Definition: daq_vpp.c:154
vpp_daq_interrupt
static int vpp_daq_interrupt(void *handle)
Definition: daq_vpp.c:484
vpp_daq_get_msg_pool_info
static int vpp_daq_get_msg_pool_info(void *handle, DAQ_MsgPoolInfo_t *info)
Definition: daq_vpp.c:676
vpp_daq_instantiate
static int vpp_daq_instantiate(const DAQ_ModuleConfig_h modcfg, DAQ_ModuleInstance_h modinst, void **ctxt_ptr)
Definition: daq_vpp.c:265
vpp_daq_module_load
static int vpp_daq_module_load(const DAQ_BaseAPI_t *base_api)
Definition: daq_vpp.c:142
DAQ_VPP_VERSION
#define DAQ_VPP_VERSION
Definition: daq_vpp.c:22
vpp_daq_get_stats
static int vpp_daq_get_stats(void *handle, DAQ_Stats_t *stats)
Definition: daq_vpp.c:494
vpp_daq_get_datalink_type
static int vpp_daq_get_datalink_type(void *handle)
Definition: daq_vpp.c:513
vpp_daq_msg_finalize
static int vpp_daq_msg_finalize(void *handle, const DAQ_Msg_t *msg, DAQ_Verdict verdict)
Definition: daq_vpp.c:640
vpp_daq_reset_stats
static void vpp_daq_reset_stats(void *handle)
Definition: daq_vpp.c:501
rv
int __clib_unused rv
Definition: application.c:491