Skip to content

Commit 2a91aa3

Browse files
Andrea Bittaudavem330
authored andcommitted
[DCCP] CCID2: Initial CCID2 (TCP-Like) implementation
Original work by Andrea Bittau, Arnaldo Melo cleaned up and fixed several issues on the merge process. For now CCID2 was turned the default for all SOCK_DCCP connections, but this will be remedied soon with the merge of the feature negotiation code. Signed-off-by: Andrea Bittau <a.bittau@cs.ucl.ac.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent aa5d7df commit 2a91aa3

File tree

7 files changed

+957
-6
lines changed

7 files changed

+957
-6
lines changed

include/linux/dccp.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,9 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
314314

315315
/* initial values for each feature */
316316
#define DCCPF_INITIAL_SEQUENCE_WINDOW 100
317-
/* FIXME: for now we're using CCID 3 (TFRC) */
318-
#define DCCPF_INITIAL_CCID 3
319-
#define DCCPF_INITIAL_SEND_ACK_VECTOR 0
317+
/* FIXME: for now we're using CCID 2 (TCP-Like) */
318+
#define DCCPF_INITIAL_CCID 2
319+
#define DCCPF_INITIAL_SEND_ACK_VECTOR 1
320320
/* FIXME: for now we're default to 1 but it should really be 0 */
321321
#define DCCPF_INITIAL_SEND_NDP_COUNT 1
322322

@@ -430,6 +430,8 @@ struct dccp_sock {
430430
struct timeval dccps_timestamp_time;
431431
__u32 dccps_timestamp_echo;
432432
__u32 dccps_packet_size;
433+
__u16 dccps_l_ack_ratio;
434+
__u16 dccps_r_ack_ratio;
433435
unsigned long dccps_ndp_count;
434436
__u32 dccps_mss_cache;
435437
struct dccp_options dccps_options;

net/dccp/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ config INET_DCCP_DIAG
2424
def_tristate y if (IP_DCCP = y && INET_DIAG = y)
2525
def_tristate m
2626

27+
config IP_DCCP_ACKVEC
28+
depends on IP_DCCP
29+
def_bool N
30+
2731
source "net/dccp/ccids/Kconfig"
2832

2933
menu "DCCP Kernel Hacking"

net/dccp/ccids/Kconfig

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
11
menu "DCCP CCIDs Configuration (EXPERIMENTAL)"
22
depends on IP_DCCP && EXPERIMENTAL
33

4+
config IP_DCCP_CCID2
5+
tristate "CCID2 (TCP) (EXPERIMENTAL)"
6+
depends on IP_DCCP
7+
select IP_DCCP_ACKVEC
8+
---help---
9+
CCID 2, TCP-like Congestion Control, denotes Additive Increase,
10+
Multiplicative Decrease (AIMD) congestion control with behavior
11+
modelled directly on TCP, including congestion window, slow start,
12+
timeouts, and so forth [RFC 2581]. CCID 2 achieves maximum
13+
bandwidth over the long term, consistent with the use of end-to-end
14+
congestion control, but halves its congestion window in response to
15+
each congestion event. This leads to the abrupt rate changes
16+
typical of TCP. Applications should use CCID 2 if they prefer
17+
maximum bandwidth utilization to steadiness of rate. This is often
18+
the case for applications that are not playing their data directly
19+
to the user. For example, a hypothetical application that
20+
transferred files over DCCP, using application-level retransmissions
21+
for lost packets, would prefer CCID 2 to CCID 3. On-line games may
22+
also prefer CCID 2.
23+
24+
CCID 2 is further described in:
25+
http://www.icir.org/kohler/dccp/draft-ietf-dccp-ccid2-10.txt
26+
27+
This text was extracted from:
28+
http://www.icir.org/kohler/dccp/draft-ietf-dccp-spec-13.txt
29+
30+
If in doubt, say M.
31+
432
config IP_DCCP_CCID3
533
tristate "CCID3 (TFRC) (EXPERIMENTAL)"
634
depends on IP_DCCP
@@ -15,10 +43,15 @@ config IP_DCCP_CCID3
1543
suitable than CCID 2 for applications such streaming media where a
1644
relatively smooth sending rate is of importance.
1745

18-
CCID 3 is further described in [CCID 3 PROFILE]. The TFRC
19-
congestion control algorithms were initially described in RFC 3448.
46+
CCID 3 is further described in:
47+
48+
http://www.icir.org/kohler/dccp/draft-ietf-dccp-ccid3-11.txt.
49+
50+
The TFRC congestion control algorithms were initially described in
51+
RFC 3448.
2052

21-
This text was extracted from draft-ietf-dccp-spec-11.txt.
53+
This text was extracted from:
54+
http://www.icir.org/kohler/dccp/draft-ietf-dccp-spec-13.txt
2255

2356
If in doubt, say M.
2457

net/dccp/ccids/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ obj-$(CONFIG_IP_DCCP_CCID3) += dccp_ccid3.o
22

33
dccp_ccid3-y := ccid3.o
44

5+
obj-$(CONFIG_IP_DCCP_CCID2) += dccp_ccid2.o
6+
7+
dccp_ccid2-y := ccid2.o
8+
59
obj-y += lib/

0 commit comments

Comments
 (0)