acl: Remove unsued type 95/24195/2
authorNeale Ranns <nranns@cisco.com>
Mon, 6 Jan 2020 02:48:19 +0000 (02:48 +0000)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Mon, 13 Jan 2020 17:13:54 +0000 (17:13 +0000)
Type: style

and add some indent offs.

Change-Id: I31cf3ab9ff9b64d2cd1f2034dcedd4a9c453efb4
Signed-off-by: Neale Ranns <nranns@cisco.com>
src/plugins/acl/acl.c
src/plugins/acl/acl.h

index 04ed693..4f89626 100644 (file)
@@ -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;
index 229ee05..9b276aa 100644 (file)
@@ -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;