mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
MINOR: quic: old data distinction for qc_send_app_pkt()
Modify qc_send_app_pkt() to distinguish the case where it sends new data against the case where it sends old data during probing retransmissions. We add <old_data> boolean parameter to this function to do so. The mux never directly send old data when probing retransmissions are needed by the connection.
This commit is contained in:
parent
96367158ab
commit
3e3a621447
@ -1246,7 +1246,7 @@ struct task *quic_lstnr_dghdlr(struct task *t, void *ctx, unsigned int state);
|
||||
int quic_lstnr_dgram_dispatch(unsigned char *buf, size_t len, void *owner,
|
||||
struct sockaddr_storage *saddr,
|
||||
struct quic_dgram *new_dgram, struct list *dgrams);
|
||||
int qc_send_app_pkts(struct quic_conn *qc, struct list *frms);
|
||||
int qc_send_app_pkts(struct quic_conn *qc, int old_data, struct list *frms);
|
||||
|
||||
void qc_notify_close(struct quic_conn *qc);
|
||||
|
||||
|
||||
@ -799,7 +799,7 @@ static int qc_send_frames(struct qcc *qcc, struct list *frms)
|
||||
}
|
||||
|
||||
if (!LIST_ISEMPTY(frms))
|
||||
qc_send_app_pkts(qcc->conn->handle.qc, frms);
|
||||
qc_send_app_pkts(qcc->conn->handle.qc, 0, frms);
|
||||
|
||||
/* If there is frames left, check if the transport layer has send some
|
||||
* data or is blocked.
|
||||
|
||||
@ -3763,7 +3763,7 @@ static int qc_qel_may_rm_hp(struct quic_conn *qc, struct quic_enc_level *qel)
|
||||
}
|
||||
|
||||
/* Sends application level packets from <qc> QUIC connection */
|
||||
int qc_send_app_pkts(struct quic_conn *qc, struct list *frms)
|
||||
int qc_send_app_pkts(struct quic_conn *qc, int old_data, struct list *frms)
|
||||
{
|
||||
int ret;
|
||||
struct qring *qr;
|
||||
@ -3773,6 +3773,8 @@ int qc_send_app_pkts(struct quic_conn *qc, struct list *frms)
|
||||
/* Never happens */
|
||||
return 1;
|
||||
|
||||
if (old_data)
|
||||
qc->flags |= QUIC_FL_CONN_RETRANS_OLD_DATA;
|
||||
ret = qc_prep_app_pkts(qc, qr, frms);
|
||||
if (ret == -1)
|
||||
goto err;
|
||||
@ -3783,10 +3785,12 @@ int qc_send_app_pkts(struct quic_conn *qc, struct list *frms)
|
||||
goto err;
|
||||
|
||||
out:
|
||||
qc->flags &= ~QUIC_FL_CONN_RETRANS_OLD_DATA;
|
||||
MT_LIST_APPEND(qc->tx.qring_list, &qr->mt_list);
|
||||
return 1;
|
||||
|
||||
err:
|
||||
qc->flags &= ~QUIC_FL_CONN_RETRANS_OLD_DATA;
|
||||
MT_LIST_APPEND(qc->tx.qring_list, &qr->mt_list);
|
||||
TRACE_DEVEL("leaving in error", QUIC_EV_CONN_IO_CB, qc);
|
||||
return 0;
|
||||
@ -3926,7 +3930,7 @@ static struct task *quic_conn_app_io_cb(struct task *t, void *context, unsigned
|
||||
!(qc->flags & QUIC_FL_CONN_IMMEDIATE_CLOSE))
|
||||
goto out;
|
||||
|
||||
if (!qc_send_app_pkts(qc, &qel->pktns->tx.frms))
|
||||
if (!qc_send_app_pkts(qc, 0, &qel->pktns->tx.frms))
|
||||
goto err;
|
||||
|
||||
out:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user