35 ioam_e2e_option_t * e2e = (ioam_e2e_option_t *)opt;
40 seqno = clib_net_to_host_u32 (e2e->e2e_hdr.e2e_data);
43 s =
format (s,
"SeqNo = 0x%Lx", seqno);
87 ioam_e2e_option_t *e2e_option;
89 if (rewrite_string && *rewrite_size ==
sizeof(ioam_e2e_option_t))
91 e2e_option = (ioam_e2e_option_t *)rewrite_string;
94 e2e_option->hdr.length =
sizeof (ioam_e2e_option_t) -
122 if (data && (data->
flow_ctx == ctx))
142 s =
format(0,
"IOAM E2E information: \n");
162 .path =
"show ioam e2e ",
163 .short_help =
"show ioam e2e information",
188 "HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE for rewrite failed"));
192 sizeof(ioam_e2e_option_t),
196 "HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE for rewrite failed"));
203 "HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE Flow handler failed"));
sll srl srl sll sra u16x4 i
int ioam_seqno_encap_handler(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt)
vnet_main_t * vnet_get_main(void)
int ip6_hbh_register_option(u8 option, int options(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt), u8 *trace(u8 *s, ip6_hop_by_hop_option_t *opt))
int ioam_seqno_decap_handler(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt)
void ioam_seqno_init_data(ioam_seqno_data *data)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
int ip6_hbh_flow_handler_register(u8 option, u32 ioam_flow_handler(u32 flow_ctx, u8 add))
int ip6_hbh_pop_unregister_option(u8 option)
static u8 * ioam_e2e_trace_handler(u8 *s, ip6_hop_by_hop_option_t *opt)
#define VLIB_INIT_FUNCTION(x)
#define HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE
int ip6_hbh_pop_register_option(u8 option, int options(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt))
#define clib_error_create(args...)
#define vlib_call_init_function(vm, x)
int ip6_hbh_unregister_option(u8 option)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static clib_error_t * ioam_e2e_init(vlib_main_t *vm)
The fine-grained event logger allows lightweight, thread-safe event logging at minimum cost...
u32 ioam_e2e_flow_handler(u32 ctx, u8 add)
int ip6_hbh_config_handler_register(u8 option, int config_handler(void *data, u8 disable))
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
ioam_seqno_data seqno_data
ioam_e2e_main_t ioam_e2e_main
#define VLIB_CLI_COMMAND(x,...)
#define pool_put_index(p, i)
Free pool element with given index.
u8 * show_ioam_seqno_cmd_fn(u8 *s, ioam_seqno_data *seqno_data, u8 enc)
u8 * get_flow_name_from_flow_ctx(u32 flow_ctx)
int ioam_e2e_config_handler(void *data, u8 disable)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static clib_error_t * ip6_hop_by_hop_ioam_init(vlib_main_t *vm)
static clib_error_t * ioam_show_e2e_cmd_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
ioam_e2e_data_t * e2e_data
int ioam_e2e_rewrite_handler(u8 *rewrite_string, u8 *rewrite_size)
#define HBH_OPTION_TYPE_SKIP_UNKNOWN
#define IOAM_DEAP_ENABLED(opaque_data)
int ip6_hbh_add_register_option(u8 option, u8 size, int rewrite_options(u8 *rewrite_string, u8 *rewrite_size))
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)