cc_htcp.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. /*-
  2. * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  3. *
  4. * Copyright (c) 2007-2008
  5. * Swinburne University of Technology, Melbourne, Australia
  6. * Copyright (c) 2009-2010 Lawrence Stewart <lstewart@freebsd.org>
  7. * Copyright (c) 2010 The FreeBSD Foundation
  8. * All rights reserved.
  9. *
  10. * This software was developed at the Centre for Advanced Internet
  11. * Architectures, Swinburne University of Technology, by Lawrence Stewart and
  12. * James Healy, made possible in part by a grant from the Cisco University
  13. * Research Program Fund at Community Foundation Silicon Valley.
  14. *
  15. * Portions of this software were developed at the Centre for Advanced
  16. * Internet Architectures, Swinburne University of Technology, Melbourne,
  17. * Australia by David Hayes under sponsorship from the FreeBSD Foundation.
  18. *
  19. * Redistribution and use in source and binary forms, with or without
  20. * modification, are permitted provided that the following conditions
  21. * are met:
  22. * 1. Redistributions of source code must retain the above copyright
  23. * notice, this list of conditions and the following disclaimer.
  24. * 2. Redistributions in binary form must reproduce the above copyright
  25. * notice, this list of conditions and the following disclaimer in the
  26. * documentation and/or other materials provided with the distribution.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  29. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  30. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  31. * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  32. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  33. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  34. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  36. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  37. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  38. * SUCH DAMAGE.
  39. */
  40. /*
  41. * An implementation of the H-TCP congestion control algorithm for FreeBSD,
  42. * based on the Internet Draft "draft-leith-tcp-htcp-06.txt" by Leith and
  43. * Shorten. Originally released as part of the NewTCP research project at
  44. * Swinburne University of Technology's Centre for Advanced Internet
  45. * Architectures, Melbourne, Australia, which was made possible in part by a
  46. * grant from the Cisco University Research Program Fund at Community Foundation
  47. * Silicon Valley. More details are available at:
  48. * http://caia.swin.edu.au/urp/newtcp/
  49. */
  50. #include <sys/cdefs.h>
  51. __FBSDID("$FreeBSD$");
  52. #include <sys/param.h>
  53. #include <sys/kernel.h>
  54. #include <sys/limits.h>
  55. #include <sys/malloc.h>
  56. #include <sys/module.h>
  57. #include <sys/socket.h>
  58. #include <sys/socketvar.h>
  59. #include <sys/sysctl.h>
  60. #include <sys/systm.h>
  61. #include <net/vnet.h>
  62. #include <netinet/tcp.h>
  63. #include <netinet/tcp_seq.h>
  64. #include <netinet/tcp_timer.h>
  65. #include <netinet/tcp_var.h>
  66. #include <netinet/cc/cc.h>
  67. #include <netinet/cc/cc_module.h>
  68. /* Fixed point math shifts. */
  69. #define HTCP_SHIFT 8
  70. #define HTCP_ALPHA_INC_SHIFT 4
  71. #define HTCP_INIT_ALPHA 1
  72. #define HTCP_DELTA_L hz /* 1 sec in ticks. */
  73. #define HTCP_MINBETA 128 /* 0.5 << HTCP_SHIFT. */
  74. #define HTCP_MAXBETA 204 /* ~0.8 << HTCP_SHIFT. */
  75. #define HTCP_MINROWE 26 /* ~0.1 << HTCP_SHIFT. */
  76. #define HTCP_MAXROWE 512 /* 2 << HTCP_SHIFT. */
  77. /* RTT_ref (ms) used in the calculation of alpha if RTT scaling is enabled. */
  78. #define HTCP_RTT_REF 100
  79. /* Don't trust SRTT until this many samples have been taken. */
  80. #define HTCP_MIN_RTT_SAMPLES 8
  81. /*
  82. * HTCP_CALC_ALPHA performs a fixed point math calculation to determine the
  83. * value of alpha, based on the function defined in the HTCP spec.
  84. *
  85. * i.e. 1 + 10(delta - delta_l) + ((delta - delta_l) / 2) ^ 2
  86. *
  87. * "diff" is passed in to the macro as "delta - delta_l" and is expected to be
  88. * in units of ticks.
  89. *
  90. * The joyousnous of fixed point maths means our function implementation looks a
  91. * little funky...
  92. *
  93. * In order to maintain some precision in the calculations, a fixed point shift
  94. * HTCP_ALPHA_INC_SHIFT is used to ensure the integer divisions don't
  95. * truncate the results too badly.
  96. *
  97. * The "16" value is the "1" term in the alpha function shifted up by
  98. * HTCP_ALPHA_INC_SHIFT
  99. *
  100. * The "160" value is the "10" multiplier in the alpha function multiplied by
  101. * 2^HTCP_ALPHA_INC_SHIFT
  102. *
  103. * Specifying these as constants reduces the computations required. After
  104. * up-shifting all the terms in the function and performing the required
  105. * calculations, we down-shift the final result by HTCP_ALPHA_INC_SHIFT to
  106. * ensure it is back in the correct range.
  107. *
  108. * The "hz" terms are required as kernels can be configured to run with
  109. * different tick timers, which we have to adjust for in the alpha calculation
  110. * (which originally was defined in terms of seconds).
  111. *
  112. * We also have to be careful to constrain the value of diff such that it won't
  113. * overflow whilst performing the calculation. The middle term i.e. (160 * diff)
  114. * / hz is the limiting factor in the calculation. We must constrain diff to be
  115. * less than the max size of an int divided by the constant 160 figure
  116. * i.e. diff < INT_MAX / 160
  117. *
  118. * NB: Changing HTCP_ALPHA_INC_SHIFT will require you to MANUALLY update the
  119. * constants used in this function!
  120. */
  121. #define HTCP_CALC_ALPHA(diff) \
  122. ((\
  123. (16) + \
  124. ((160 * (diff)) / hz) + \
  125. (((diff) / hz) * (((diff) << HTCP_ALPHA_INC_SHIFT) / (4 * hz))) \
  126. ) >> HTCP_ALPHA_INC_SHIFT)
  127. static void htcp_ack_received(struct cc_var *ccv, uint16_t type);
  128. static void htcp_cb_destroy(struct cc_var *ccv);
  129. static int htcp_cb_init(struct cc_var *ccv);
  130. static void htcp_cong_signal(struct cc_var *ccv, uint32_t type);
  131. static int htcp_mod_init(void);
  132. static void htcp_post_recovery(struct cc_var *ccv);
  133. static void htcp_recalc_alpha(struct cc_var *ccv);
  134. static void htcp_recalc_beta(struct cc_var *ccv);
  135. static void htcp_record_rtt(struct cc_var *ccv);
  136. static void htcp_ssthresh_update(struct cc_var *ccv);
  137. struct htcp {
  138. /* cwnd before entering cong recovery. */
  139. unsigned long prev_cwnd;
  140. /* cwnd additive increase parameter. */
  141. int alpha;
  142. /* cwnd multiplicative decrease parameter. */
  143. int beta;
  144. /* Largest rtt seen for the flow. */
  145. int maxrtt;
  146. /* Shortest rtt seen for the flow. */
  147. int minrtt;
  148. /* Time of last congestion event in ticks. */
  149. int t_last_cong;
  150. };
  151. static int htcp_rtt_ref;
  152. /*
  153. * The maximum number of ticks the value of diff can reach in
  154. * htcp_recalc_alpha() before alpha will stop increasing due to overflow.
  155. * See comment above HTCP_CALC_ALPHA for more info.
  156. */
  157. static int htcp_max_diff = INT_MAX / ((1 << HTCP_ALPHA_INC_SHIFT) * 10);
  158. /* Per-netstack vars. */
  159. VNET_DEFINE_STATIC(u_int, htcp_adaptive_backoff) = 0;
  160. VNET_DEFINE_STATIC(u_int, htcp_rtt_scaling) = 0;
  161. #define V_htcp_adaptive_backoff VNET(htcp_adaptive_backoff)
  162. #define V_htcp_rtt_scaling VNET(htcp_rtt_scaling)
  163. static MALLOC_DEFINE(M_HTCP, "htcp data",
  164. "Per connection data required for the HTCP congestion control algorithm");
  165. struct cc_algo htcp_cc_algo = {
  166. .name = "htcp",
  167. .ack_received = htcp_ack_received,
  168. .cb_destroy = htcp_cb_destroy,
  169. .cb_init = htcp_cb_init,
  170. .cong_signal = htcp_cong_signal,
  171. .mod_init = htcp_mod_init,
  172. .post_recovery = htcp_post_recovery,
  173. };
  174. static void
  175. htcp_ack_received(struct cc_var *ccv, uint16_t type)
  176. {
  177. struct htcp *htcp_data;
  178. htcp_data = ccv->cc_data;
  179. htcp_record_rtt(ccv);
  180. /*
  181. * Regular ACK and we're not in cong/fast recovery and we're cwnd
  182. * limited and we're either not doing ABC or are slow starting or are
  183. * doing ABC and we've sent a cwnd's worth of bytes.
  184. */
  185. if (type == CC_ACK && !IN_RECOVERY(CCV(ccv, t_flags)) &&
  186. (ccv->flags & CCF_CWND_LIMITED) && (!V_tcp_do_rfc3465 ||
  187. CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh) ||
  188. (V_tcp_do_rfc3465 && ccv->flags & CCF_ABC_SENTAWND))) {
  189. htcp_recalc_beta(ccv);
  190. htcp_recalc_alpha(ccv);
  191. /*
  192. * Use the logic in NewReno ack_received() for slow start and
  193. * for the first HTCP_DELTA_L ticks after either the flow starts
  194. * or a congestion event (when alpha equals 1).
  195. */
  196. if (htcp_data->alpha == 1 ||
  197. CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh))
  198. newreno_cc_algo.ack_received(ccv, type);
  199. else {
  200. if (V_tcp_do_rfc3465) {
  201. /* Increment cwnd by alpha segments. */
  202. CCV(ccv, snd_cwnd) += htcp_data->alpha *
  203. CCV(ccv, t_maxseg);
  204. ccv->flags &= ~CCF_ABC_SENTAWND;
  205. } else
  206. /*
  207. * Increment cwnd by alpha/cwnd segments to
  208. * approximate an increase of alpha segments
  209. * per RTT.
  210. */
  211. CCV(ccv, snd_cwnd) += (((htcp_data->alpha <<
  212. HTCP_SHIFT) / (CCV(ccv, snd_cwnd) /
  213. CCV(ccv, t_maxseg))) * CCV(ccv, t_maxseg))
  214. >> HTCP_SHIFT;
  215. }
  216. }
  217. }
  218. static void
  219. htcp_cb_destroy(struct cc_var *ccv)
  220. {
  221. free(ccv->cc_data, M_HTCP);
  222. }
  223. static int
  224. htcp_cb_init(struct cc_var *ccv)
  225. {
  226. struct htcp *htcp_data;
  227. htcp_data = malloc(sizeof(struct htcp), M_HTCP, M_NOWAIT);
  228. if (htcp_data == NULL)
  229. return (ENOMEM);
  230. /* Init some key variables with sensible defaults. */
  231. htcp_data->alpha = HTCP_INIT_ALPHA;
  232. htcp_data->beta = HTCP_MINBETA;
  233. htcp_data->maxrtt = TCPTV_SRTTBASE;
  234. htcp_data->minrtt = TCPTV_SRTTBASE;
  235. htcp_data->prev_cwnd = 0;
  236. htcp_data->t_last_cong = ticks;
  237. ccv->cc_data = htcp_data;
  238. return (0);
  239. }
  240. /*
  241. * Perform any necessary tasks before we enter congestion recovery.
  242. */
  243. static void
  244. htcp_cong_signal(struct cc_var *ccv, uint32_t type)
  245. {
  246. struct htcp *htcp_data;
  247. u_int mss;
  248. htcp_data = ccv->cc_data;
  249. mss = tcp_maxseg(ccv->ccvc.tcp);
  250. switch (type) {
  251. case CC_NDUPACK:
  252. if (!IN_FASTRECOVERY(CCV(ccv, t_flags))) {
  253. if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) {
  254. /*
  255. * Apply hysteresis to maxrtt to ensure
  256. * reductions in the RTT are reflected in our
  257. * measurements.
  258. */
  259. htcp_data->maxrtt = (htcp_data->minrtt +
  260. (htcp_data->maxrtt - htcp_data->minrtt) *
  261. 95) / 100;
  262. htcp_ssthresh_update(ccv);
  263. htcp_data->t_last_cong = ticks;
  264. htcp_data->prev_cwnd = CCV(ccv, snd_cwnd);
  265. }
  266. ENTER_RECOVERY(CCV(ccv, t_flags));
  267. }
  268. break;
  269. case CC_ECN:
  270. if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) {
  271. /*
  272. * Apply hysteresis to maxrtt to ensure reductions in
  273. * the RTT are reflected in our measurements.
  274. */
  275. htcp_data->maxrtt = (htcp_data->minrtt + (htcp_data->maxrtt -
  276. htcp_data->minrtt) * 95) / 100;
  277. htcp_ssthresh_update(ccv);
  278. CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh);
  279. htcp_data->t_last_cong = ticks;
  280. htcp_data->prev_cwnd = CCV(ccv, snd_cwnd);
  281. ENTER_CONGRECOVERY(CCV(ccv, t_flags));
  282. }
  283. break;
  284. case CC_RTO:
  285. CCV(ccv, snd_ssthresh) = max(min(CCV(ccv, snd_wnd),
  286. CCV(ccv, snd_cwnd)) / 2 / mss,
  287. 2) * mss;
  288. CCV(ccv, snd_cwnd) = mss;
  289. /*
  290. * Grab the current time and record it so we know when the
  291. * most recent congestion event was. Only record it when the
  292. * timeout has fired more than once, as there is a reasonable
  293. * chance the first one is a false alarm and may not indicate
  294. * congestion.
  295. */
  296. if (CCV(ccv, t_rxtshift) >= 2)
  297. htcp_data->t_last_cong = ticks;
  298. break;
  299. }
  300. }
  301. static int
  302. htcp_mod_init(void)
  303. {
  304. htcp_cc_algo.after_idle = newreno_cc_algo.after_idle;
  305. /*
  306. * HTCP_RTT_REF is defined in ms, and t_srtt in the tcpcb is stored in
  307. * units of TCP_RTT_SCALE*hz. Scale HTCP_RTT_REF to be in the same units
  308. * as t_srtt.
  309. */
  310. htcp_rtt_ref = (HTCP_RTT_REF * TCP_RTT_SCALE * hz) / 1000;
  311. return (0);
  312. }
  313. /*
  314. * Perform any necessary tasks before we exit congestion recovery.
  315. */
  316. static void
  317. htcp_post_recovery(struct cc_var *ccv)
  318. {
  319. int pipe;
  320. struct htcp *htcp_data;
  321. pipe = 0;
  322. htcp_data = ccv->cc_data;
  323. if (IN_FASTRECOVERY(CCV(ccv, t_flags))) {
  324. /*
  325. * If inflight data is less than ssthresh, set cwnd
  326. * conservatively to avoid a burst of data, as suggested in the
  327. * NewReno RFC. Otherwise, use the HTCP method.
  328. *
  329. * XXXLAS: Find a way to do this without needing curack
  330. */
  331. if (V_tcp_do_rfc6675_pipe)
  332. pipe = tcp_compute_pipe(ccv->ccvc.tcp);
  333. else
  334. pipe = CCV(ccv, snd_max) - ccv->curack;
  335. if (pipe < CCV(ccv, snd_ssthresh))
  336. /*
  337. * Ensure that cwnd down not collape to 1 MSS under
  338. * adverse conditions. Implements RFC6582
  339. */
  340. CCV(ccv, snd_cwnd) = max(pipe, CCV(ccv, t_maxseg)) +
  341. CCV(ccv, t_maxseg);
  342. else
  343. CCV(ccv, snd_cwnd) = max(1, ((htcp_data->beta *
  344. htcp_data->prev_cwnd / CCV(ccv, t_maxseg))
  345. >> HTCP_SHIFT)) * CCV(ccv, t_maxseg);
  346. }
  347. }
  348. static void
  349. htcp_recalc_alpha(struct cc_var *ccv)
  350. {
  351. struct htcp *htcp_data;
  352. int alpha, diff, now;
  353. htcp_data = ccv->cc_data;
  354. now = ticks;
  355. /*
  356. * If ticks has wrapped around (will happen approximately once every 49
  357. * days on a machine with the default kern.hz=1000) and a flow straddles
  358. * the wrap point, our alpha calcs will be completely wrong. We cut our
  359. * losses and restart alpha from scratch by setting t_last_cong = now -
  360. * HTCP_DELTA_L.
  361. *
  362. * This does not deflate our cwnd at all. It simply slows the rate cwnd
  363. * is growing by until alpha regains the value it held prior to taking
  364. * this drastic measure.
  365. */
  366. if (now < htcp_data->t_last_cong)
  367. htcp_data->t_last_cong = now - HTCP_DELTA_L;
  368. diff = now - htcp_data->t_last_cong - HTCP_DELTA_L;
  369. /* Cap alpha if the value of diff would overflow HTCP_CALC_ALPHA(). */
  370. if (diff < htcp_max_diff) {
  371. /*
  372. * If it has been more than HTCP_DELTA_L ticks since congestion,
  373. * increase alpha according to the function defined in the spec.
  374. */
  375. if (diff > 0) {
  376. alpha = HTCP_CALC_ALPHA(diff);
  377. /*
  378. * Adaptive backoff fairness adjustment:
  379. * 2 * (1 - beta) * alpha_raw
  380. */
  381. if (V_htcp_adaptive_backoff)
  382. alpha = max(1, (2 * ((1 << HTCP_SHIFT) -
  383. htcp_data->beta) * alpha) >> HTCP_SHIFT);
  384. /*
  385. * RTT scaling: (RTT / RTT_ref) * alpha
  386. * alpha will be the raw value from HTCP_CALC_ALPHA() if
  387. * adaptive backoff is off, or the adjusted value if
  388. * adaptive backoff is on.
  389. */
  390. if (V_htcp_rtt_scaling)
  391. alpha = max(1, (min(max(HTCP_MINROWE,
  392. (CCV(ccv, t_srtt) << HTCP_SHIFT) /
  393. htcp_rtt_ref), HTCP_MAXROWE) * alpha)
  394. >> HTCP_SHIFT);
  395. } else
  396. alpha = 1;
  397. htcp_data->alpha = alpha;
  398. }
  399. }
  400. static void
  401. htcp_recalc_beta(struct cc_var *ccv)
  402. {
  403. struct htcp *htcp_data;
  404. htcp_data = ccv->cc_data;
  405. /*
  406. * TCPTV_SRTTBASE is the initialised value of each connection's SRTT, so
  407. * we only calc beta if the connection's SRTT has been changed from its
  408. * initial value. beta is bounded to ensure it is always between
  409. * HTCP_MINBETA and HTCP_MAXBETA.
  410. */
  411. if (V_htcp_adaptive_backoff && htcp_data->minrtt != TCPTV_SRTTBASE &&
  412. htcp_data->maxrtt != TCPTV_SRTTBASE)
  413. htcp_data->beta = min(max(HTCP_MINBETA,
  414. (htcp_data->minrtt << HTCP_SHIFT) / htcp_data->maxrtt),
  415. HTCP_MAXBETA);
  416. else
  417. htcp_data->beta = HTCP_MINBETA;
  418. }
  419. /*
  420. * Record the minimum and maximum RTT seen for the connection. These are used in
  421. * the calculation of beta if adaptive backoff is enabled.
  422. */
  423. static void
  424. htcp_record_rtt(struct cc_var *ccv)
  425. {
  426. struct htcp *htcp_data;
  427. htcp_data = ccv->cc_data;
  428. /* XXXLAS: Should there be some hysteresis for minrtt? */
  429. /*
  430. * Record the current SRTT as our minrtt if it's the smallest we've seen
  431. * or minrtt is currently equal to its initialised value. Ignore SRTT
  432. * until a min number of samples have been taken.
  433. */
  434. if ((CCV(ccv, t_srtt) < htcp_data->minrtt ||
  435. htcp_data->minrtt == TCPTV_SRTTBASE) &&
  436. (CCV(ccv, t_rttupdated) >= HTCP_MIN_RTT_SAMPLES))
  437. htcp_data->minrtt = CCV(ccv, t_srtt);
  438. /*
  439. * Record the current SRTT as our maxrtt if it's the largest we've
  440. * seen. Ignore SRTT until a min number of samples have been taken.
  441. */
  442. if (CCV(ccv, t_srtt) > htcp_data->maxrtt
  443. && CCV(ccv, t_rttupdated) >= HTCP_MIN_RTT_SAMPLES)
  444. htcp_data->maxrtt = CCV(ccv, t_srtt);
  445. }
  446. /*
  447. * Update the ssthresh in the event of congestion.
  448. */
  449. static void
  450. htcp_ssthresh_update(struct cc_var *ccv)
  451. {
  452. struct htcp *htcp_data;
  453. htcp_data = ccv->cc_data;
  454. /*
  455. * On the first congestion event, set ssthresh to cwnd * 0.5, on
  456. * subsequent congestion events, set it to cwnd * beta.
  457. */
  458. if (CCV(ccv, snd_ssthresh) == TCP_MAXWIN << TCP_MAX_WINSHIFT)
  459. CCV(ccv, snd_ssthresh) = ((u_long)CCV(ccv, snd_cwnd) *
  460. HTCP_MINBETA) >> HTCP_SHIFT;
  461. else {
  462. htcp_recalc_beta(ccv);
  463. CCV(ccv, snd_ssthresh) = ((u_long)CCV(ccv, snd_cwnd) *
  464. htcp_data->beta) >> HTCP_SHIFT;
  465. }
  466. }
  467. SYSCTL_DECL(_net_inet_tcp_cc_htcp);
  468. SYSCTL_NODE(_net_inet_tcp_cc, OID_AUTO, htcp, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL,
  469. "H-TCP related settings");
  470. SYSCTL_UINT(_net_inet_tcp_cc_htcp, OID_AUTO, adaptive_backoff,
  471. CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(htcp_adaptive_backoff), 0,
  472. "enable H-TCP adaptive backoff");
  473. SYSCTL_UINT(_net_inet_tcp_cc_htcp, OID_AUTO, rtt_scaling,
  474. CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(htcp_rtt_scaling), 0,
  475. "enable H-TCP RTT scaling");
  476. DECLARE_CC_MODULE(htcp, &htcp_cc_algo);
  477. MODULE_VERSION(htcp, 1);