Add a field to save the creation date of qc_stream_desc instance. This
is useful to display QUIC stream age in "show quic stream" output.
uint64_t ack_offset; /* last acknowledged offset */
struct eb_root buf_tree; /* list of active and released buffers */
struct bdata_ctr data; /* data utilization counter */
+ ullong origin_ts; /* timestamp for creation date of current stream instance */
int flags; /* QC_SD_FL_* values */
continue;
}
- chunk_appendf(&trash, "%p.%04llu: 0x%02x", qc, (ullong)id, sd->flags);
+ chunk_appendf(&trash, "%p.%04llu: 0x%02x age=%s", qc, (ullong)id, sd->flags,
+ human_time(ns_to_sec(now_ns) - ns_to_sec(sd->origin_ts), 1));
bdata_ctr_print(&trash, &sd->data, "tx=[");
if (qcs) {
stream->buf_offset = 0;
bdata_ctr_init(&stream->data);
+ stream->origin_ts = now_ns;
stream->ack_offset = 0;
stream->flags = 0;
stream->ctx = ctx;