mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 15:21:29 +02:00
MINOR: h3: flag demux as full on HTX full
Flag QCS if HTX buffer is full on demux. This will block all future operations on QCS demux and should limit unnecessary decode_qcs() calls. The flag is cleared on rcv_buf operation called by conn-stream.
This commit is contained in:
parent
b5454d42df
commit
73d6ffe832
12
src/h3.c
12
src/h3.c
@ -235,13 +235,21 @@ static int h3_data_to_htx(struct qcs *qcs, struct ncbuf *buf, uint64_t len,
|
|||||||
if (head + len > ncb_wrap(buf)) {
|
if (head + len > ncb_wrap(buf)) {
|
||||||
size_t contig = ncb_wrap(buf) - head;
|
size_t contig = ncb_wrap(buf) - head;
|
||||||
htx_sent = htx_add_data(htx, ist2(ncb_head(buf), contig));
|
htx_sent = htx_add_data(htx, ist2(ncb_head(buf), contig));
|
||||||
head = ncb_orig(buf);
|
if (htx_sent < contig) {
|
||||||
|
qcs->flags |= QC_SF_DEM_FULL;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
len -= contig;
|
len -= contig;
|
||||||
|
head = ncb_orig(buf);
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
|
||||||
htx_sent += htx_add_data(htx, ist2(head, len));
|
htx_sent += htx_add_data(htx, ist2(head, len));
|
||||||
BUG_ON(htx_sent < len);
|
if (htx_sent < len) {
|
||||||
|
qcs->flags |= QC_SF_DEM_FULL;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (fin && len == htx_sent)
|
if (fin && len == htx_sent)
|
||||||
htx->flags |= HTX_FL_EOM;
|
htx->flags |= HTX_FL_EOM;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user