CLEANUP: mux-quic: remove usage of non-standard ull type

ull is a typedef to unsigned long long. It is only defined in
xprt_quic-t.h. Its usage should be limited over time to reduce xprt_quic
dependency over the whole code. It can be replaced by ullong typedef
from compat.h.

For the moment, ull references have been replaced in qmux_trace module.
They were only used for printf format and has been replaced by the true
variable type.

This change is useful to reduce dependencies on xprt_quic in other
files.

This should be backported up to 2.6.

(cherry picked from commit d6922d5471)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
This commit is contained in:
Amaury Denoyelle 2022-09-30 18:03:03 +02:00 committed by Christopher Faulet
parent e8da4211a9
commit e53c5615da

View File

@ -43,13 +43,13 @@ static void qmux_trace_frm(const struct quic_frame *frm)
{
switch (frm->type) {
case QUIC_FT_MAX_STREAMS_BIDI:
chunk_appendf(&trace_buf, " max_streams=%llu",
(ull)frm->max_streams_bidi.max_streams);
chunk_appendf(&trace_buf, " max_streams=%lu",
frm->max_streams_bidi.max_streams);
break;
case QUIC_FT_MAX_STREAMS_UNI:
chunk_appendf(&trace_buf, " max_streams=%llu",
(ull)frm->max_streams_uni.max_streams);
chunk_appendf(&trace_buf, " max_streams=%lu",
frm->max_streams_uni.max_streams);
break;
default:
@ -76,13 +76,13 @@ static void qmux_trace(enum trace_level level, uint64_t mask,
chunk_appendf(&trace_buf, " qc=%p", qcc->conn->handle.qc);
if (qcs)
chunk_appendf(&trace_buf, " qcs=%p .id=%llu .st=%s",
qcs, (ull)qcs->id,
chunk_appendf(&trace_buf, " qcs=%p .id=%lu .st=%s",
qcs, qcs->id,
qcs_st_to_str(qcs->st));
if (mask & QMUX_EV_QCC_NQCS) {
const uint64_t *id = a3;
chunk_appendf(&trace_buf, " id=%llu", (ull)*id);
chunk_appendf(&trace_buf, " id=%lu", *id);
}
if (mask & QMUX_EV_SEND_FRM)
@ -90,14 +90,14 @@ static void qmux_trace(enum trace_level level, uint64_t mask,
if (mask & QMUX_EV_QCS_XFER_DATA) {
const struct qcs_xfer_data_trace_arg *arg = a3;
chunk_appendf(&trace_buf, " prep=%llu xfer=%d",
(ull)arg->prep, arg->xfer);
chunk_appendf(&trace_buf, " prep=%lu xfer=%d",
arg->prep, arg->xfer);
}
if (mask & QMUX_EV_QCS_BUILD_STRM) {
const struct qcs_build_stream_trace_arg *arg = a3;
chunk_appendf(&trace_buf, " len=%llu fin=%d offset=%llu",
(ull)arg->len, arg->fin, (ull)arg->offset);
chunk_appendf(&trace_buf, " len=%lu fin=%d offset=%lu",
arg->len, arg->fin, arg->offset);
}
}
}