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

Function rack_handle_delayed_ack

freebsd/netinet/tcp_stacks/rack.c:8497–8521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8495}
8496
8497static void
8498rack_handle_delayed_ack(struct tcpcb *tp, struct tcp_rack *rack,
8499 int32_t tlen, int32_t tfo_syn)
8500{
8501 if (DELAY_ACK(tp, tlen) || tfo_syn) {
8502 if (rack->rc_dack_mode &&
8503 (tlen > 500) &&
8504 (rack->rc_dack_toggle == 1)) {
8505 goto no_delayed_ack;
8506 }
8507 rack_timer_cancel(tp, rack,
8508 rack->r_ctl.rc_rcvtime, __LINE__);
8509 tp->t_flags |= TF_DELACK;
8510 } else {
8511no_delayed_ack:
8512 rack->r_wanted_output = 1;
8513 tp->t_flags |= TF_ACKNOW;
8514 if (rack->rc_dack_mode) {
8515 if (tp->t_flags & TF_DELACK)
8516 rack->rc_dack_toggle = 1;
8517 else
8518 rack->rc_dack_toggle = 0;
8519 }
8520 }
8521}
8522/*
8523 * Return value of 1, the TCB is unlocked and most
8524 * likely gone, return value of 0, the TCP is still

Callers 2

rack_process_dataFunction · 0.85
rack_do_fastnewdataFunction · 0.85

Calls 1

rack_timer_cancelFunction · 0.85

Tested by

no test coverage detected