Skip to content

Commit

Permalink
MINOR: mux-quic: add traces for 0-copy/fast-forward
Browse files Browse the repository at this point in the history
Complete qmux traces :
* add a trace when 0-copy is used for DATA transfer
* mark the FIN as detected when using fast forward
  • Loading branch information
a-denoyelle committed Dec 7, 2023
1 parent 3dab4f1 commit b22be39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/h3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1776,6 +1776,9 @@ static int h3_resp_data_send(struct qcs *qcs, struct buffer *buf, size_t count)
htx_nbblks(htx) == 1 && type == HTX_BLK_DATA)) {
void *old_area = res->area;

TRACE_DATA("perform zero-copy DATA transfer", H3_EV_TX_DATA,
qcs->qcc->conn, qcs);

/* map an H2 frame to the HTX block so that we can put the
* frame header there.
*/
Expand Down
4 changes: 3 additions & 1 deletion src/mux_quic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2870,8 +2870,10 @@ static size_t qmux_strm_done_ff(struct stconn *sc)

TRACE_ENTER(QMUX_EV_STRM_SEND, qcs->qcc->conn, qcs);

if (sd->iobuf.flags & IOBUF_FL_EOI)
if (sd->iobuf.flags & IOBUF_FL_EOI) {
TRACE_STATE("reached stream fin", QMUX_EV_STRM_SEND, qcs->qcc->conn, qcs);
qcs->flags |= QC_SF_FIN_STREAM;
}

if (!(qcs->flags & QC_SF_FIN_STREAM) && !sd->iobuf.data)
goto end;
Expand Down

0 comments on commit b22be39

Please sign in to comment.