summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-01-06 02:48:19 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-01-13 17:13:54 +0000
commitfec52edb3c64ca4c725669ce432120a605a86f6a (patch)
treebc7d1b787e6ecf0fec69a16ffe5f00b720544d17 /src/plugins
parent629e268aa171a8bc03fb93fc995725b78ae64063 (diff)
acl: Remove unsued type
Type: style and add some indent offs. Change-Id: I31cf3ab9ff9b64d2cd1f2034dcedd4a9c453efb4 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/acl/acl.c73
-rw-r--r--src/plugins/acl/acl.h11
2 files changed, 31 insertions, 53 deletions
diff --git a/src/plugins/acl/acl.c b/src/plugins/acl/acl.c
index 04ed693ed72..4f89626e79b 100644
--- a/src/plugins/acl/acl.c
+++ b/src/plugins/acl/acl.c
@@ -2397,13 +2397,11 @@ vl_api_macip_acl_dump_t_handler (vl_api_macip_acl_dump_t * mp)
if (mp->acl_index == ~0)
{
/* Just dump all ACLs for now, with sw_if_index = ~0 */
- pool_foreach (acl, am->macip_acls, (
- {
- send_macip_acl_details (am, reg,
- acl,
- mp->context);
- }
- ));
+ /* *INDENT-OFF* */
+ pool_foreach (acl, am->macip_acls,
+ ({
+ send_macip_acl_details (am, reg, acl, mp->context);
+ }));
/* *INDENT-ON* */
}
else
@@ -3290,41 +3288,32 @@ acl_plugin_show_sessions (acl_main_t * am,
vlib_cli_output (vm, " link list id: %u", sess->link_list_id);
}
vlib_cli_output (vm, " connection add/del stats:", wk);
- pool_foreach (swif, im->sw_interfaces, (
- {
- u32 sw_if_index =
- swif->sw_if_index;
- u64 n_adds =
- sw_if_index <
- vec_len
- (pw->fa_session_adds_by_sw_if_index)
- ?
- pw->fa_session_adds_by_sw_if_index
- [sw_if_index] : 0;
- u64 n_dels =
- sw_if_index <
- vec_len
- (pw->fa_session_dels_by_sw_if_index)
- ?
- pw->fa_session_dels_by_sw_if_index
- [sw_if_index] : 0;
- u64 n_epoch_changes =
- sw_if_index <
- vec_len
- (pw->fa_session_epoch_change_by_sw_if_index)
- ?
- pw->fa_session_epoch_change_by_sw_if_index
- [sw_if_index] : 0;
- vlib_cli_output (vm,
- " sw_if_index %d: add %lu - del %lu = %lu; epoch chg: %lu",
- sw_if_index,
- n_adds,
- n_dels,
- n_adds -
- n_dels,
- n_epoch_changes);
- }
- ));
+ /* *INDENT-OFF* */
+ pool_foreach (swif, im->sw_interfaces,
+ ({
+ u32 sw_if_index = swif->sw_if_index;
+ u64 n_adds =
+ (sw_if_index < vec_len (pw->fa_session_adds_by_sw_if_index) ?
+ pw->fa_session_adds_by_sw_if_index[sw_if_index] :
+ 0);
+ u64 n_dels =
+ (sw_if_index < vec_len (pw->fa_session_dels_by_sw_if_index) ?
+ pw->fa_session_dels_by_sw_if_index[sw_if_index] :
+ 0);
+ u64 n_epoch_changes =
+ (sw_if_index < vec_len (pw->fa_session_epoch_change_by_sw_if_index) ?
+ pw->fa_session_epoch_change_by_sw_if_index[sw_if_index] :
+ 0);
+ vlib_cli_output (vm,
+ " sw_if_index %d: add %lu - del %lu = %lu; epoch chg: %lu",
+ sw_if_index,
+ n_adds,
+ n_dels,
+ n_adds -
+ n_dels,
+ n_epoch_changes);
+ }));
+ /* *INDENT-ON* */
vlib_cli_output (vm, " connection timeout type lists:", wk);
u8 tt = 0;
diff --git a/src/plugins/acl/acl.h b/src/plugins/acl/acl.h
index 229ee057725..9b276aada5f 100644
--- a/src/plugins/acl/acl.h
+++ b/src/plugins/acl/acl.h
@@ -63,17 +63,6 @@ enum acl_timeout_e {
ACL_N_TIMEOUTS
};
-
-enum address_e { IP4, IP6 };
-typedef struct
-{
- enum address_e type;
- union {
- ip6_address_t ip6;
- ip4_address_t ip4;
- } addr;
-} address_t;
-
typedef struct
{
u8 is_permit;