mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-17 11:06:54 +00:00
MINOR: quic: display Tx stream info on "show quic"
Complete "show quic" handler by displaying information about quic_stream_desc entries. These structures are used to emit stream data and store them until acknowledgment is received. This should be backported up to 2.7.
This commit is contained in:
parent
1b0fc437f3
commit
2eda63b447
@ -7647,6 +7647,8 @@ static int cli_io_handler_dump_quic(struct appctx *appctx)
|
||||
struct stconn *sc = appctx_sc(appctx);
|
||||
struct quic_conn *qc;
|
||||
struct quic_enc_level *qel;
|
||||
struct eb64_node *node;
|
||||
struct qc_stream_desc *stream;
|
||||
char bufaddr[INET6_ADDRSTRLEN], bufport[6];
|
||||
int expire;
|
||||
unsigned char cid_len;
|
||||
@ -7678,6 +7680,7 @@ static int cli_io_handler_dump_quic(struct appctx *appctx)
|
||||
|
||||
while (1) {
|
||||
int done = 0;
|
||||
int i;
|
||||
|
||||
if (ctx->bref.ref == &ha_thread_ctx[ctx->thr].quic_conns) {
|
||||
done = 1;
|
||||
@ -7765,6 +7768,24 @@ static int cli_io_handler_dump_quic(struct appctx *appctx)
|
||||
|
||||
chunk_appendf(&trash, "\n");
|
||||
|
||||
/* Streams */
|
||||
node = eb64_first(&qc->streams_by_id);
|
||||
i = 0;
|
||||
while (node) {
|
||||
stream = eb64_entry(node, struct qc_stream_desc, by_id);
|
||||
node = eb64_next(node);
|
||||
|
||||
chunk_appendf(&trash, " | stream=%-8llu", (long long unsigned int)stream->by_id.key);
|
||||
chunk_appendf(&trash, " off=%-8lu ack=%-8lu", stream->buf_offset, stream->ack_offset);
|
||||
|
||||
if (!(++i % 3)) {
|
||||
chunk_appendf(&trash, "\n");
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
|
||||
chunk_appendf(&trash, "\n");
|
||||
|
||||
if (applet_putchk(appctx, &trash) == -1) {
|
||||
/* Register show_quic_ctx to quic_conn instance. */
|
||||
LIST_APPEND(&qc->back_refs, &ctx->bref.users);
|
||||
|
Loading…
Reference in New Issue
Block a user