ccid2.c (58e16d792a6a8c6b750f637a4649967fcac853dc) ccid2.c (0b609b557516b5149d5b477745d608d4a4bfee5b)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) 2005, 2006 Andrea Bittau <a.bittau@cs.ucl.ac.uk>
4 *
5 * Changes to meet Linux coding standards, and DCCP infrastructure fixes.
6 *
7 * Copyright (c) 2006 Arnaldo Carvalho de Melo <acme@conectiva.com.br>
8 */

--- 167 unchanged lines hidden (view full) ---

176 * Congestion window validation (RFC 2861).
177 */
178static bool ccid2_do_cwv = true;
179module_param(ccid2_do_cwv, bool, 0644);
180MODULE_PARM_DESC(ccid2_do_cwv, "Perform RFC2861 Congestion Window Validation");
181
182/**
183 * ccid2_update_used_window - Track how much of cwnd is actually used
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) 2005, 2006 Andrea Bittau <a.bittau@cs.ucl.ac.uk>
4 *
5 * Changes to meet Linux coding standards, and DCCP infrastructure fixes.
6 *
7 * Copyright (c) 2006 Arnaldo Carvalho de Melo <acme@conectiva.com.br>
8 */

--- 167 unchanged lines hidden (view full) ---

176 * Congestion window validation (RFC 2861).
177 */
178static bool ccid2_do_cwv = true;
179module_param(ccid2_do_cwv, bool, 0644);
180MODULE_PARM_DESC(ccid2_do_cwv, "Perform RFC2861 Congestion Window Validation");
181
182/**
183 * ccid2_update_used_window - Track how much of cwnd is actually used
184 * @hc: socket to update window
185 * @new_wnd: new window values to add into the filter
186 *
184 * This is done in addition to CWV. The sender needs to have an idea of how many
185 * packets may be in flight, to set the local Sequence Window value accordingly
186 * (RFC 4340, 7.5.2). The CWV mechanism is exploited to keep track of the
187 * maximum-used window. We use an EWMA low-pass filter to filter out noise.
188 */
189static void ccid2_update_used_window(struct ccid2_hc_tx_sock *hc, u32 new_wnd)
190{
191 hc->tx_expected_wnd = (3 * hc->tx_expected_wnd + new_wnd) / 4;

--- 152 unchanged lines hidden (view full) ---

344 }
345 } while (0);
346 ccid2_pr_debug("=========\n");
347#endif
348}
349
350/**
351 * ccid2_rtt_estimator - Sample RTT and compute RTO using RFC2988 algorithm
187 * This is done in addition to CWV. The sender needs to have an idea of how many
188 * packets may be in flight, to set the local Sequence Window value accordingly
189 * (RFC 4340, 7.5.2). The CWV mechanism is exploited to keep track of the
190 * maximum-used window. We use an EWMA low-pass filter to filter out noise.
191 */
192static void ccid2_update_used_window(struct ccid2_hc_tx_sock *hc, u32 new_wnd)
193{
194 hc->tx_expected_wnd = (3 * hc->tx_expected_wnd + new_wnd) / 4;

--- 152 unchanged lines hidden (view full) ---

347 }
348 } while (0);
349 ccid2_pr_debug("=========\n");
350#endif
351}
352
353/**
354 * ccid2_rtt_estimator - Sample RTT and compute RTO using RFC2988 algorithm
355 * @sk: socket to perform estimator on
356 *
352 * This code is almost identical with TCP's tcp_rtt_estimator(), since
353 * - it has a higher sampling frequency (recommended by RFC 1323),
354 * - the RTO does not collapse into RTT due to RTTVAR going towards zero,
355 * - it is simple (cf. more complex proposals such as Eifel timer or research
356 * which suggests that the gain should be set according to window size),
357 * - in tests it was found to work well with CCID2 [gerrit].
358 */
359static void ccid2_rtt_estimator(struct sock *sk, const long mrtt)

--- 429 unchanged lines hidden ---
357 * This code is almost identical with TCP's tcp_rtt_estimator(), since
358 * - it has a higher sampling frequency (recommended by RFC 1323),
359 * - the RTO does not collapse into RTT due to RTTVAR going towards zero,
360 * - it is simple (cf. more complex proposals such as Eifel timer or research
361 * which suggests that the gain should be set according to window size),
362 * - in tests it was found to work well with CCID2 [gerrit].
363 */
364static void ccid2_rtt_estimator(struct sock *sk, const long mrtt)

--- 429 unchanged lines hidden ---