From 2e150fcb911f793f34d0c06a421f251d82b3cb30 Mon Sep 17 00:00:00 2001 From: Kenneth Giusti Date: Wed, 18 Oct 2023 16:54:31 -0400 Subject: [PATCH] Cut-through: check for Q3 stall before writing to output link. --- src/message.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/message.c b/src/message.c index 4634aab52..b337eac42 100644 --- a/src/message.c +++ b/src/message.c @@ -1862,6 +1862,7 @@ static void qd_message_send_cut_through(qd_message_pvt_t *msg, qd_message_conten { const size_t q3_upper = QD_BUFFER_SIZE * QD_QLIMIT_Q3_UPPER; + *q3_stalled = !IS_ATOMIC_FLAG_SET(&content->aborted) && (pn_session_outgoing_bytes(pns) >= q3_upper); while (!*q3_stalled && (sys_atomic_get(&content->uct_consume_slot) - sys_atomic_get(&content->uct_produce_slot)) % UCT_SLOT_COUNT != 0) { uint32_t use_slot = sys_atomic_get(&content->uct_consume_slot);