Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 129fa447 authored by Gerrit Renker's avatar Gerrit Renker Committed by David S. Miller
Browse files

dccp: Integrate the TFRC library with DCCP



This patch integrates the TFRC library, which is a dependency of CCID-3 (and
CCID-4), with the new use of CCIDs in the DCCP module.		

Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e5fd56ca
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -8,6 +8,10 @@ dccp-y := ccid.o feat.o input.o minisocks.o options.o output.o proto.o timer.o
# CCID-2 is default (RFC 4340, p. 77) and has Ack Vectors as dependency
dccp-y += ccids/ccid2.o ackvec.o
dccp-$(CONFIG_IP_DCCP_CCID3)	+= ccids/ccid3.o
dccp-$(CONFIG_IP_DCCP_TFRC_LIB) += ccids/lib/tfrc.o		\
				   ccids/lib/tfrc_equation.o	\
				   ccids/lib/packet_history.o	\
				   ccids/lib/loss_interval.o

dccp_ipv4-y := ipv4.o

@@ -22,5 +26,3 @@ dccp-$(CONFIG_SYSCTL) += sysctl.o

dccp_diag-y := diag.o
dccp_probe-y := probe.o

obj-y += ccids/
+7 −1
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
 */

#include "ccid.h"
#include "ccids/lib/tfrc.h"

static struct ccid_operations *ccids[] = {
	&ccid2_ops,
@@ -199,7 +200,10 @@ void ccid_hc_tx_delete(struct ccid *ccid, struct sock *sk)

int __init ccid_initialize_builtins(void)
{
	int i, err;
	int i, err = tfrc_lib_init();

	if (err)
		return err;

	for (i = 0; i < ARRAY_SIZE(ccids); i++) {
		err = ccid_activate(ccids[i]);
@@ -211,6 +215,7 @@ int __init ccid_initialize_builtins(void)
unwind_registrations:
	while(--i >= 0)
		ccid_deactivate(ccids[i]);
	tfrc_lib_exit();
	return err;
}

@@ -220,4 +225,5 @@ void ccid_cleanup_builtins(void)

	for (i = 0; i < ARRAY_SIZE(ccids); i++)
		ccid_deactivate(ccids[i]);
	tfrc_lib_exit();
}
+2 −7
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@ config IP_DCCP_CCID2_DEBUG
config IP_DCCP_CCID3
	bool "CCID-3 (TCP-Friendly) (EXPERIMENTAL)"
	def_bool y if (IP_DCCP = y || IP_DCCP = m)
	select IP_DCCP_TFRC_LIB
	---help---
	  CCID-3 denotes TCP-Friendly Rate Control (TFRC), an equation-based
	  rate-controlled congestion control mechanism.  TFRC is designed to
@@ -80,12 +79,8 @@ config IP_DCCP_CCID3_RTO
	    therefore not be performed on WANs.

config IP_DCCP_TFRC_LIB
	tristate
	default n
	def_bool y if IP_DCCP_CCID3

config IP_DCCP_TFRC_DEBUG
	bool
	depends on IP_DCCP_TFRC_LIB
	default y if IP_DCCP_CCID3_DEBUG

	def_bool y if IP_DCCP_CCID3_DEBUG
endmenu

net/dccp/ccids/Makefile

deleted100644 → 0
+0 −1
Original line number Diff line number Diff line
obj-y += lib/

net/dccp/ccids/lib/Makefile

deleted100644 → 0
+0 −3
Original line number Diff line number Diff line
obj-$(CONFIG_IP_DCCP_TFRC_LIB) += dccp_tfrc_lib.o

dccp_tfrc_lib-y := tfrc.o tfrc_equation.o packet_history.o loss_interval.o
Loading