FD.io VPP
v21.01.1
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.1.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
29
/** \brief
30
@param client_index - opaque cookie to identify the sender
31
@param context - sender context, to match reply w/ request
32
@param host_if - Linux netdev interface name
33
@param name - new af_xdp interface name (optional)
34
@param rxq_num - number of receive queues. 65535 can be used as special value to request all available queues (optional)
35
@param rxq_size - receive queue size (optional)
36
@param txq_size - transmit queue size (optional)
37
@param mode - operation mode (optional)
38
@param prog - eBPF program path (optional)
39
*/
40
41
define af_xdp_create
42
{
43
u32
client_index
;
44
u32
context
;
45
46
string
host_if[64];
47
string
name
[64];
48
u16
rxq_num [
default
=1];
49
u16
rxq_size [
default
=0];
50
u16
txq_size [
default
=0];
51
vl_api_af_xdp_mode_t
mode
[
default
=0];
52
string
prog[256];
53
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]"
;
54
option status=
"in_progress"
;
55
};
56
57
/** \brief
58
@param context - sender context, to match reply w/ request
59
@param retval - return value for request
60
@param sw_if_index - software index for the new af_xdp interface
61
*/
62
63
define af_xdp_create_reply
64
{
65
u32
context
;
66
i32
retval
;
67
vl_api_interface_index_t
sw_if_index
;
68
option status=
"in_progress"
;
69
};
70
71
/** \brief
72
@param client_index - opaque cookie to identify the sender
73
@param context - sender context, to match reply w/ request
74
@param sw_if_index - interface index
75
*/
76
77
autoreply define af_xdp_delete
78
{
79
u32
client_index
;
80
u32
context
;
81
82
vl_api_interface_index_t
sw_if_index
;
83
option vat_help =
"<sw_if_index index>"
;
84
option status=
"in_progress"
;
85
};
86
87
/*
88
* Local Variables:
89
* eval: (c-set-style "gnu")
90
* End:
91
*/
vl_api_af_xdp_delete_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition:
af_xdp.api:82
AF_XDP_API_MODE_ZERO_COPY
Definition:
af_xdp.api:25
vl_api_af_xdp_create_t::client_index
u32 client_index
Definition:
af_xdp.api:43
u32
unsigned int u32
Definition:
types.h:88
af_xdp_mode
af_xdp_mode
Definition:
af_xdp.api:21
AF_XDP_API_MODE_AUTO
Definition:
af_xdp.api:23
u16
unsigned short u16
Definition:
types.h:57
mode
vl_api_tunnel_mode_t mode
Definition:
gre.api:48
AF_XDP_API_MODE_COPY
Definition:
af_xdp.api:24
vl_api_af_xdp_create_t::context
u32 context
Definition:
af_xdp.api:44
name
string name[64]
Definition:
ip.api:44
i32
signed int i32
Definition:
types.h:77
vl_api_af_xdp_create_reply_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition:
af_xdp.api:67
vl_api_af_xdp_create_reply_t::retval
i32 retval
Definition:
af_xdp.api:66
vl_api_af_xdp_create_reply_t::context
u32 context
Definition:
af_xdp.api:65
vl_api_af_xdp_delete_t::client_index
u32 client_index
Definition:
af_xdp.api:79
version
option version
Definition:
af_xdp.api:18
vl_api_af_xdp_delete_t::context
u32 context
Definition:
af_xdp.api:80
src
plugins
af_xdp
af_xdp.api
Generated on Wed Jul 14 2021 16:03:34 for FD.io VPP by
1.8.13