| 3299 | } |
| 3300 | |
| 3301 | static void |
| 3302 | sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc, |
| 3303 | uint32_t biggest_tsn_acked, uint32_t biggest_tsn_newly_acked, uint32_t this_sack_lowest_newack, int accum_moved) |
| 3304 | { |
| 3305 | struct sctp_tmit_chunk *tp1; |
| 3306 | int strike_flag = 0; |
| 3307 | struct timeval now; |
| 3308 | int tot_retrans = 0; |
| 3309 | uint32_t sending_seq; |
| 3310 | struct sctp_nets *net; |
| 3311 | int num_dests_sacked = 0; |
| 3312 | |
| 3313 | /* |
| 3314 | * select the sending_seq, this is either the next thing ready to be |
| 3315 | * sent but not transmitted, OR, the next seq we assign. |
| 3316 | */ |
| 3317 | tp1 = TAILQ_FIRST(&stcb->asoc.send_queue); |
| 3318 | if (tp1 == NULL) { |
| 3319 | sending_seq = asoc->sending_seq; |
| 3320 | } else { |
| 3321 | sending_seq = tp1->rec.data.tsn; |
| 3322 | } |
| 3323 | |
| 3324 | /* CMT DAC algo: finding out if SACK is a mixed SACK */ |
| 3325 | if ((asoc->sctp_cmt_on_off > 0) && |
| 3326 | SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) { |
| 3327 | TAILQ_FOREACH(net, &asoc->nets, sctp_next) { |
| 3328 | if (net->saw_newack) |
| 3329 | num_dests_sacked++; |
| 3330 | } |
| 3331 | } |
| 3332 | if (stcb->asoc.prsctp_supported) { |
| 3333 | (void)SCTP_GETTIME_TIMEVAL(&now); |
| 3334 | } |
| 3335 | TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { |
| 3336 | strike_flag = 0; |
| 3337 | if (tp1->no_fr_allowed) { |
| 3338 | /* this one had a timeout or something */ |
| 3339 | continue; |
| 3340 | } |
| 3341 | if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FR_LOGGING_ENABLE) { |
| 3342 | if (tp1->sent < SCTP_DATAGRAM_RESEND) |
| 3343 | sctp_log_fr(biggest_tsn_newly_acked, |
| 3344 | tp1->rec.data.tsn, |
| 3345 | tp1->sent, |
| 3346 | SCTP_FR_LOG_CHECK_STRIKE); |
| 3347 | } |
| 3348 | if (SCTP_TSN_GT(tp1->rec.data.tsn, biggest_tsn_acked) || |
| 3349 | tp1->sent == SCTP_DATAGRAM_UNSENT) { |
| 3350 | /* done */ |
| 3351 | break; |
| 3352 | } |
| 3353 | if (stcb->asoc.prsctp_supported) { |
| 3354 | if ((PR_SCTP_TTL_ENABLED(tp1->flags)) && tp1->sent < SCTP_DATAGRAM_ACKED) { |
| 3355 | /* Is it expired? */ |
| 3356 | if (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) { |
| 3357 | /* Yes so drop it */ |
| 3358 | if (tp1->data != NULL) { |
no test coverage detected