Thread View: linux.kernel.netdev
4 messages
4 total messages
Started by Jun Yang
Tue, 17 Nov 2026 11:04
[PATCH net v2] sctp: preserve stream scheduler across outq teardown
Author: Jun Yang
Date: Tue, 17 Nov 2026 11:04
Date: Tue, 17 Nov 2026 11:04
54 lines
12771 bytes
12771 bytes
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
Re: [PATCH net v2] sctp: preserve stream scheduler across outq teardown
Author: netdev-bot+sinfo
Date: Tue, 17 Nov 2026 11:07
Date: Tue, 17 Nov 2026 11:07
19 lines
8519 bytes
8519 bytes
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.
Re: [PATCH net v2] sctp: preserve stream scheduler across outq teardown
Author: Xin Long
Date: Mon, 23 Nov 2026 15:49
Date: Mon, 23 Nov 2026 15:49
63 lines
14462 bytes
14462 bytes
On Tue, Nov 17, 2026 at 6:05 AM Jun Yang <juny24602@gmail.com> wrote:
>
> 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
>
Acked-by: Xin Long <lucien.xin@gmail.com>
Re: [PATCH net v2] sctp: preserve stream scheduler across outq teardown
Author: patchwork-bot+netdevbpf
Date: Tue, 24 Nov 2026 02:10
Date: Tue, 24 Nov 2026 02:10
28 lines
8836 bytes
8836 bytes
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 17 Nov 2026 19:04:49 +0800 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [net,v2] sctp: preserve stream scheduler across outq teardown
https://git.kernel.org/netdev/net/c/d1be830de8cb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads