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

Function rack_log_retran_reason

freebsd/netinet/tcp_stacks/rack.c:1635–1672  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1633}
1634
1635static void
1636rack_log_retran_reason(struct tcp_rack *rack, struct rack_sendmap *rsm, uint32_t tsused, uint32_t thresh, int mod)
1637{
1638 if (rack->rc_tp->t_logstate != TCP_LOG_STATE_OFF) {
1639 union tcp_log_stackspecific log;
1640 struct timeval tv;
1641
1642 if ((mod != 1) && (rack_verbose_logging == 0)) {
1643 /*
1644 * We get 3 values currently for mod
1645 * 1 - We are retransmitting and this tells the reason.
1646 * 2 - We are clearing a dup-ack count.
1647 * 3 - We are incrementing a dup-ack count.
1648 *
1649 * The clear/increment are only logged
1650 * if you have BBverbose on.
1651 */
1652 return;
1653 }
1654 memset(&log.u_bbr, 0, sizeof(log.u_bbr));
1655 log.u_bbr.flex1 = tsused;
1656 log.u_bbr.flex2 = thresh;
1657 log.u_bbr.flex3 = rsm->r_flags;
1658 log.u_bbr.flex4 = rsm->r_dupack;
1659 log.u_bbr.flex5 = rsm->r_start;
1660 log.u_bbr.flex6 = rsm->r_end;
1661 log.u_bbr.flex8 = mod;
1662 log.u_bbr.inhpts = rack->rc_inp->inp_in_hpts;
1663 log.u_bbr.ininput = rack->rc_inp->inp_in_input;
1664 log.u_bbr.timeStamp = tcp_get_usecs(&tv);
1665 log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked);
1666 TCP_LOG_EVENTP(rack->rc_tp, NULL,
1667 &rack->rc_inp->inp_socket->so_rcv,
1668 &rack->rc_inp->inp_socket->so_snd,
1669 BBR_LOG_SETTINGS_CHG, 0,
1670 0, &log, false, &tv);
1671 }
1672}
1673
1674static void
1675rack_log_to_start(struct tcp_rack *rack, uint32_t cts, uint32_t to, int32_t slot, uint8_t which)

Callers 8

rack_remxt_tmrFunction · 0.85
rack_update_rsmFunction · 0.85
rack_update_entryFunction · 0.85
rack_log_outputFunction · 0.85
rack_proc_sack_blkFunction · 0.85
rack_log_ackFunction · 0.85
rack_strike_dupackFunction · 0.85
tcp_rack_outputFunction · 0.85

Calls 3

memsetFunction · 0.85
tcp_get_usecsFunction · 0.85
ctf_flight_sizeFunction · 0.85

Tested by

no test coverage detected