| 2939 | } |
| 2940 | |
| 2941 | static int |
| 2942 | sctp_process_segment_range(struct sctp_tcb *stcb, struct sctp_tmit_chunk **p_tp1, uint32_t last_tsn, |
| 2943 | uint16_t frag_strt, uint16_t frag_end, int nr_sacking, |
| 2944 | int *num_frs, |
| 2945 | uint32_t *biggest_newly_acked_tsn, |
| 2946 | uint32_t *this_sack_lowest_newack, |
| 2947 | int *rto_ok) |
| 2948 | { |
| 2949 | struct sctp_tmit_chunk *tp1; |
| 2950 | unsigned int theTSN; |
| 2951 | int j, wake_him = 0, circled = 0; |
| 2952 | |
| 2953 | /* Recover the tp1 we last saw */ |
| 2954 | tp1 = *p_tp1; |
| 2955 | if (tp1 == NULL) { |
| 2956 | tp1 = TAILQ_FIRST(&stcb->asoc.sent_queue); |
| 2957 | } |
| 2958 | for (j = frag_strt; j <= frag_end; j++) { |
| 2959 | theTSN = j + last_tsn; |
| 2960 | while (tp1) { |
| 2961 | if (tp1->rec.data.doing_fast_retransmit) |
| 2962 | (*num_frs) += 1; |
| 2963 | |
| 2964 | /*- |
| 2965 | * CMT: CUCv2 algorithm. For each TSN being |
| 2966 | * processed from the sent queue, track the |
| 2967 | * next expected pseudo-cumack, or |
| 2968 | * rtx_pseudo_cumack, if required. Separate |
| 2969 | * cumack trackers for first transmissions, |
| 2970 | * and retransmissions. |
| 2971 | */ |
| 2972 | if ((tp1->sent < SCTP_DATAGRAM_RESEND) && |
| 2973 | (tp1->whoTo->find_pseudo_cumack == 1) && |
| 2974 | (tp1->snd_count == 1)) { |
| 2975 | tp1->whoTo->pseudo_cumack = tp1->rec.data.tsn; |
| 2976 | tp1->whoTo->find_pseudo_cumack = 0; |
| 2977 | } |
| 2978 | if ((tp1->sent < SCTP_DATAGRAM_RESEND) && |
| 2979 | (tp1->whoTo->find_rtx_pseudo_cumack == 1) && |
| 2980 | (tp1->snd_count > 1)) { |
| 2981 | tp1->whoTo->rtx_pseudo_cumack = tp1->rec.data.tsn; |
| 2982 | tp1->whoTo->find_rtx_pseudo_cumack = 0; |
| 2983 | } |
| 2984 | if (tp1->rec.data.tsn == theTSN) { |
| 2985 | if (tp1->sent != SCTP_DATAGRAM_UNSENT) { |
| 2986 | /*- |
| 2987 | * must be held until |
| 2988 | * cum-ack passes |
| 2989 | */ |
| 2990 | if (tp1->sent < SCTP_DATAGRAM_RESEND) { |
| 2991 | /*- |
| 2992 | * If it is less than RESEND, it is |
| 2993 | * now no-longer in flight. |
| 2994 | * Higher values may already be set |
| 2995 | * via previous Gap Ack Blocks... |
| 2996 | * i.e. ACKED or RESEND. |
| 2997 | */ |
| 2998 | if (SCTP_TSN_GT(tp1->rec.data.tsn, |
no test coverage detected