FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
daq_vpp.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: Apache-2.0
2
* Copyright(c) 2021 Cisco Systems, Inc.
3
*/
4
5
#ifndef __DAQ_VPP_H__
6
#define __DAQ_VPP_H__
7
8
#include <stdint.h>
9
10
#define DAQ_VPP_DEFAULT_SOCKET_FILE "snort.sock"
11
#define DAQ_VPP_DEFAULT_SOCKET_PATH "/run/vpp/" DAQ_VPP_DEFAULT_SOCKET_FILE
12
#define DAQ_VPP_INST_NAME_LEN 32
13
14
typedef
enum
memif_msg_type
15
{
16
DAQ_VPP_MSG_TYPE_NONE
= 0,
17
DAQ_VPP_MSG_TYPE_HELLO
= 1,
18
DAQ_VPP_MSG_TYPE_CONFIG
= 2,
19
DAQ_VPP_MSG_TYPE_BPOOL
= 3,
20
DAQ_VPP_MSG_TYPE_QPAIR
= 4,
21
}
daq_vpp_msg_type_t
;
22
23
typedef
struct
24
{
25
char
inst_name[
DAQ_VPP_INST_NAME_LEN
];
26
}
daq_vpp_msg_hello_t
;
27
28
typedef
struct
29
{
30
uint32_t
shm_size
;
31
uint16_t
num_bpools
;
32
uint16_t
num_qpairs
;
33
}
daq_vpp_msg_config_t
;
34
35
typedef
struct
36
{
37
uint32_t
size
;
38
}
daq_vpp_msg_bpool_t
;
39
40
typedef
struct
41
{
42
uint8_t
log2_queue_size
;
43
uint32_t
desc_table_offset
;
44
uint32_t
enq_head_offset
;
45
uint32_t
deq_head_offset
;
46
uint32_t
enq_ring_offset
;
47
uint32_t
deq_ring_offset
;
48
}
daq_vpp_msg_qpair_t
;
49
50
typedef
struct
51
{
52
daq_vpp_msg_type_t
type
: 8;
53
union
54
{
55
daq_vpp_msg_hello_t
hello
;
56
daq_vpp_msg_config_t
config
;
57
daq_vpp_msg_bpool_t
bpool
;
58
daq_vpp_msg_qpair_t
qpair
;
59
};
60
}
daq_vpp_msg_t
;
61
62
typedef
enum
63
{
64
DAQ_VPP_ACTION_DROP
,
65
DAQ_VPP_ACTION_FORWARD
,
66
}
daq_vpp_action_t
;
67
68
typedef
struct
69
{
70
uint32_t
offset
;
71
uint16_t
length
;
72
uint16_t
address_space_id
;
73
uint8_t
buffer_pool
;
74
daq_vpp_action_t
action
: 8;
75
}
daq_vpp_desc_t
;
76
77
#endif
/* __DAQ_VPP_H__ */
daq_vpp_msg_t::hello
daq_vpp_msg_hello_t hello
Definition:
daq_vpp.h:55
daq_vpp_msg_qpair_t::enq_head_offset
uint32_t enq_head_offset
Definition:
daq_vpp.h:44
daq_vpp_msg_t::bpool
daq_vpp_msg_bpool_t bpool
Definition:
daq_vpp.h:57
daq_vpp_msg_qpair_t::desc_table_offset
uint32_t desc_table_offset
Definition:
daq_vpp.h:43
daq_vpp_desc_t
Definition:
daq_vpp.h:68
daq_vpp_desc_t::length
uint16_t length
Definition:
daq_vpp.h:71
daq_vpp_msg_type_t
enum memif_msg_type daq_vpp_msg_type_t
daq_vpp_msg_qpair_t::enq_ring_offset
uint32_t enq_ring_offset
Definition:
daq_vpp.h:46
DAQ_VPP_MSG_TYPE_HELLO
@ DAQ_VPP_MSG_TYPE_HELLO
Definition:
daq_vpp.h:17
daq_vpp_msg_t::config
daq_vpp_msg_config_t config
Definition:
daq_vpp.h:56
daq_vpp_msg_qpair_t
Definition:
daq_vpp.h:40
daq_vpp_desc_t::offset
uint32_t offset
Definition:
daq_vpp.h:70
daq_vpp_msg_t::type
daq_vpp_msg_type_t type
Definition:
daq_vpp.h:52
daq_vpp_msg_config_t::num_bpools
uint16_t num_bpools
Definition:
daq_vpp.h:31
daq_vpp_msg_config_t::shm_size
uint32_t shm_size
Definition:
daq_vpp.h:30
memif_msg_type
memif_msg_type
Definition:
memif.h:36
daq_vpp_msg_t
Definition:
daq_vpp.h:50
daq_vpp_desc_t::buffer_pool
uint8_t buffer_pool
Definition:
daq_vpp.h:73
daq_vpp_msg_bpool_t::size
uint32_t size
Definition:
daq_vpp.h:37
daq_vpp_msg_qpair_t::deq_head_offset
uint32_t deq_head_offset
Definition:
daq_vpp.h:45
daq_vpp_desc_t::action
daq_vpp_action_t action
Definition:
daq_vpp.h:74
daq_vpp_msg_config_t
Definition:
daq_vpp.h:28
daq_vpp_msg_hello_t
Definition:
daq_vpp.h:23
daq_vpp_msg_bpool_t
Definition:
daq_vpp.h:35
daq_vpp_msg_t::qpair
daq_vpp_msg_qpair_t qpair
Definition:
daq_vpp.h:58
DAQ_VPP_MSG_TYPE_NONE
@ DAQ_VPP_MSG_TYPE_NONE
Definition:
daq_vpp.h:16
daq_vpp_msg_qpair_t::log2_queue_size
uint8_t log2_queue_size
Definition:
daq_vpp.h:42
daq_vpp_desc_t::address_space_id
uint16_t address_space_id
Definition:
daq_vpp.h:72
DAQ_VPP_INST_NAME_LEN
#define DAQ_VPP_INST_NAME_LEN
Definition:
daq_vpp.h:12
daq_vpp_msg_config_t::num_qpairs
uint16_t num_qpairs
Definition:
daq_vpp.h:32
DAQ_VPP_MSG_TYPE_BPOOL
@ DAQ_VPP_MSG_TYPE_BPOOL
Definition:
daq_vpp.h:19
DAQ_VPP_ACTION_DROP
@ DAQ_VPP_ACTION_DROP
Definition:
daq_vpp.h:64
daq_vpp_action_t
daq_vpp_action_t
Definition:
daq_vpp.h:62
DAQ_VPP_ACTION_FORWARD
@ DAQ_VPP_ACTION_FORWARD
Definition:
daq_vpp.h:65
daq_vpp_msg_qpair_t::deq_ring_offset
uint32_t deq_ring_offset
Definition:
daq_vpp.h:47
DAQ_VPP_MSG_TYPE_QPAIR
@ DAQ_VPP_MSG_TYPE_QPAIR
Definition:
daq_vpp.h:20
DAQ_VPP_MSG_TYPE_CONFIG
@ DAQ_VPP_MSG_TYPE_CONFIG
Definition:
daq_vpp.h:18
src
plugins
snort
daq_vpp.h
Generated on Sat Jan 8 2022 10:35:50 for FD.io VPP by
1.8.17