Skip to contentSkip to conversation

: Always support Ack Vectors

PATCH NAK Gerrit Renker 3 participants 5 messages Jul 26, 2007 – Jul 29, 2007 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 4/5 : Always support Ack Vectors

[DCCP]: Always support Ack Vectors

This removes CONFIG_IP_DCCP_ACKVEC for reasons of inter-operability.

In RFC 4340 requires CCID2 as a kind of default (section 10):
"A DCCP implementation intended for general use, such as an implementation
in a general-purpose operating system kernel, SHOULD implement at least CCID 2.2

RFC 4341, section 4 says that the use of "Ack Vector is MANDATORY on CCID 2 half-connections". (This was so far ensured via Kconfig option). New connections start with CCID 2 for both endpoints [RFC 4340, sec. 10]

Taken together this indicates that Ack Vectors should not be disabled in the build process.

---
 net/dccp/Kconfig       |    3 ---
 net/dccp/Makefile      |    4 +---
 net/dccp/ackvec.h      |   49 -------------------------------------------------
 net/dccp/ccids/Kconfig |    1 -
 net/dccp/dccp.h        |    2 --
 5 files changed, 1 insertion(+), 58 deletions(-)
net/dccp/Makefile +1 -3
@@ -1,7 +1,7 @@
 obj-$(CONFIG_IP_DCCP) += dccp.o dccp_ipv4.o
 
 dccp-y := ccid.o feat.o input.o minisocks.o options.o output.o proto.o timer.o \
-	  sysctl.o
+	  sysctl.o ackvec.o
 
 dccp_ipv4-y := ipv4.o
 
@@ -9,8 +9,6 @@ dccp_ipv4-y := ipv4.o
 obj-$(subst y,$(CONFIG_IP_DCCP),$(CONFIG_IPV6)) += dccp_ipv6.o
 dccp_ipv6-y := ipv6.o
 
-dccp-$(CONFIG_IP_DCCP_ACKVEC) += ackvec.o
-
 obj-$(CONFIG_INET_DCCP_DIAG) += dccp_diag.o
 obj-$(CONFIG_NET_DCCPPROBE) += dccp_probe.o
 
net/dccp/ackvec.h +0 -49

59 lines not on this page · raw message

net/dccp/dccp.h +0 -2
@@ -400,10 +400,8 @@ static inline int dccp_ack_pending(const
 {
 	const struct dccp_sock *dp = dccp_sk(sk);
 	return dp->dccps_timestamp_echo != 0 ||
-#ifdef CONFIG_IP_DCCP_ACKVEC
 	       (dccp_msk(sk)->dccpms_send_ack_vector &&
 		dccp_ackvec_pending(dp->dccps_hc_rx_ackvec)) ||
-#endif
 	       inet_csk_ack_scheduled(sk);
 }
 
net/dccp/ccids/Kconfig +0 -1
@@ -5,7 +5,6 @@ config IP_DCCP_CCID2
 	tristate "CCID2 (TCP-Like) (EXPERIMENTAL)"
 	depends on IP_DCCP
 	def_tristate IP_DCCP
-	select IP_DCCP_ACKVEC
 	---help---
 	  CCID 2, TCP-like Congestion Control, denotes Additive Increase,
 	  Multiplicative Decrease (AIMD) congestion control with behavior
net/dccp/Kconfig +0 -3
@@ -24,9 +24,6 @@ config INET_DCCP_DIAG
 	def_tristate y if (IP_DCCP = y && INET_DIAG = y)
 	def_tristate m
 
-config IP_DCCP_ACKVEC
-	bool
-
 source "net/dccp/ccids/Kconfig"
 
 menu "DCCP Kernel Hacking"
#1 lore raw
Quoted 8 lines · Gerrit Renker

[DCCP]: Always support Ack Vectors

This removes CONFIG_IP_DCCP_ACKVEC for reasons of inter-operability.

In RFC 4340 requires CCID2 as a kind of default (section 10):
"A DCCP implementation intended for general use, such as an implementation
in a general-purpose operating system kernel, SHOULD implement at least CCID 2.2

Quoted 7 lines

RFC 4341, section 4 says that the use of "Ack Vector is MANDATORY on CCID 2 half-connections". (This was so far ensured via Kconfig option). New connections start with CCID 2 for both endpoints [RFC 4340, sec. 10]

Taken together this indicates that Ack Vectors should not be disabled in the build process.

NAK.

Only CCID2 needs Ack vectors, CCID3 doesn't.

If we're going to tidy this up the code should be conditional on CCID2. As I read this you're making it conditional on DCCP.

While we're at, we should turn ack vectors off by default for CCID3 (if they're built) and on for CCID2.

If you want me to come up with an alternative patch, please tell me.

Ian

Signature · 3 lines
Web1: http://wand.net.nz/~iam4/
Web2: http://www.jandi.co.nz
Blog: http://iansblog.jandi.co.nz
#2 lore raw
In reply to Gerrit Renker

Quoting Ian McDonald:

|  > [DCCP]: Always support Ack Vectors
|  >
|  > This removes CONFIG_IP_DCCP_ACKVEC for reasons of inter-operability.
|  >
|  > In RFC 4340 requires CCID2 as a kind of default (section 10):
|  >  "A DCCP implementation intended for general use, such as an implementation
|  >   in a general-purpose operating system kernel, SHOULD implement at least CCID 2.2
|  >
|  > RFC 4341, section 4 says that the use of "Ack Vector is MANDATORY on CCID 2 half-connections".
|  > (This was so far ensured via Kconfig option). New connections start with CCID 2 for both
|  > endpoints [RFC 4340, sec. 10]
|  >
|  > Taken together this indicates that Ack Vectors should not be disabled in the build process.
|  >
|  > Signed-off-by: Gerrit Renker <[email protected]>
|  
|  NAK.
|  
|  Only CCID2 needs Ack vectors, CCID3 doesn't.
|

This is not so much about which CCID needs but about a minimally-compliant implementation in terms of compile-time options. The point that I wanted to make is the following:

DCCP mandates a `minimum implementation' = CCID2
=> CCID2 mandates Ack Vectors
=> Ack Vectors are not optional but mandatory

|  If we're going to tidy this up the code should be conditional on
|  CCID2. As I read this you're making it conditional on DCCP.

Hm maybe that is your point - I have just checked, one can actually still disable CCID2 in Kconfig
- did you mean that? In any case, using DCCP entirely without CCIDs is pointless, it will simply not work. And this is a bug - a user who disables both CCIDs ends up with a DCCP stack which will simply not work (there is no `null' CCID).
Using CCID3 only, on the other hand, does not agree with the RFC4340 idea of an implementation which minimally speaks CCID2.

I think your point is valid, from my perspective the best thing seems to remove CCID2 from the optional state in Kconfig and make it a fixed default.

The other point you are raising is about _setting_ (as opposed to compiling) the CCIDs, and here I agree, more work can be done.

|  While we're at, we should turn ack vectors off by default for CCID3
|  (if they're built) and on for CCID2.

That is a good point and definitively something to add when we have discussed what and how this patch should be realised.

| If you want me to come up with an alternative patch, please tell me.
Please do - it can only be good to discuss the different ideas, and maybe we can come up with an even better solution.

#3 lore raw
In reply to Gerrit Renker
Quoted 21 lines · Gerrit Renker

Quoting Ian McDonald:

|  > [DCCP]: Always support Ack Vectors
|  >
|  > This removes CONFIG_IP_DCCP_ACKVEC for reasons of inter-operability.
|  >
|  > In RFC 4340 requires CCID2 as a kind of default (section 10):
|  > "A DCCP implementation intended for general use, such as an implementation
|  > in a general-purpose operating system kernel, SHOULD implement at least CCID 2.2
|  >
|  > RFC 4341, section 4 says that the use of "Ack Vector is MANDATORY on CCID 2 half-connections".
|  > (This was so far ensured via Kconfig option). New connections start with CCID 2 for both
|  > endpoints [RFC 4340, sec. 10]
|  >
|  > Taken together this indicates that Ack Vectors should not be disabled in the build process.
|  >
|  > Signed-off-by: Gerrit Renker <[email protected]>
|
|  NAK.
|
|  Only CCID2 needs Ack vectors, CCID3 doesn't.
|
Quoted 6 lines

This is not so much about which CCID needs but about a minimally-compliant implementation in terms of compile-time options. The point that I wanted to make is the following:

DCCP mandates a `minimum implementation' = CCID2
=> CCID2 mandates Ack Vectors
=> Ack Vectors are not optional but mandatory

Its useful for debugging, reducing the complexity by disabling this feature.

It is possible to build a kernel without CCID2, and thus without Ack vectors, so I'd prefer to leave it as is.

The major Linux OS vendors would always enable CCID2 and its requirement, ACK vectors, to be standards compliant, of course.

- Arnaldo

#4 lore raw
In reply to Gerrit Renker
|  >  DCCP mandates a `minimum implementation' = CCID2
|  >      ==> CCID2 mandates Ack Vectors
|  >      ==> Ack Vectors are not optional but mandatory
|  
|  Its useful for debugging, reducing the complexity by disabling this feature.
|  
|  It is possible to build a kernel without CCID2, and thus without Ack
|  vectors, so I'd prefer to leave it as is.
|  
|  The major Linux OS vendors would always enable CCID2 and its
|  requirement, ACK vectors, to be standards compliant, of course.

I am not very fussy about this, especially since it is a case of "if it ain't broke, don't fix it". You wrote most of this, if you think that it is useful to keep, then I suggest to drop this subject (which means that I will bin the two patches I had constructed, one to make CCID2 default, the other this one).
And I am more than happy to drop this, so as to focus on more important issues.

I have just two comments:

1. It is possible to disable both CCIDs, in this case sockets can not be created (returns ENOMEM). Attached is - for `fun', but really not for consideration - a patch with a Null-CCID. Gives incredible performance, but no congestion control.

2. Ian suggested to auto-disable Ack Vectors when CCID3 is loaded. There is an ugly problem here, I faced the same issue when working on the per-CCID MPS-settings (the FIXME which talks to the CCID infrastructure):
* the spec and the code allow to have different CCIDs for forward and return path;
* this is foremost a theoretical thing - it is like having e.g. TCP Reno for the data and TCP Hybla for the Acks that come back;
* but the practical implementation causes no end of headaches:
- With regard to Ian's suggestion, Ack Vectors must be enabled if at least one CCID is CCID2.
- If CCID2 talks to CCID3 then CCID2 will want to have its Ack Vectors from the CCID3 peer. However, there is no CCID3 code to support Ack Vectors at the moment (and in the spec this is only implicit).
- If CCID3 talks to CCID2 then CCID3 will want its X_recv and loss rate from the CCID2 peer. But how? CCID2 doesn't know these things.

=> Hence can we ditch these headache cases? I don't think that having CCID2 and CCID3 enabled on
different paths of the same connection has more than theoretical relevance. Someone wanting to try both CCID2 and CCID3 can do this better by opening two separate sockets/connections. I think keeping this possibility open is of course a theoretical challenge, but it serves no real practical purpose. What do you think - would you be ok disabling it and thus have clearer and more predictable practical runtime conditions?
It would make Ian's suggestion and the work on the per-CCID MPS calculations much clearer.

Gerrit

[DCCP]: Use a NULL CCID module as fallback

Currently DCCP will not work when a user disables both of the available CCID modules. To avoid this dependency-based failure, this patch suggests
- for discussion only - a NULL congestion control module which patches traffic through without any shaping at all.

Note: If the user so wishes, it is possible to operate this module with
Ack Vectors enabled. But it is indeed quite pointless.

---
 include/linux/dccp.h    |    3 ++-
 net/dccp/ccids/Makefile |    3 +++
 net/dccp/ccids/ccid0.c  |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 1 deletion(-)
include/linux/dccp.h +2 -1
@@ -171,6 +171,7 @@ enum {
 
 /* DCCP CCIDS */
 enum {
+	DCCPC_CCID_NONE = 0,
 	DCCPC_CCID2 = 2,
 	DCCPC_CCID3 = 3,
 };
@@ -360,7 +361,7 @@ static inline unsigned int dccp_hdr_len(
 /* initial values for each feature */
 #define DCCPF_INITIAL_SEQUENCE_WINDOW		100
 #define DCCPF_INITIAL_ACK_RATIO			2
-#define DCCPF_INITIAL_CCID			DCCPC_CCID2
+#define DCCPF_INITIAL_CCID			DCCPC_CCID_NONE
 #define DCCPF_INITIAL_SEND_ACK_VECTOR		1
 /* FIXME: for now we're default to 1 but it should really be 0 */
 #define DCCPF_INITIAL_SEND_NDP_COUNT		1
net/dccp/ccids/Makefile +3 -0
@@ -1,3 +1,6 @@
+obj-$(CONFIG_IP_DCCP)       += dccp_ccid0.o
+dccp_ccid0-y := ccid0.o
+
 obj-$(CONFIG_IP_DCCP_CCID3) += dccp_ccid3.o
 
 dccp_ccid3-y := ccid3.o
net/dccp/ccids/ccid0.c new file +46 -0

46 lines not on this page · raw message