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:
Amaury Denoyelle 2022-05-16 13:54:31 +02:00
parent b5454d42df
commit 73d6ffe832

View File

@ -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)) {
size_t contig = ncb_wrap(buf) - head;
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;
head = ncb_orig(buf);
goto retry;
}
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)
htx->flags |= HTX_FL_EOM;