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.
diff --git a/src/quic_conn.c b/src/quic_conn.c
index 94a7cfa..a771280 100644
--- a/src/quic_conn.c
+++ b/src/quic_conn.c
@@ -7647,6 +7647,8 @@
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 @@
while (1) {
int done = 0;
+ int i;
if (ctx->bref.ref == &ha_thread_ctx[ctx->thr].quic_conns) {
done = 1;
@@ -7765,6 +7768,24 @@
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);