mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-01 12:04:08 +00:00
sctp: out_qlen should be updated when pruning unsent queue
This patch is to fix the issue that sctp_prsctp_prune_sent forgot
to update q->out_qlen when removing a chunk from unsent queue.
Fixes: 8dbdf1f5b0
("sctp: implement prsctp PRIO policy")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1f904495b7
commit
23bb09cfbe
1 changed files with 5 additions and 6 deletions
|
@ -382,17 +382,18 @@ static int sctp_prsctp_prune_sent(struct sctp_association *asoc,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sctp_prsctp_prune_unsent(struct sctp_association *asoc,
|
static int sctp_prsctp_prune_unsent(struct sctp_association *asoc,
|
||||||
struct sctp_sndrcvinfo *sinfo,
|
struct sctp_sndrcvinfo *sinfo, int msg_len)
|
||||||
struct list_head *queue, int msg_len)
|
|
||||||
{
|
{
|
||||||
|
struct sctp_outq *q = &asoc->outqueue;
|
||||||
struct sctp_chunk *chk, *temp;
|
struct sctp_chunk *chk, *temp;
|
||||||
|
|
||||||
list_for_each_entry_safe(chk, temp, queue, list) {
|
list_for_each_entry_safe(chk, temp, &q->out_chunk_list, list) {
|
||||||
if (!SCTP_PR_PRIO_ENABLED(chk->sinfo.sinfo_flags) ||
|
if (!SCTP_PR_PRIO_ENABLED(chk->sinfo.sinfo_flags) ||
|
||||||
chk->sinfo.sinfo_timetolive <= sinfo->sinfo_timetolive)
|
chk->sinfo.sinfo_timetolive <= sinfo->sinfo_timetolive)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
list_del_init(&chk->list);
|
list_del_init(&chk->list);
|
||||||
|
q->out_qlen -= chk->skb->len;
|
||||||
asoc->sent_cnt_removable--;
|
asoc->sent_cnt_removable--;
|
||||||
asoc->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++;
|
asoc->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++;
|
||||||
|
|
||||||
|
@ -431,9 +432,7 @@ void sctp_prsctp_prune(struct sctp_association *asoc,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sctp_prsctp_prune_unsent(asoc, sinfo,
|
sctp_prsctp_prune_unsent(asoc, sinfo, msg_len);
|
||||||
&asoc->outqueue.out_chunk_list,
|
|
||||||
msg_len);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mark all the eligible packets on a transport for retransmission. */
|
/* Mark all the eligible packets on a transport for retransmission. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue