mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
MINOR: quic: handle new closing list in show quic
A new global quic-conn list has been added by the previous patch. It will contain every quic-conn in closing or draining state. Thus, it is now easier to include or skip them on a "show quic" output : when the default list on the current thread has been browsed entirely, either we skip to the next thread or we look at the closing list on the current thread. This should be backported up to 2.7.
This commit is contained in:
parent
efed86c973
commit
2d37629222
@ -8183,9 +8183,25 @@ static int cli_io_handler_dump_quic(struct appctx *appctx)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (ctx->bref.ref == &ha_thread_ctx[ctx->thr].quic_conns) {
|
if (ctx->bref.ref == &ha_thread_ctx[ctx->thr].quic_conns) {
|
||||||
|
/* If closing connections requested through "all", move
|
||||||
|
* to quic_conns_clo list after browsing quic_conns.
|
||||||
|
* Else move directly to the next quic_conns thread.
|
||||||
|
*/
|
||||||
|
if (ctx->flags & QC_CLI_FL_SHOW_ALL) {
|
||||||
|
ctx->bref.ref = ha_thread_ctx[ctx->thr].quic_conns_clo.n;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
done = 1;
|
||||||
|
}
|
||||||
|
else if (ctx->bref.ref == &ha_thread_ctx[ctx->thr].quic_conns_clo) {
|
||||||
|
/* Closing list entirely browsed, go to next quic_conns
|
||||||
|
* thread.
|
||||||
|
*/
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
/* Retrieve next element of the current list. */
|
||||||
qc = LIST_ELEM(ctx->bref.ref, struct quic_conn *, el_th_ctx);
|
qc = LIST_ELEM(ctx->bref.ref, struct quic_conn *, el_th_ctx);
|
||||||
if ((int)(qc->qc_epoch - ctx->epoch) > 0)
|
if ((int)(qc->qc_epoch - ctx->epoch) > 0)
|
||||||
done = 1;
|
done = 1;
|
||||||
@ -8195,16 +8211,11 @@ static int cli_io_handler_dump_quic(struct appctx *appctx)
|
|||||||
++ctx->thr;
|
++ctx->thr;
|
||||||
if (ctx->thr >= global.nbthread)
|
if (ctx->thr >= global.nbthread)
|
||||||
break;
|
break;
|
||||||
|
/* Switch to next thread quic_conns list. */
|
||||||
ctx->bref.ref = ha_thread_ctx[ctx->thr].quic_conns.n;
|
ctx->bref.ref = ha_thread_ctx[ctx->thr].quic_conns.n;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(ctx->flags & QC_CLI_FL_SHOW_ALL) &&
|
|
||||||
qc->flags & (QUIC_FL_CONN_CLOSING|QUIC_FL_CONN_DRAINING)) {
|
|
||||||
ctx->bref.ref = qc->el_th_ctx.n;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* CIDs */
|
/* CIDs */
|
||||||
chunk_appendf(&trash, "* %p[%02u]: scid=", qc, qc->tid);
|
chunk_appendf(&trash, "* %p[%02u]: scid=", qc, qc->tid);
|
||||||
for (cid_len = 0; cid_len < qc->scid.len; ++cid_len)
|
for (cid_len = 0; cid_len < qc->scid.len; ++cid_len)
|
||||||
|
Loading…
Reference in New Issue
Block a user