|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
37 if (dst_sw_if_index == ~0)
59 return VNET_API_ERROR_UNIMPLEMENTED;
61 if ((src_sw_if_index == ~0) || (dst_sw_if_index == ~0 &&
state > 0)
62 || (src_sw_if_index == dst_sw_if_index))
63 return VNET_API_ERROR_INVALID_INTERFACE;
87 if (enable_rx || disable_rx)
89 src_sw_if_index, rx, 0, 0);
90 if (enable_tx || disable_tx)
92 src_sw_if_index, tx, 0, 0);
95 if (enable_rx || disable_rx)
97 if (enable_tx || disable_tx)
101 return VNET_API_ERROR_UNIMPLEMENTED;
133 u32 src_sw_if_index = ~0;
134 u32 dst_sw_if_index = ~0;
161 if (
rv == VNET_API_ERROR_INVALID_INTERFACE)
168 .path =
"set interface span",
169 .short_help =
"set interface span <if-name> [l2] {disable | destination <if-name> [both|rx|tx]}",
183 static const char *states[] = {
224 states[device], states[l2]);
239 .path =
"show interface span",
240 .short_help =
"Shows SPAN mirror table",
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
static clib_error_t * show_interfaces_span_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_error_return(e, args...)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vl_api_dhcp_client_state_t state
static uword clib_bitmap_get(uword *ai, uword i)
Gets the ith bit value from a bitmap.
static_always_inline u32 span_dst_set(span_mirror_t *sm, u32 dst_sw_if_index, int enable)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static uword clib_bitmap_count_set_bits(uword *ai)
Return the number of set bits in a bitmap.
static vlib_cli_command_t set_interface_span_command
(constructor) VLIB_CLI_COMMAND (set_interface_span_command)
#define vec_validate_aligned(V, I, A)
Make sure vector is long enough for given index (no header, specified alignment)
clib_bitmap_t * mirror_ports
#define static_always_inline
#define clib_bitmap_free(v)
Free a bitmap.
static heap_elt_t * last(heap_header_t *h)
#define VLIB_CLI_COMMAND(x,...)
static uword * clib_bitmap_set(uword *ai, uword i, uword value)
Sets the ith bit of a bitmap to new_value Removes trailing zeros from the bitmap.
#define CLIB_CACHE_LINE_BYTES
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static vlib_cli_command_t show_interfaces_span_command
(constructor) VLIB_CLI_COMMAND (show_interfaces_span_command)
#define vec_free(V)
Free vector's memory (no header).
void l2output_intf_bitmap_enable(u32 sw_if_index, l2output_feat_masks_t feature_bitmap, u32 enable)
Enable (or disable) the feature in the bitmap for the given interface.
format_function_t format_vnet_sw_if_index_name
unformat_function_t unformat_vnet_sw_interface
description fragment has unexpected format
static uword unformat_span_state(unformat_input_t *input, va_list *args)
int span_add_delete_entry(vlib_main_t *vm, u32 src_sw_if_index, u32 dst_sw_if_index, u8 state, span_feat_t sf)
#define vec_foreach(var, vec)
Vector iterator.
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)
static clib_error_t * set_interface_span_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_bitmap_zero(v)
Clear a bitmap.
#define clib_bitmap_foreach(i, ai)
Macro to iterate across set bits in a bitmap.
span_interface_t * interfaces
static uword * clib_bitmap_dup_or(uword *ai, uword *bi)
Logical operator across two bitmaps which duplicates the first bitmap.