Skip to content

Commit c0a20d6

Browse files
author
Xin Long
committed
sctp: remove the unnecessary sinfo_stream check in sctp_prsctp_prune_unsent
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2160516 Tested: compile only commit 9f0b773 Author: Xin Long <lucien.xin@gmail.com> Date: Fri Nov 4 17:45:15 2022 -0400 sctp: remove the unnecessary sinfo_stream check in sctp_prsctp_prune_unsent Since commit 5bbbbe3 ("sctp: introduce stream scheduler foundations"), sctp_stream_outq_migrate() has been called in sctp_stream_init/update to removes those chunks to streams higher than the new max. There is no longer need to do such check in sctp_prsctp_prune_unsent(). Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Xin Long <lxin@redhat.com>
1 parent 9951bfa commit c0a20d6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

net/sctp/outqueue.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ static int sctp_prsctp_prune_unsent(struct sctp_association *asoc,
384384
{
385385
struct sctp_outq *q = &asoc->outqueue;
386386
struct sctp_chunk *chk, *temp;
387+
struct sctp_stream_out *sout;
387388

388389
q->sched->unsched_all(&asoc->stream);
389390

@@ -398,12 +399,9 @@ static int sctp_prsctp_prune_unsent(struct sctp_association *asoc,
398399
sctp_sched_dequeue_common(q, chk);
399400
asoc->sent_cnt_removable--;
400401
asoc->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++;
401-
if (chk->sinfo.sinfo_stream < asoc->stream.outcnt) {
402-
struct sctp_stream_out *streamout =
403-
SCTP_SO(&asoc->stream, chk->sinfo.sinfo_stream);
404402

405-
streamout->ext->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++;
406-
}
403+
sout = SCTP_SO(&asoc->stream, chk->sinfo.sinfo_stream);
404+
sout->ext->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++;
407405

408406
msg_len -= chk->skb->truesize + sizeof(struct sctp_chunk);
409407
sctp_chunk_free(chk);

0 commit comments

Comments
 (0)