mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
MINOR: mux-h2: report the mbuf's head and tail in "show fd"
It's useful to know how the mbuf spans over the whole area and to have access to the first and last ones, so let's dump just this.
This commit is contained in:
parent
bcc4595e57
commit
60f62682b1
@ -5620,7 +5620,7 @@ static void h2_show_fd(struct buffer *msg, struct connection *conn)
|
||||
int send_cnt = 0;
|
||||
int tree_cnt = 0;
|
||||
int orph_cnt = 0;
|
||||
struct buffer *tmbuf;
|
||||
struct buffer *hmbuf, *tmbuf;
|
||||
|
||||
if (!h2c)
|
||||
return;
|
||||
@ -5641,16 +5641,21 @@ static void h2_show_fd(struct buffer *msg, struct connection *conn)
|
||||
node = eb32_next(node);
|
||||
}
|
||||
|
||||
hmbuf = br_head(h2c->mbuf);
|
||||
tmbuf = br_tail(h2c->mbuf);
|
||||
chunk_appendf(msg, " h2c.st0=%d .err=%d .maxid=%d .lastid=%d .flg=0x%04x"
|
||||
" .nbst=%u .nbcs=%u .fctl_cnt=%d .send_cnt=%d .tree_cnt=%d"
|
||||
" .orph_cnt=%d .sub=%d .dsi=%d .dbuf=%u@%p+%u/%u .msi=%d .mbuf=%u@%p+%u/%u",
|
||||
" .orph_cnt=%d .sub=%d .dsi=%d .dbuf=%u@%p+%u/%u .msi=%d"
|
||||
" .mbuf=[%u..%u|%u],h=[%u@%p+%u/%u],t=[%u@%p+%u/%u]",
|
||||
h2c->st0, h2c->errcode, h2c->max_id, h2c->last_sid, h2c->flags,
|
||||
h2c->nb_streams, h2c->nb_cs, fctl_cnt, send_cnt, tree_cnt, orph_cnt,
|
||||
h2c->wait_event.events, h2c->dsi,
|
||||
(unsigned int)b_data(&h2c->dbuf), b_orig(&h2c->dbuf),
|
||||
(unsigned int)b_head_ofs(&h2c->dbuf), (unsigned int)b_size(&h2c->dbuf),
|
||||
h2c->msi,
|
||||
br_head_idx(h2c->mbuf), br_tail_idx(h2c->mbuf), br_size(h2c->mbuf),
|
||||
(unsigned int)b_data(hmbuf), b_orig(hmbuf),
|
||||
(unsigned int)b_head_ofs(hmbuf), (unsigned int)b_size(hmbuf),
|
||||
(unsigned int)b_data(tmbuf), b_orig(tmbuf),
|
||||
(unsigned int)b_head_ofs(tmbuf), (unsigned int)b_size(tmbuf));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user