ip6_sr_policy_t *sr_policy = 0;
uword *p = 0;
- memset (&key, 0, sizeof (sr_steering_key_t));
+ clib_memset (&key, 0, sizeof (sr_steering_key_t));
/* Compute the steer policy key */
if (traffic_type == SR_STEER_IPV4 || traffic_type == SR_STEER_IPV6)
/* Create a new steering policy */
pool_get (sm->steer_policies, steer_pl);
- memset (steer_pl, 0, sizeof (*steer_pl));
+ clib_memset (steer_pl, 0, sizeof (*steer_pl));
if (traffic_type == SR_STEER_IPV4 || traffic_type == SR_STEER_IPV6)
{
- clib_memcpy (&steer_pl->classify.l3.prefix, prefix,
- sizeof (ip46_address_t));
+ clib_memcpy_fast (&steer_pl->classify.l3.prefix, prefix,
+ sizeof (ip46_address_t));
steer_pl->classify.l3.mask_width = mask_width;
steer_pl->classify.l3.fib_table =
(table_id != (u32) ~ 0 ? table_id : 0);
u8 sr_policy_set = 0;
- memset (&prefix, 0, sizeof (ip46_address_t));
+ clib_memset (&prefix, 0, sizeof (ip46_address_t));
int rv;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
&sw_if_index))
traffic_type = SR_STEER_L2;
else if (!sr_policy_set
- && unformat (input, "via sr policy index %d",
- &sr_policy_index))
+ && unformat (input, "via index %d", &sr_policy_index))
sr_policy_set = 1;
else if (!sr_policy_set
- && unformat (input, "via sr policy bsid %U",
+ && unformat (input, "via bsid %U",
unformat_ip6_address, &bsid))
sr_policy_set = 1;
else if (fib_table == (u32) ~ 0
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (sr_steer_policy_command, static) = {
.path = "sr steer",
- .short_help = "sr steer (del) [l3 <ip_addr/mask>|l2 <sf_if>]"
- "via sr policy [index <sr_policy_index>|bsid <bsid_ip6_addr>]"
+ .short_help = "sr steer (del) [l3 <ip_addr/mask>|l2 <sf_if>] "
+ "via [index <sr_policy_index>|bsid <bsid_ip6_addr>] "
"(fib-table <fib_table_index>)",
.long_help =
"\tSteer a L2 or L3 traffic through an existing SR policy.\n"
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_sr_steering_policies_command, static) = {
- .path = "show sr steering policies",
- .short_help = "show sr steering policies",
+ .path = "show sr steering-policies",
+ .short_help = "show sr steering-policies",
.function = show_sr_steering_policies_command_fn,
};
/* *INDENT-ON* */