mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-16 08:24:42 +00:00
MINOR: mux-quic: support MAX_DATA frame parsing
This commit is similar to the previous one but with MAX_DATA frames. This allows to increase the connection level flow-control limit. If the connection was blocked due to QC_CF_BLK_MFCTL flag, the flag is reseted.
This commit is contained in:
parent
8727ff4668
commit
1e5e5136ee
@ -22,6 +22,7 @@ void qcs_notify_send(struct qcs *qcs);
|
|||||||
|
|
||||||
int qcc_recv(struct qcc *qcc, uint64_t id, uint64_t len, uint64_t offset,
|
int qcc_recv(struct qcc *qcc, uint64_t id, uint64_t len, uint64_t offset,
|
||||||
char fin, char *data, struct qcs **out_qcs);
|
char fin, char *data, struct qcs **out_qcs);
|
||||||
|
int qcc_recv_max_data(struct qcc *qcc, uint64_t max);
|
||||||
int qcc_recv_max_stream_data(struct qcc *qcc, uint64_t id, uint64_t max);
|
int qcc_recv_max_stream_data(struct qcc *qcc, uint64_t id, uint64_t max);
|
||||||
int qcc_decode_qcs(struct qcc *qcc, struct qcs *qcs);
|
int qcc_decode_qcs(struct qcc *qcc, struct qcs *qcs);
|
||||||
void qcc_streams_sent_done(struct qcs *qcs, uint64_t data, uint64_t offset);
|
void qcc_streams_sent_done(struct qcs *qcs, uint64_t data, uint64_t offset);
|
||||||
|
@ -253,6 +253,24 @@ int qcc_recv(struct qcc *qcc, uint64_t id, uint64_t len, uint64_t offset,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handle a new MAX_DATA frame. <max> must contains the maximum data field of
|
||||||
|
* the frame.
|
||||||
|
*
|
||||||
|
* Returns 0 on success else non-zero.
|
||||||
|
*/
|
||||||
|
int qcc_recv_max_data(struct qcc *qcc, uint64_t max)
|
||||||
|
{
|
||||||
|
if (qcc->rfctl.md < max) {
|
||||||
|
qcc->rfctl.md = max;
|
||||||
|
|
||||||
|
if (qcc->flags & QC_CF_BLK_MFCTL) {
|
||||||
|
qcc->flags &= ~QC_CF_BLK_MFCTL;
|
||||||
|
tasklet_wakeup(qcc->wait_event.tasklet);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Handle a new MAX_STREAM_DATA frame. <max> must contains the maximum data
|
/* Handle a new MAX_STREAM_DATA frame. <max> must contains the maximum data
|
||||||
* field of the frame and <id> is the identifier of the QUIC stream.
|
* field of the frame and <id> is the identifier of the QUIC stream.
|
||||||
*
|
*
|
||||||
|
@ -2455,6 +2455,11 @@ static int qc_parse_pkt_frms(struct quic_rx_packet *pkt, struct ssl_sock_ctx *ct
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case QUIC_FT_MAX_DATA:
|
case QUIC_FT_MAX_DATA:
|
||||||
|
if (qc->mux_state == QC_MUX_READY) {
|
||||||
|
struct quic_max_data *data = &frm.max_data;
|
||||||
|
qcc_recv_max_data(qc->qcc, data->max_data);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case QUIC_FT_MAX_STREAM_DATA:
|
case QUIC_FT_MAX_STREAM_DATA:
|
||||||
if (qc->mux_state == QC_MUX_READY) {
|
if (qc->mux_state == QC_MUX_READY) {
|
||||||
struct quic_max_stream_data *data = &frm.max_stream_data;
|
struct quic_max_stream_data *data = &frm.max_stream_data;
|
||||||
|
Loading…
Reference in New Issue
Block a user