Skip to content

Commit 9f0b773

Browse files
lxinkuba-moo
authored andcommitted
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>
1 parent 1c075b1 commit 9f0b773

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

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)