Lines Matching defs:rack

135 rack_update_pcm_ack(struct tcp_rack *rack, int was_cumack, uint32_t start, uint32_t end)
142 if (rack->pcm_in_progress == 0)
145 if (SEQ_LEQ(end, rack->r_ctl.pcm_i.sseq)) {
153 segsiz = ctf_fixed_maxseg(rack->rc_tp);
154 if (SEQ_GEQ(end, (rack->r_ctl.pcm_i.eseq - segsiz))) {
162 rack->pcm_in_progress = 0;
163 rack->r_ctl.last_pcm_round = rack->r_ctl.current_round;
164 rack->r_ctl.pcm_idle_rounds = 0;
166 if (SEQ_GEQ(start, rack->r_ctl.pcm_i.eseq)) {
177 ack_arrival = tcp_tv_to_lusectick(&rack->r_ctl.act_rcv_time);
178 if (SEQ_GT(end, rack->r_ctl.pcm_i.eseq)) {
180 end = rack->r_ctl.pcm_i.eseq;
182 if ((rack->r_ctl.pcm_i.cnt + 1) > rack->r_ctl.pcm_i.cnt_alloc) {
186 if (rack->r_ctl.pcm_i.cnt_alloc == 0) {
190 rack->r_ctl.pcm_i.cnt_alloc = RACK_DEFAULT_PCM_ARRAY;
191 sz = (sizeof(struct rack_pcm_stats) * rack->r_ctl.pcm_i.cnt_alloc);
192 rack->r_ctl.pcm_s = malloc(sz, M_TCPPCM, M_NOWAIT);
193 if (rack->r_ctl.pcm_s == NULL) {
194 rack->r_ctl.pcm_i.cnt_alloc = 0;
195 rack->pcm_in_progress = 0;
203 new_cnt = rack->r_ctl.pcm_i.cnt_alloc * 2;
208 rack->pcm_in_progress = 0;
209 rack->r_ctl.pcm_i.cnt = 0;
212 sz = (sizeof(struct rack_pcm_stats) * rack->r_ctl.pcm_i.cnt_alloc);
213 memcpy(n, rack->r_ctl.pcm_s, sz);
214 free(rack->r_ctl.pcm_s, M_TCPPCM);
215 rack->r_ctl.pcm_s = n;
216 rack->r_ctl.pcm_i.cnt_alloc = new_cnt;
219 e = &rack->r_ctl.pcm_s[rack->r_ctl.pcm_i.cnt];
220 rack->r_ctl.pcm_i.cnt++;
232 if (tcp_bblogging_on(rack->rc_tp)) {
241 for (i=0; i<rack->r_ctl.pcm_i.cnt; i++) {
243 e = &rack->r_ctl.pcm_s[i];
246 log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked);
257 if (e->ack_time > rack->r_ctl.pcm_i.send_time) {
258 log.u_bbr.flex4 = (uint32_t)(e->ack_time - rack->r_ctl.pcm_i.send_time);
270 log.u_bbr.cur_del_rate = rack->r_ctl.pcm_i.send_time;
281 (void)tcp_log_event(rack->rc_tp, NULL, NULL, NULL, TCP_PCM_MEASURE, ERRNO_UNK,
284 if (prev_time > rack->r_ctl.pcm_i.send_time) {
290 log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked);
292 log.u_bbr.flex1 = rack->r_ctl.pcm_i.sseq;
293 log.u_bbr.flex2 = rack->r_ctl.pcm_i.eseq;
297 log.u_bbr.flex7 = rack->r_ctl.pcm_i.cnt;
298 log.u_bbr.cwnd_gain = rack->r_ctl.pcm_i.cnt_alloc;
299 log.u_bbr.cur_del_rate = rack->r_ctl.pcm_i.send_time;
303 log.u_bbr.delRate /= (prev_time - rack->r_ctl.pcm_i.send_time);
304 (void)tcp_log_event(rack->rc_tp, NULL, NULL, NULL, TCP_PCM_MEASURE, ERRNO_UNK,
328 rack->r_ctl.pcm_i.cnt = 0;