diff options
Diffstat (limited to 'src/plugins/acl/hash_lookup.c')
-rw-r--r-- | src/plugins/acl/hash_lookup.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/plugins/acl/hash_lookup.c b/src/plugins/acl/hash_lookup.c index 85b54b3e8ac..9c3c662a8f1 100644 --- a/src/plugins/acl/hash_lookup.c +++ b/src/plugins/acl/hash_lookup.c @@ -261,13 +261,11 @@ static u32 find_mask_type_index(acl_main_t *am, fa_5tuple_t *mask) { ace_mask_type_entry_t *mte; - /* *INDENT-OFF* */ pool_foreach (mte, am->ace_mask_type_pool) { if(memcmp(&mte->mask, mask, sizeof(*mask)) == 0) return (mte - am->ace_mask_type_pool); } - /* *INDENT-ON* */ return ~0; } @@ -682,7 +680,7 @@ hash_acl_apply(acl_main_t *am, u32 lc_index, int acl_index, u32 acl_position) if (vec_len(ha->rules) > 0) { int old_vec_len = vec_len(*applied_hash_aces); vec_validate((*applied_hash_aces), old_vec_len + vec_len(ha->rules) - 1); - _vec_len((*applied_hash_aces)) = old_vec_len; + vec_set_len ((*applied_hash_aces), old_vec_len); } /* add the rules from the ACL to the hash table for lookup and append to the vector*/ @@ -903,7 +901,7 @@ hash_acl_unapply(acl_main_t *am, u32 lc_index, int acl_index) move_applied_ace_hash_entry(am, lc_index, applied_hash_aces, tail_offset + i, base_offset + i); } /* trim the end of the vector */ - _vec_len((*applied_hash_aces)) -= vec_len(ha->rules); + vec_dec_len ((*applied_hash_aces), vec_len (ha->rules)); remake_hash_applied_mask_info_vec(am, applied_hash_aces, lc_index); @@ -1159,7 +1157,6 @@ acl_plugin_show_tables_mask_type (void) ace_mask_type_entry_t *mte; vlib_cli_output (vm, "Mask-type entries:"); - /* *INDENT-OFF* */ pool_foreach (mte, am->ace_mask_type_pool) { vlib_cli_output(vm, " %3d: %016llx %016llx %016llx %016llx %016llx %016llx refcount %d", @@ -1167,7 +1164,6 @@ acl_plugin_show_tables_mask_type (void) mte->mask.kv_40_8.key[0], mte->mask.kv_40_8.key[1], mte->mask.kv_40_8.key[2], mte->mask.kv_40_8.key[3], mte->mask.kv_40_8.key[4], mte->mask.kv_40_8.value, mte->refcount); } - /* *INDENT-ON* */ } void |