* [PATCH net v2] sctp: preserve stream scheduler across outq teardown
@ 2026-11-17 11:04 Jun Yang
2026-11-17 11:07 ` netdev-bot+sinfo
0 siblings, 1 reply; 2+ messages in thread
From: Jun Yang @ 2026-11-17 11:04 UTC (permalink / raw)
To: lucien.xin, marcelo.leitner
Cc: davem, edumazet, kuba, pabeni, horms, linux-sctp, netdev,
junvyyang, corvus, stable, Jun Yang
From: Jun Yang <junvyyang@tencent.com>
sctp_outq_init() clears the installed scheduler when it reinitializes
an outqueue after teardown. The streams still have scheduler-specific
state that the old scheduler needs to release if the scheduler changes.
Initialize the queue counters and flags individually so that
sctp_sched_set_sched() can use the installed scheduler. A new
association is zero-allocated and starts with the socket's default
scheduler as before.
When the socket default matches the installed scheduler, streams retain
their PRIO priorities and WFQ weights. FC and WFQ also retain fc_length,
including bytes charged for purged chunks. Those chunks were queued on
the stream and the accounting converges as new data flows.
Fixes: 5bbbbe32a431 ("sctp: introduce stream scheduler foundations")
Cc: stable@kernel.org
Reported-by: TencentOS Corvus AI <corvus@tencent.com>
Link: https://lore.kernel.org/r/20261104105507.62743-1-juny24602@gmail.com
Signed-off-by: Jun Yang <junvyyang@tencent.com>
---
v2:
- Initialize the five queue counters and flags individually, as Xin
Long suggested.
- Document the per-stream settings and fc_length accounting retained
when the scheduler stays the same.
v1: https://lore.kernel.org/netdev/20261104105507.62743-1-juny24602@gmail.com/
net/sctp/outqueue.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index e92fb9da4647..3dafa6e6cab3 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -190,9 +190,12 @@ static inline int sctp_cacc_skip(struct sctp_transport *primary,
*/
void sctp_outq_init(struct sctp_association *asoc, struct sctp_outq *q)
{
- memset(q, 0, sizeof(struct sctp_outq));
-
q->asoc = asoc;
+ q->out_qlen = 0;
+ q->error = 0;
+ q->outstanding_bytes = 0;
+ q->fast_rtx = 0;
+ q->cork = 0;
INIT_LIST_HEAD(&q->out_chunk_list);
INIT_LIST_HEAD(&q->control_chunk_list);
INIT_LIST_HEAD(&q->retransmit);
base-commit: a2239d5dbbda3a61b6323df8836f605921a29f7f
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net v2] sctp: preserve stream scheduler across outq teardown
2026-11-17 11:04 [PATCH net v2] sctp: preserve stream scheduler across outq teardown Jun Yang
@ 2026-11-17 11:07 ` netdev-bot+sinfo
0 siblings, 0 replies; 2+ messages in thread
From: netdev-bot+sinfo @ 2026-11-17 11:07 UTC (permalink / raw)
To: Jun Yang
Cc: lucien.xin, marcelo.leitner, davem, edumazet, kuba, pabeni, horms,
linux-sctp, netdev, junvyyang, corvus, stable
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by LLM and not proven at runtime). If it was triggered
please include the symptoms, like the stack trace or kernel messages.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.
*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
--
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-17 11:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 11:04 [PATCH net v2] sctp: preserve stream scheduler across outq teardown Jun Yang
2026-11-17 11:07 ` netdev-bot+sinfo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox