diff options
author | Damjan Marion <damarion@cisco.com> | 2020-12-13 21:47:40 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-12-14 12:14:21 +0000 |
commit | b2c31b685fd2cf28436ca32bc93e23eb24c74878 (patch) | |
tree | dc0a1b1ff784445b2cbb0f9b2c07b5bcb4f5a5d0 /src/vnet/srv6 | |
parent | 62c25abaa3e93be5815172d391295a6ab0390122 (diff) |
misc: move to new pool_foreach macros
Type: refactor
Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/srv6')
-rw-r--r-- | src/vnet/srv6/sr_api.c | 24 | ||||
-rw-r--r-- | src/vnet/srv6/sr_localsid.c | 10 | ||||
-rw-r--r-- | src/vnet/srv6/sr_policy_rewrite.c | 12 | ||||
-rw-r--r-- | src/vnet/srv6/sr_steering.c | 2 |
4 files changed, 24 insertions, 24 deletions
diff --git a/src/vnet/srv6/sr_api.c b/src/vnet/srv6/sr_api.c index 278111f1dfc..cb468b97ef5 100644 --- a/src/vnet/srv6/sr_api.c +++ b/src/vnet/srv6/sr_api.c @@ -273,10 +273,10 @@ static void vl_api_sr_localsids_dump_t_handler return; /* *INDENT-OFF* */ - pool_foreach (t, sm->localsids, - ({ + pool_foreach (t, sm->localsids) + { send_sr_localsid_details(t, reg, mp->context); - })); + } /* *INDENT-ON* */ } @@ -338,10 +338,10 @@ vl_api_sr_policies_dump_t_handler (vl_api_sr_policies_dump_t * mp) return; /* *INDENT-OFF* */ - pool_foreach (t, sm->sr_policies, - ({ + pool_foreach (t, sm->sr_policies) + { send_sr_policies_details(t, reg, mp->context); - })); + } /* *INDENT-ON* */ } @@ -406,10 +406,10 @@ static void return; /* *INDENT-OFF* */ - pool_foreach (t, sm->sr_policies, - ({ + pool_foreach (t, sm->sr_policies) + { send_sr_policies_details_with_sl_index(t, reg, mp->context); - })); + } /* *INDENT-ON* */ } @@ -453,10 +453,10 @@ static void vl_api_sr_steering_pol_dump_t_handler return; /* *INDENT-OFF* */ - pool_foreach (t, sm->steer_policies, - ({ + pool_foreach (t, sm->steer_policies) + { send_sr_steering_pol_details(t, reg, mp->context); - })); + } /* *INDENT-ON* */ } diff --git a/src/vnet/srv6/sr_localsid.c b/src/vnet/srv6/sr_localsid.c index f632415c091..93619071ca3 100644 --- a/src/vnet/srv6/sr_localsid.c +++ b/src/vnet/srv6/sr_localsid.c @@ -397,10 +397,10 @@ sr_cli_localsid_command_fn (vlib_main_t * vm, unformat_input_t * input, /* Create a vector out of the plugin pool as recommended */ /* *INDENT-OFF* */ - pool_foreach (plugin, sm->plugin_functions, + pool_foreach (plugin, sm->plugin_functions) { vec_add1 (vec_plugins, plugin); - }); + } /* *INDENT-ON* */ vec_foreach (plugin_it, vec_plugins) @@ -552,7 +552,7 @@ show_sr_localsid_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, "SRv6 - My LocalSID Table:"); vlib_cli_output (vm, "========================="); /* *INDENT-OFF* */ - pool_foreach (ls, sm->localsids, ({ vec_add1 (localsid_list, ls); })); + pool_foreach (ls, sm->localsids) { vec_add1 (localsid_list, ls); } /* *INDENT-ON* */ for (i = 0; i < vec_len (localsid_list); i++) { @@ -2407,8 +2407,8 @@ show_sr_localsid_behaviors_command_fn (vlib_main_t * vm, "SR LocalSIDs behaviors:\n-----------------------\n\n"); /* *INDENT-OFF* */ - pool_foreach (plugin, sm->plugin_functions, - ({ vec_add1 (plugins_vec, plugin); })); + pool_foreach (plugin, sm->plugin_functions) + { vec_add1 (plugins_vec, plugin); } /* *INDENT-ON* */ /* Print static behaviors */ diff --git a/src/vnet/srv6/sr_policy_rewrite.c b/src/vnet/srv6/sr_policy_rewrite.c index a0b151decdd..3e8a4e4a9c5 100644 --- a/src/vnet/srv6/sr_policy_rewrite.c +++ b/src/vnet/srv6/sr_policy_rewrite.c @@ -979,10 +979,10 @@ sr_policy_command_fn (vlib_main_t * vm, unformat_input_t * input, sr_policy_fn_registration_t **plugin_it = 0; /* *INDENT-OFF* */ - pool_foreach (plugin, sm->policy_plugin_functions, + pool_foreach (plugin, sm->policy_plugin_functions) { vec_add1 (vec_plugins, plugin); - }); + } /* *INDENT-ON* */ vec_foreach (plugin_it, vec_plugins) @@ -1121,8 +1121,8 @@ show_sr_policies_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, "SR policies:"); /* *INDENT-OFF* */ - pool_foreach (sr_policy, sm->sr_policies, - {vec_add1 (vec_policies, sr_policy); } ); + pool_foreach (sr_policy, sm->sr_policies) + {vec_add1 (vec_policies, sr_policy); } /* *INDENT-ON* */ vec_foreach_index (i, vec_policies) @@ -3411,8 +3411,8 @@ show_sr_policy_behaviors_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "SR Policy behaviors:\n-----------------------\n\n"); /* *INDENT-OFF* */ - pool_foreach (plugin, sm->policy_plugin_functions, - ({ vec_add1 (plugins_vec, plugin); })); + pool_foreach (plugin, sm->policy_plugin_functions) + { vec_add1 (plugins_vec, plugin); } /* *INDENT-ON* */ vlib_cli_output (vm, "Plugin behaviors:\n"); diff --git a/src/vnet/srv6/sr_steering.c b/src/vnet/srv6/sr_steering.c index aa98a45d3da..9db13900f97 100644 --- a/src/vnet/srv6/sr_steering.c +++ b/src/vnet/srv6/sr_steering.c @@ -492,7 +492,7 @@ show_sr_steering_policies_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "SR steering policies:"); /* *INDENT-OFF* */ - pool_foreach (steer_pl, sm->steer_policies, ({vec_add1(steer_policies, steer_pl);})); + pool_foreach (steer_pl, sm->steer_policies) {vec_add1(steer_policies, steer_pl);} /* *INDENT-ON* */ vlib_cli_output (vm, "Traffic\t\tSR policy BSID"); for (i = 0; i < vec_len (steer_policies); i++) |