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

Function bbr_set_sockopt

freebsd/netinet/tcp_stacks/bbr.c:14287–14680  ·  view source on GitHub ↗

* bbr_ctloutput() must drop the inpcb lock before performing copyin on * socket option arguments. When it re-acquires the lock after the copy, it * has to revalidate that the connection is still valid for the socket * option. */

Source from the content-addressed store, hash-verified

14285 * option.
14286 */
14287static int
14288bbr_set_sockopt(struct socket *so, struct sockopt *sopt,
14289 struct inpcb *inp, struct tcpcb *tp, struct tcp_bbr *bbr)
14290{
14291 struct epoch_tracker et;
14292 int32_t error = 0, optval;
14293
14294 switch (sopt->sopt_name) {
14295 case TCP_RACK_PACE_MAX_SEG:
14296 case TCP_RACK_MIN_TO:
14297 case TCP_RACK_REORD_THRESH:
14298 case TCP_RACK_REORD_FADE:
14299 case TCP_RACK_TLP_THRESH:
14300 case TCP_RACK_PKT_DELAY:
14301 case TCP_BBR_ALGORITHM:
14302 case TCP_BBR_TSLIMITS:
14303 case TCP_BBR_IWINTSO:
14304 case TCP_BBR_RECFORCE:
14305 case TCP_BBR_STARTUP_PG:
14306 case TCP_BBR_DRAIN_PG:
14307 case TCP_BBR_RWND_IS_APP:
14308 case TCP_BBR_PROBE_RTT_INT:
14309 case TCP_BBR_PROBE_RTT_GAIN:
14310 case TCP_BBR_PROBE_RTT_LEN:
14311 case TCP_BBR_STARTUP_LOSS_EXIT:
14312 case TCP_BBR_USEDEL_RATE:
14313 case TCP_BBR_MIN_RTO:
14314 case TCP_BBR_MAX_RTO:
14315 case TCP_BBR_PACE_PER_SEC:
14316 case TCP_DELACK:
14317 case TCP_BBR_PACE_DEL_TAR:
14318 case TCP_BBR_SEND_IWND_IN_TSO:
14319 case TCP_BBR_EXTRA_STATE:
14320 case TCP_BBR_UTTER_MAX_TSO:
14321 case TCP_BBR_MIN_TOPACEOUT:
14322 case TCP_BBR_FLOOR_MIN_TSO:
14323 case TCP_BBR_TSTMP_RAISES:
14324 case TCP_BBR_POLICER_DETECT:
14325 case TCP_BBR_USE_RACK_CHEAT:
14326 case TCP_DATA_AFTER_CLOSE:
14327 case TCP_BBR_HDWR_PACE:
14328 case TCP_BBR_PACE_SEG_MAX:
14329 case TCP_BBR_PACE_SEG_MIN:
14330 case TCP_BBR_PACE_CROSS:
14331 case TCP_BBR_PACE_OH:
14332#ifdef NETFLIX_PEAKRATE
14333 case TCP_MAXPEAKRATE:
14334#endif
14335 case TCP_BBR_TMR_PACE_OH:
14336 case TCP_BBR_RACK_RTT_USE:
14337 case TCP_BBR_RETRAN_WTSO:
14338 break;
14339 default:
14340 return (tcp_default_ctloutput(so, sopt, inp, tp));
14341 break;
14342 }
14343 INP_WUNLOCK(inp);
14344 error = sooptcopyin(sopt, &optval, sizeof(optval), sizeof(optval));

Callers 1

bbr_ctloutputFunction · 0.85

Calls 10

tcp_default_ctloutputFunction · 0.85
sooptcopyinFunction · 0.85
bbr_google_mode_onFunction · 0.85
bbr_google_mode_offFunction · 0.85
bbr_initial_cwndFunction · 0.85
reset_time_smallFunction · 0.85
tcp_get_usecsFunction · 0.85
tcp_bbr_tso_size_checkFunction · 0.85
in_pcbdetach_txrtlmtFunction · 0.85
bbr_outputFunction · 0.85

Tested by

no test coverage detected