MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rack_update_rsm

Function rack_update_rsm

freebsd/netinet/tcp_stacks/rack.c:5955–5990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5953}
5954
5955static void
5956rack_update_rsm(struct tcpcb *tp, struct tcp_rack *rack,
5957 struct rack_sendmap *rsm, uint32_t ts)
5958{
5959 int32_t idx;
5960
5961 rsm->r_rtr_cnt++;
5962 rack_log_retran_reason(rack, rsm, __LINE__, 0, 2);
5963 rsm->r_dupack = 0;
5964 if (rsm->r_rtr_cnt > RACK_NUM_OF_RETRANS) {
5965 rsm->r_rtr_cnt = RACK_NUM_OF_RETRANS;
5966 rsm->r_flags |= RACK_OVERMAX;
5967 }
5968 if ((rsm->r_rtr_cnt > 1) && ((rsm->r_flags & RACK_TLP) == 0)) {
5969 rack->r_ctl.rc_holes_rxt += (rsm->r_end - rsm->r_start);
5970 rsm->r_rtr_bytes += (rsm->r_end - rsm->r_start);
5971 }
5972 idx = rsm->r_rtr_cnt - 1;
5973 rsm->r_tim_lastsent[idx] = ts;
5974 if (rsm->r_flags & RACK_ACKED) {
5975 /* Problably MTU discovery messing with us */
5976 rsm->r_flags &= ~RACK_ACKED;
5977 rack->r_ctl.rc_sacked -= (rsm->r_end - rsm->r_start);
5978 }
5979 if (rsm->r_in_tmap) {
5980 TAILQ_REMOVE(&rack->r_ctl.rc_tmap, rsm, r_tnext);
5981 rsm->r_in_tmap = 0;
5982 }
5983 TAILQ_INSERT_TAIL(&rack->r_ctl.rc_tmap, rsm, r_tnext);
5984 rsm->r_in_tmap = 1;
5985 if (rsm->r_flags & RACK_SACK_PASSED) {
5986 /* We have retransmitted due to the SACK pass */
5987 rsm->r_flags &= ~RACK_SACK_PASSED;
5988 rsm->r_flags |= RACK_WAS_SACKPASS;
5989 }
5990}
5991
5992static uint32_t
5993rack_update_entry(struct tcpcb *tp, struct tcp_rack *rack,

Callers 2

rack_update_entryFunction · 0.85
rack_log_outputFunction · 0.85

Calls 1

rack_log_retran_reasonFunction · 0.85

Tested by

no test coverage detected