FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
af_xdp.api
Go to the documentation of this file.
1
/*
2
*------------------------------------------------------------------
3
* Copyright (c) 2019 Cisco and/or its affiliates.
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at:
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*------------------------------------------------------------------
16
*/
17
18
option
version
=
"0.2.0"
;
19
import
"vnet/interface_types.api"
;
20
21
enum
af_xdp_mode
22
{
23
AF_XDP_API_MODE_AUTO
= 0,
24
AF_XDP_API_MODE_COPY
= 1,
25
AF_XDP_API_MODE_ZERO_COPY
= 2,
26
};
27
28
enumflag
af_xdp_flag
:
u8
29
{
30
AF_XDP_API_FLAGS_NO_SYSCALL_LOCK = 1,
31
};
32
33
/** \brief
34
@param client_index - opaque cookie to identify the sender
35
@param context - sender context, to match reply w/ request
36
@param host_if - Linux netdev interface name
37
@param name - new af_xdp interface name (optional)
38
@param rxq_num - number of receive queues. 65535 can be used as special value to request all available queues (optional)
39
@param rxq_size - receive queue size (optional)
40
@param txq_size - transmit queue size (optional)
41
@param mode - operation mode (optional)
42
@param flags - flags (optional)
43
@param prog - eBPF program path (optional)
44
*/
45
46
define af_xdp_create
47
{
48
u32
client_index
;
49
u32
context
;
50
51
string
host_if[64];
52
string
name
[64];
53
u16
rxq_num [
default
=1];
54
u16
rxq_size [
default
=0];
55
u16
txq_size [
default
=0];
56
vl_api_af_xdp_mode_t
mode
[
default
=0];
57
vl_api_af_xdp_flag_t
flags
[
default
=0];
58
string
prog[256];
59
option vat_help =
"<host-if linux-ifname> [name ifname] [rx-queue-size size] [tx-queue-size size] [num-rx-queues <num|all>] [prog pathname] [zero-copy|no-zero-copy] [no-syscall-lock]"
;
60
option status=
"in_progress"
;
61
};
62
63
/** \brief
64
@param context - sender context, to match reply w/ request
65
@param retval - return value for request
66
@param sw_if_index - software index for the new af_xdp interface
67
*/
68
69
define af_xdp_create_reply
70
{
71
u32
context
;
72
i32
retval
;
73
vl_api_interface_index_t
sw_if_index
;
74
option status=
"in_progress"
;
75
};
76
77
/** \brief
78
@param client_index - opaque cookie to identify the sender
79
@param context - sender context, to match reply w/ request
80
@param sw_if_index - interface index
81
*/
82
83
autoreply define af_xdp_delete
84
{
85
u32
client_index
;
86
u32
context
;
87
88
vl_api_interface_index_t
sw_if_index
;
89
option vat_help =
"<sw_if_index index>"
;
90
option status=
"in_progress"
;
91
};
92
93
/*
94
* Local Variables:
95
* eval: (c-set-style "gnu")
96
* End:
97
*/
vl_api_af_xdp_create_t::flags
vl_api_af_xdp_flag_t flags[default=0]
Definition:
af_xdp.api:57
vl_api_af_xdp_create_reply_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition:
af_xdp.api:73
vl_api_af_xdp_create_t::name
string name[64]
Definition:
af_xdp.api:52
name
string name[64]
Definition:
fib.api:25
vl_api_af_xdp_create_t::txq_size
u16 txq_size[default=0]
Definition:
af_xdp.api:55
vl_api_af_xdp_create_reply_t::context
u32 context
Definition:
af_xdp.api:71
u16
unsigned short u16
Definition:
types.h:57
mode
vl_api_tunnel_mode_t mode
Definition:
gre.api:48
vl_api_af_xdp_delete_t::context
u32 context
Definition:
af_xdp.api:86
vl_api_af_xdp_create_reply_t
Definition:
af_xdp.api:69
vl_api_af_xdp_create_t::prog
string prog[256]
Definition:
af_xdp.api:58
i32
signed int i32
Definition:
types.h:77
af_xdp_mode
af_xdp_mode
Definition:
af_xdp.api:21
vl_api_af_xdp_create_t
Definition:
af_xdp.api:46
vl_api_af_xdp_create_reply_t::status
option status
Definition:
af_xdp.api:74
vl_api_af_xdp_create_t::mode
vl_api_af_xdp_mode_t mode[default=0]
Definition:
af_xdp.api:56
vl_api_af_xdp_create_t::rxq_size
u16 rxq_size[default=0]
Definition:
af_xdp.api:54
vl_api_af_xdp_create_t::rxq_num
u16 rxq_num[default=1]
Definition:
af_xdp.api:53
vl_api_af_xdp_create_t::client_index
u32 client_index
Definition:
af_xdp.api:48
vl_api_af_xdp_delete_t::status
option status
Definition:
af_xdp.api:90
vl_api_af_xdp_create_t::context
u32 context
Definition:
af_xdp.api:49
vl_api_af_xdp_create_t::status
option status
Definition:
af_xdp.api:60
u32
unsigned int u32
Definition:
types.h:88
vl_api_af_xdp_delete_t
Definition:
af_xdp.api:83
vl_api_af_xdp_delete_t::vat_help
option vat_help
Definition:
af_xdp.api:89
AF_XDP_API_MODE_ZERO_COPY
@ AF_XDP_API_MODE_ZERO_COPY
Definition:
af_xdp.api:25
vl_api_af_xdp_create_reply_t::retval
i32 retval
Definition:
af_xdp.api:72
u8
unsigned char u8
Definition:
types.h:56
vl_api_af_xdp_delete_t::client_index
u32 client_index
Definition:
af_xdp.api:85
af_xdp_flag
enumflag af_xdp_flag
Definition:
af_xdp.api:30
AF_XDP_API_MODE_COPY
@ AF_XDP_API_MODE_COPY
Definition:
af_xdp.api:24
vl_api_af_xdp_create_t::vat_help
option vat_help
Definition:
af_xdp.api:59
AF_XDP_API_MODE_AUTO
@ AF_XDP_API_MODE_AUTO
Definition:
af_xdp.api:23
vl_api_af_xdp_create_t::host_if
string host_if[64]
Definition:
af_xdp.api:51
vl_api_af_xdp_delete_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition:
af_xdp.api:88
version
option version
Definition:
af_xdp.api:18
flags
vl_api_wireguard_peer_flags_t flags
Definition:
wireguard.api:105
src
plugins
af_xdp
af_xdp.api
Generated on Sat Jan 8 2022 10:34:58 for FD.io VPP by
1.8.17