versions will simply report no result. The dump format is the same as for the
maps even for the sample values. The data returned are not a list of
available ACL, but are the list of all patterns composing any ACL. Many of
- these patterns can be shared with maps.
+ these patterns can be shared with maps. The 'entry_cnt' value represents the
+ count of all the ACL entries, not just the active ones, which means that it
+ also includes entries currently being added.
show backend
Dump the list of backends available in the running process
version currently being matched against and reported as 'curr_ver' in the map
list). It is possible to instead dump other versions by prepending '@<ver>'
before the map's identifier. The version works as a filter and non-existing
- versions will simply report no result.
+ versions will simply report no result. The 'entry_cnt' value represents the
+ count of all the map entries, not just the active ones, which means that it
+ also includes entries currently being added.
In the output, the first column is a unique entry identifier, which is usable
as a reference for operations "del map" and "set map". The second column is
unsigned int next_gen; /* next generation number (insertions use this one) */
int unique_id; /* Each pattern reference have unique id. */
unsigned long long revision; /* updated for each update */
+ unsigned long long entry_cnt; /* the total number of entries */
__decl_thread(HA_SPINLOCK_T lock); /* Lock used to protect pat ref elements */
};
/* Build messages. If the reference is used by another category than
* the listed categories, display the information in the message.
*/
- chunk_appendf(&trash, "%d (%s) %s. curr_ver=%u next_ver=%u\n", appctx->ctx.map.ref->unique_id,
+ chunk_appendf(&trash, "%d (%s) %s. curr_ver=%u next_ver=%u entry_cnt=%llu\n", appctx->ctx.map.ref->unique_id,
appctx->ctx.map.ref->reference ? appctx->ctx.map.ref->reference : "",
- appctx->ctx.map.ref->display, appctx->ctx.map.ref->curr_gen, appctx->ctx.map.ref->next_gen);
+ appctx->ctx.map.ref->display, appctx->ctx.map.ref->curr_gen, appctx->ctx.map.ref->next_gen,
+ appctx->ctx.map.ref->entry_cnt);
if (ci_putchk(si_ic(si), &trash) == -1) {
/* let's try again later from this stream. We add ourselves into
free_pattern_tree(&expr->pattern_tree_2);
LIST_INIT(&expr->patterns);
expr->ref->revision = rdtsc();
+ expr->ref->entry_cnt = 0;
}
/*
patl->from_ref = pat->ref->list_head;
pat->ref->list_head = &patl->from_ref;
expr->ref->revision = rdtsc();
+ expr->ref->entry_cnt++;
/* that's ok */
return 1;
patl->from_ref = pat->ref->list_head;
pat->ref->list_head = &patl->from_ref;
expr->ref->revision = rdtsc();
+ expr->ref->entry_cnt++;
/* that's ok */
return 1;
patl->from_ref = pat->ref->list_head;
pat->ref->list_head = &patl->from_ref;
expr->ref->revision = rdtsc();
+ expr->ref->entry_cnt++;
/* that's ok */
return 1;
patl->from_ref = pat->ref->list_head;
pat->ref->list_head = &patl->from_ref;
expr->ref->revision = rdtsc();
+ expr->ref->entry_cnt++;
/* that's ok */
return 1;
node->from_ref = pat->ref->tree_head;
pat->ref->tree_head = &node->from_ref;
expr->ref->revision = rdtsc();
+ expr->ref->entry_cnt++;
/* that's ok */
return 1;
node->from_ref = pat->ref->tree_head;
pat->ref->tree_head = &node->from_ref;
expr->ref->revision = rdtsc();
+ expr->ref->entry_cnt++;
/* that's ok */
return 1;
node->from_ref = pat->ref->tree_head;
pat->ref->tree_head = &node->from_ref;
expr->ref->revision = rdtsc();
+ expr->ref->entry_cnt++;
/* that's ok */
return 1;
node->from_ref = pat->ref->tree_head;
pat->ref->tree_head = &node->from_ref;
expr->ref->revision = rdtsc();
+ expr->ref->entry_cnt++;
/* that's ok */
return 1;
/* update revision number to refresh the cache */
ref->revision = rdtsc();
+ ref->entry_cnt--;
elt->tree_head = NULL;
elt->list_head = NULL;
}
ref->flags = flags;
ref->unique_id = -1;
ref->revision = 0;
+ ref->entry_cnt = 0;
LIST_INIT(&ref->head);
LIST_INIT(&ref->pat);