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

Function rack_get_sockopt

freebsd/netinet/tcp_stacks/rack.c:14657–14824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14655}
14656
14657static int
14658rack_get_sockopt(struct socket *so, struct sockopt *sopt,
14659 struct inpcb *inp, struct tcpcb *tp, struct tcp_rack *rack)
14660{
14661 int32_t error, optval;
14662 uint64_t val;
14663 /*
14664 * Because all our options are either boolean or an int, we can just
14665 * pull everything into optval and then unlock and copy. If we ever
14666 * add a option that is not a int, then this will have quite an
14667 * impact to this routine.
14668 */
14669 error = 0;
14670 switch (sopt->sopt_name) {
14671 case TCP_RACK_PROFILE:
14672 /* You cannot retrieve a profile, its write only */
14673 error = EINVAL;
14674 break;
14675 case TCP_RACK_PACE_TO_FILL:
14676 optval = rack->rc_pace_to_cwnd;
14677 break;
14678 case TCP_RACK_NO_PUSH_AT_MAX:
14679 optval = rack->r_ctl.rc_no_push_at_mrtt;
14680 break;
14681 case TCP_SHARED_CWND_ENABLE:
14682 optval = rack->rack_enable_scwnd;
14683 break;
14684 case TCP_RACK_NONRXT_CFG_RATE:
14685 optval = rack->rack_rec_nonrxt_use_cr;
14686 break;
14687 case TCP_NO_PRR:
14688 optval = rack->rack_no_prr;
14689 break;
14690 case TCP_RACK_DO_DETECTION:
14691 optval = rack->do_detection;
14692 break;
14693 case TCP_RACK_MBUF_QUEUE:
14694 /* Now do we use the LRO mbuf-queue feature */
14695 optval = rack->r_mbuf_queue;
14696 break;
14697 case TCP_TIMELY_DYN_ADJ:
14698 optval = rack->rc_gp_dyn_mul;
14699 break;
14700 case TCP_BBR_IWINTSO:
14701 optval = rack->rc_init_win;
14702 break;
14703 case TCP_RACK_PROP_RATE:
14704 optval = rack->r_ctl.rc_prop_rate;
14705 break;
14706 case TCP_RACK_PROP:
14707 /* RACK proportional rate reduction (bool) */
14708 optval = rack->r_ctl.rc_prop_reduce;
14709 break;
14710 case TCP_RACK_TLP_REDUCE:
14711 /* RACK TLP cwnd reduction (bool) */
14712 optval = rack->r_ctl.rc_tlp_cwnd_reduce;
14713 break;
14714 case TCP_RACK_EARLY_RECOV:

Callers 1

rack_ctloutputFunction · 0.85

Calls 2

tcp_default_ctloutputFunction · 0.85
sooptcopyoutFunction · 0.85

Tested by

no test coverage detected