X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fvnet%2Fsrv6%2Fsr_steering.c;h=a888fea9fdabdc8a550675680e9f348ecb8cc3d3;hb=refs%2Fchanges%2F57%2F13057%2F2;hp=704adaa78f4aca50074b3f9f2c69361ae0346cf7;hpb=da78f957e46c686434149d332a477d7ea055d76a;p=vpp.git diff --git a/src/vnet/srv6/sr_steering.c b/src/vnet/srv6/sr_steering.c index 704adaa78f4..a888fea9fda 100755 --- a/src/vnet/srv6/sr_steering.c +++ b/src/vnet/srv6/sr_steering.c @@ -159,13 +159,15 @@ sr_steering_policy (int is_del, ip6_address_t * bsid, u32 sr_policy_index, /* If no more SR policies or steering policies */ if (!pool_elts (sm->sr_policies) && !pool_elts (sm->steer_policies)) { - fib_table_unlock (sm->fib_table_ip6, FIB_PROTOCOL_IP6); - fib_table_unlock (sm->fib_table_ip4, FIB_PROTOCOL_IP6); + fib_table_unlock (sm->fib_table_ip6, + FIB_PROTOCOL_IP6, FIB_SOURCE_SR); + fib_table_unlock (sm->fib_table_ip4, + FIB_PROTOCOL_IP6, FIB_SOURCE_SR); sm->fib_table_ip6 = (u32) ~ 0; sm->fib_table_ip4 = (u32) ~ 0; } - return 1; + return 0; } else /* It means user requested to update an existing SR steering policy */ { @@ -397,11 +399,10 @@ sr_steer_policy_command_fn (vlib_main_t * vm, unformat_input_t * 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 @@ -463,8 +464,8 @@ sr_steer_policy_command_fn (vlib_main_t * vm, unformat_input_t * input, /* *INDENT-OFF* */ VLIB_CLI_COMMAND (sr_steer_policy_command, static) = { .path = "sr steer", - .short_help = "sr steer (del) [l3 |l2 ]" - "via sr policy [index |bsid ]" + .short_help = "sr steer (del) [l3 |l2 ] " + "via [index |bsid ] " "(fib-table )", .long_help = "\tSteer a L2 or L3 traffic through an existing SR policy.\n" @@ -529,8 +530,8 @@ show_sr_steering_policies_command_fn (vlib_main_t * vm, /* *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* */