})
/* Manipulation of extra_counters, for boot-time registrable modules */
+/* retrieve the base storage of extra counters (first tgroup if any) */
+#define EXTRA_COUNTERS_BASE(counters, mod) \
+ (likely(counters) ? \
+ ((void *)(*(counters)->datap + (mod)->counters_off[(counters)->type])) : \
+ (trash_counters))
+
#define EXTRA_COUNTERS_GET(counters, mod) \
(likely(counters) ? \
((void *)(*(counters)->datap + (mod)->counters_off[(counters)->type])) : \
if (!ctr)
goto store_metric;
- counters = EXTRA_COUNTERS_GET(ctr, mod);
+ counters = EXTRA_COUNTERS_BASE(ctr, mod);
switch (current_field) {
/* h3 frame type counters */
if (!ctr)
goto store_metric;
- counters = EXTRA_COUNTERS_GET(ctr, mod);
+ counters = EXTRA_COUNTERS_BASE(ctr, mod);
switch (current_field) {
case H1_ST_OPEN_CONN:
if (!ctr)
goto store_metric;
- counters = EXTRA_COUNTERS_GET(ctr, mod);
+ counters = EXTRA_COUNTERS_BASE(ctr, mod);
switch (current_field) {
case H2_ST_HEADERS_RCVD:
if (!ctr)
goto store_metric;
- counters = EXTRA_COUNTERS_GET(ctr, mod);
+ counters = EXTRA_COUNTERS_BASE(ctr, mod);
switch (current_field) {
case QUIC_ST_RXBUF_FULL:
if (!ctr)
goto store_metric;
- counters = EXTRA_COUNTERS_GET(ctr, mod);
+ counters = EXTRA_COUNTERS_BASE(ctr, mod);
switch (current_field) {
case RSLV_STAT_ID:
if (!ctr)
goto store_metric;
- counters = EXTRA_COUNTERS_GET(ctr, mod);
+ counters = EXTRA_COUNTERS_BASE(ctr, mod);
switch (current_field) {
case SSL_ST_SESS: