From 3f39b40fe0086e6c4464ec9db6b84a6ba97b350e Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 1 Jul 2022 16:11:03 +0200 Subject: [PATCH] MINOR: mux-quic: rename qcs flag FIN_RECV to SIZE_KNOWN Rename QC_SF_FIN_RECV to the more generic name QC_SF_SIZE_KNOWN. This better align with the QUIC RFC 9000 which uses the "Size Known" state definition. This change is purely cosmetic. --- include/haproxy/mux_quic-t.h | 2 +- src/mux_quic.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/haproxy/mux_quic-t.h b/include/haproxy/mux_quic-t.h index 168f07444..a2004a49c 100644 --- a/include/haproxy/mux_quic-t.h +++ b/include/haproxy/mux_quic-t.h @@ -100,7 +100,7 @@ struct qcc { }; #define QC_SF_NONE 0x00000000 -#define QC_SF_FIN_RECV 0x00000001 /* last frame received for this stream */ +#define QC_SF_SIZE_KNOWN 0x00000001 /* last frame received for this stream */ #define QC_SF_FIN_STREAM 0x00000002 /* FIN bit must be set for last frame of the stream */ #define QC_SF_BLK_MROOM 0x00000004 /* app layer is blocked waiting for room in the qcs.tx.buf */ #define QC_SF_DETACH 0x00000008 /* sc is detached but there is remaining data to send */ diff --git a/src/mux_quic.c b/src/mux_quic.c index 24c7373ba..ccdcf54c6 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -541,7 +541,7 @@ static int qcc_decode_qcs(struct qcc *qcc, struct qcs *qcs) /* Signal FIN to application if STREAM FIN received and there is no gap * in the Rx buffer. */ - if (qcs->flags & QC_SF_FIN_RECV && !ncb_is_fragmented(&qcs->rx.ncbuf)) + if (qcs->flags & QC_SF_SIZE_KNOWN && !ncb_is_fragmented(&qcs->rx.ncbuf)) fin = 1; ret = qcc->app_ops->decode_qcs(qcs, &b, fin); @@ -672,7 +672,7 @@ int qcc_recv(struct qcc *qcc, uint64_t id, uint64_t len, uint64_t offset, } if (fin) - qcs->flags |= QC_SF_FIN_RECV; + qcs->flags |= QC_SF_SIZE_KNOWN; if (ncb_data(&qcs->rx.ncbuf, 0) && !(qcs->flags & QC_SF_DEM_FULL)) qcc_decode_qcs(qcc, qcs);