|
@@ -364,10 +364,12 @@ static int sctp_prsctp_prune_sent(struct sctp_association *asoc,
|
|
list_for_each_entry_safe(chk, temp, queue, transmitted_list) {
|
|
list_for_each_entry_safe(chk, temp, queue, transmitted_list) {
|
|
struct sctp_stream_out *streamout;
|
|
struct sctp_stream_out *streamout;
|
|
|
|
|
|
- if (!SCTP_PR_PRIO_ENABLED(chk->sinfo.sinfo_flags) ||
|
|
|
|
- chk->sinfo.sinfo_timetolive <= sinfo->sinfo_timetolive)
|
|
|
|
|
|
+ if (!chk->msg->abandoned &&
|
|
|
|
+ (!SCTP_PR_PRIO_ENABLED(chk->sinfo.sinfo_flags) ||
|
|
|
|
+ chk->sinfo.sinfo_timetolive <= sinfo->sinfo_timetolive))
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
+ chk->msg->abandoned = 1;
|
|
list_del_init(&chk->transmitted_list);
|
|
list_del_init(&chk->transmitted_list);
|
|
sctp_insert_list(&asoc->outqueue.abandoned,
|
|
sctp_insert_list(&asoc->outqueue.abandoned,
|
|
&chk->transmitted_list);
|
|
&chk->transmitted_list);
|
|
@@ -377,7 +379,8 @@ static int sctp_prsctp_prune_sent(struct sctp_association *asoc,
|
|
asoc->abandoned_sent[SCTP_PR_INDEX(PRIO)]++;
|
|
asoc->abandoned_sent[SCTP_PR_INDEX(PRIO)]++;
|
|
streamout->ext->abandoned_sent[SCTP_PR_INDEX(PRIO)]++;
|
|
streamout->ext->abandoned_sent[SCTP_PR_INDEX(PRIO)]++;
|
|
|
|
|
|
- if (!chk->tsn_gap_acked) {
|
|
|
|
|
|
+ if (queue != &asoc->outqueue.retransmit &&
|
|
|
|
+ !chk->tsn_gap_acked) {
|
|
if (chk->transport)
|
|
if (chk->transport)
|
|
chk->transport->flight_size -=
|
|
chk->transport->flight_size -=
|
|
sctp_data_size(chk);
|
|
sctp_data_size(chk);
|
|
@@ -403,10 +406,13 @@ static int sctp_prsctp_prune_unsent(struct sctp_association *asoc,
|
|
q->sched->unsched_all(&asoc->stream);
|
|
q->sched->unsched_all(&asoc->stream);
|
|
|
|
|
|
list_for_each_entry_safe(chk, temp, &q->out_chunk_list, list) {
|
|
list_for_each_entry_safe(chk, temp, &q->out_chunk_list, list) {
|
|
- if (!SCTP_PR_PRIO_ENABLED(chk->sinfo.sinfo_flags) ||
|
|
|
|
- chk->sinfo.sinfo_timetolive <= sinfo->sinfo_timetolive)
|
|
|
|
|
|
+ if (!chk->msg->abandoned &&
|
|
|
|
+ (!(chk->chunk_hdr->flags & SCTP_DATA_FIRST_FRAG) ||
|
|
|
|
+ !SCTP_PR_PRIO_ENABLED(chk->sinfo.sinfo_flags) ||
|
|
|
|
+ chk->sinfo.sinfo_timetolive <= sinfo->sinfo_timetolive))
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
+ chk->msg->abandoned = 1;
|
|
sctp_sched_dequeue_common(q, chk);
|
|
sctp_sched_dequeue_common(q, chk);
|
|
asoc->sent_cnt_removable--;
|
|
asoc->sent_cnt_removable--;
|
|
asoc->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++;
|
|
asoc->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++;
|
|
@@ -1434,7 +1440,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,
|
|
/* If this chunk has not been acked, stop
|
|
/* If this chunk has not been acked, stop
|
|
* considering it as 'outstanding'.
|
|
* considering it as 'outstanding'.
|
|
*/
|
|
*/
|
|
- if (!tchunk->tsn_gap_acked) {
|
|
|
|
|
|
+ if (transmitted_queue != &q->retransmit &&
|
|
|
|
+ !tchunk->tsn_gap_acked) {
|
|
if (tchunk->transport)
|
|
if (tchunk->transport)
|
|
tchunk->transport->flight_size -=
|
|
tchunk->transport->flight_size -=
|
|
sctp_data_size(tchunk);
|
|
sctp_data_size(tchunk);
|