|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
24 #include <vpp/app/version.h>
28 #include <oddbuf/oddbuf.api_enum.h>
29 #include <oddbuf/oddbuf.api_types.h>
31 #define REPLY_MSG_ID_BASE omp->msg_id_base
48 return VNET_API_ERROR_INVALID_SW_IF_INDEX;
53 return VNET_API_ERROR_INVALID_SW_IF_INDEX;
68 int enable_disable = 1;
93 case VNET_API_ERROR_INVALID_SW_IF_INDEX:
95 (0,
"Invalid interface, only works on physical ports");
98 case VNET_API_ERROR_UNIMPLEMENTED:
100 "Device driver doesn't support redirection");
112 .path =
"oddbuf enable-disable",
114 "oddbuf enable-disable <interface-name> [disable]",
123 vl_api_oddbuf_enable_disable_reply_t *rmp;
137 #include <oddbuf/oddbuf.api.c>
163 .arc_name =
"device-input",
164 .node_name =
"oddbuf",
172 .version = VPP_BUILD_VER,
173 .description =
"Awkward chained buffer geometry generator",
174 .default_disabled = 1,
196 else if (
unformat (line_input,
"first_offset %d",
211 .path =
"oddbuf configure",
213 "oddbuf configure n_to_copy <nn> offset <nn> first_offset <nn>",
#define VALIDATE_SW_IF_INDEX(mp)
vnet_sw_interface_type_t type
#define clib_error_return(e, args...)
vl_api_interface_index_t sw_if_index
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
static void vl_api_oddbuf_enable_disable_t_handler(vl_api_oddbuf_enable_disable_t *mp)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
vnet_main_t * vnet_get_main(void)
static void setup_message_id_table(api_main_t *am)
static vlib_cli_command_t oddbuf_enable_disable_command
(constructor) VLIB_CLI_COMMAND (oddbuf_enable_disable_command)
static clib_error_t * oddbuf_config_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define VLIB_CLI_COMMAND(x,...)
static clib_error_t * oddbuf_enable_disable_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vnet_sw_interface_t * sw_interfaces
#define BAD_SW_IF_INDEX_LABEL
static vlib_cli_command_t oddbuf_config_command
(constructor) VLIB_CLI_COMMAND (oddbuf_config_command)
unformat_function_t unformat_vnet_sw_interface
#define VLIB_INIT_FUNCTION(x)
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
#define VNET_FEATURES(...)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
oddbuf_main_t oddbuf_main
API to enable / disable oddbuf on an interface.
@ VNET_SW_INTERFACE_TYPE_HARDWARE
int oddbuf_enable_disable(oddbuf_main_t *omp, u32 sw_if_index, int enable_disable)
vl_api_interface_index_t sw_if_index
static clib_error_t * oddbuf_init(vlib_main_t *vm)
vnet_interface_main_t interface_main
VNET_FEATURE_INIT(oddbuf, static)