: DCCP patches for 2.6.25
Subsystems (2)
cover : DCCP patches for 2.6.25
Hi David,
Please consider pulling from:
master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.25
Best Regards,
- Arnaldo
net/dccp/ccid.c | 8 ++++---- net/dccp/ccid.h | 37 ++++++++++++++++++++++++++++++------- net/dccp/ccids/ccid2.c | 2 +- net/dccp/ccids/ccid3.c | 2 +- net/dccp/output.c | 30 +++++++++++++++++++++++------- 5 files changed, 59 insertions(+), 20 deletions(-)
PATCH 1/3 : Documentation for CCID operations
From: Gerrit Renker <[email protected]>
This adds documentation for the ccid_operations structure.
--- net/dccp/ccid.h | 35 ++++++++++++++++++++++++++++------- 1 files changed, 28 insertions(+), 7 deletions(-)
net/dccp/ccid.h +28 -7
@@ -23,14 +23,35 @@struct tcp_info ; +/** +* struct ccid_operations - Interface to Congestion-Control Infrastructure +* +* @ccid_id: numerical CCID ID (up to %CCID_MAX, cf. table 5 in RFC 4340, 10.) +* @ccid_name: alphabetical identifier string for @ccid_id +* @ccid_owner: module which implements/owns this CCID +* @ccid_hc_{r,t}x_slab: memory pool for the receiver/sender half-connection +* @ccid_hc_{r,t}x_obj_size: size of the receiver/sender half-connection socket +* +* @ccid_hc_{r,t}x_init: CCID-specific initialisation routine (before startup) +* @ccid_hc_{r,t}x_exit: CCID-specific cleanup routine (before destruction) +* @ccid_hc_rx_packet_recv: implements the HC-receiver side +* @ccid_hc_{r,t}x_parse_options: parsing routine for CCID/HC-specific options +* @ccid_hc_{r,t}x_insert_options: insert routine for CCID/HC-specific options +* @ccid_hc_tx_packet_recv: implements feedback processing for the HC-sender +* @ccid_hc_tx_send_packet: implements the sending part of the HC-sender +* @ccid_hc_tx_packet_sent: does accounting for packets in flight by HC-sender +* @ccid_hc_{r,t}x_get_info: INET_DIAG information for HC-receiver/sender +* @ccid_hc_{r,t}x_getsockopt: socket options specific to HC-receiver/sender +*/ struct ccid_operations { -unsigned char ccid_id; -const char *ccid_name; -struct module *ccid_owner; -struct kmem_cache *ccid_hc_rx_slab; -__u32 ccid_hc_rx_obj_size; -struct kmem_cache *ccid_hc_tx_slab; -__u32 ccid_hc_tx_obj_size; +unsigned char ccid_id; +const char *ccid_name; +struct module *ccid_owner; +struct kmem_cache *ccid_hc_rx_slab, + *ccid_hc_tx_slab; +__u32 ccid_hc_rx_obj_size, + ccid_hc_tx_obj_size; +/* Interface Routines */ int (*ccid_hc_rx_init)(struct ccid *ccid,struct sock *sk);int (*ccid_hc_tx_init)(struct ccid *ccid,struct sock *sk);void (*ccid_hc_rx_exit)(struct sock *sk);
Signature · 1 line
1.5.3.4
PATCH 2/3 : More informative registration
From: Gerrit Renker <[email protected]>
The patch makes the registration messages of CCID 2/3 a bit more
informative: instead of repeating the CCID number as currently done,
"CCID: Registered CCID 2 (ccid2)" or
"CCID: Registered CCID 3 (ccid3)",
the descriptive names of the CCID's (from RFCs) are now used:
"CCID: Registered CCID 2 (TCP-like)" and "CCID: Registered CCID 3 (TCP-Friendly Rate Control)".
To allow spaces in the name, the slab name string has been changed to refer to the numeric CCID identifier, using the same format as before.
--- net/dccp/ccid.c | 8 ++++---- net/dccp/ccids/ccid2.c | 2 +- net/dccp/ccids/ccid3.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)
net/dccp/ccid.c +4 -4
@@ -92,15 +92,15 @@ int ccid_register(struct ccid_operations *ccid_ops) ccid_ops->ccid_hc_rx_slab ccid_kmem_cache_create(ccid_ops->ccid_hc_rx_obj_size, -"%s_hc_rx_sock" , - ccid_ops->ccid_name); +"ccid%u_hc_rx_sock" , + ccid_ops->ccid_id);if (ccid_ops->ccid_hc_rx_slab =NULL ) goto out; ccid_ops->ccid_hc_tx_slab ccid_kmem_cache_create(ccid_ops->ccid_hc_tx_obj_size, -"%s_hc_tx_sock" , - ccid_ops->ccid_name); +"ccid%u_hc_tx_sock" , + ccid_ops->ccid_id);if (ccid_ops->ccid_hc_tx_slab =NULL ) goto out_free_rx_slab;
net/dccp/ccids/ccid2.c +1 -1
@@ -770,7 +770,7 @@ static void ccid2_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)static struct ccid_operations ccid2 = { .ccid_id =DCCPC_CCID2 , - .ccid_name ="ccid2" , + .ccid_name ="TCP-like" , .ccid_owner =THIS_MODULE , .ccid_hc_tx_obj_size =sizeof (struct ccid2_hc_tx_sock ), .ccid_hc_tx_init = ccid2_hc_tx_init,
net/dccp/ccids/ccid3.c +1 -1
@@ -943,7 +943,7 @@ static int ccid3_hc_rx_getsockopt(struct sock *sk, const int optname, int len,static struct ccid_operations ccid3 = { .ccid_id =DCCPC_CCID3 , - .ccid_name ="ccid3" , + .ccid_name ="TCP-Friendly Rate Control" , .ccid_owner =THIS_MODULE , .ccid_hc_tx_obj_size =sizeof (struct ccid3_hc_tx_sock ), .ccid_hc_tx_init = ccid3_hc_tx_init,
Signature · 1 line
1.5.3.4
PATCH 3/3 : Introducing CCMPS
From: Gerrit Renker <[email protected]>
This introduces a CCMPS field for setting a CCID-specific upper bound on the application payload size, as is defined in RFC 4340, section 14.
Only the TX CCID is considered in setting this limit, since the RX CCID generates comparatively small (DCCP-Ack) feedback packets. The CCMPS field includes network and transport layer header lengths. The only current CCMPS customer is CCID4 (via RFC 4828).
A wrapper is used to allow querying the CCMPS even at times where the CCID modules may not have been fully negotiated yet.
In dccp_sync_mss() the variable mss_now' has been renamed into cur_mps', to reflect that we are dealing with an MPS, but not an MSS.
Since the DCCP code closely follows the TCP code, the identifiers dccp_sync_mss' and dccps_mss_cache' have been kept, as they have direct TCP counterparts.
--- net/dccp/ccid.h | 2 ++ net/dccp/output.c | 30 +++++++++++++++++++++++------- 2 files changed, 25 insertions(+), 7 deletions(-)
net/dccp/ccid.h +2 -0
@@ -27,6 +27,7 @@ struct tcp_info;* struct ccid_operations - Interface to Congestion-Control Infrastructure * * @ccid_id: numerical CCID ID (up to %CCID_MAX, cf. table 5 in RFC 4340, 10.) +* @ccid_ccmps: the CCMPS including network/transport headers (0 when disabled) * @ccid_name: alphabetical identifier string for @ccid_id * @ccid_owner: module which implements/owns this CCID * @ccid_hc_{r,t}x_slab: memory pool for the receiver/sender half-connection
@@ -45,6 +46,7 @@ struct tcp_info;*/ struct ccid_operations {unsigned char ccid_id; +__u32 ccid_ccmps;const char *ccid_name;struct module *ccid_owner; struct kmem_cache *ccid_hc_rx_slab,
net/dccp/output.c +23 -7
@@ -133,15 +133,31 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)return -ENOBUFS ; } +/** +* dccp_determine_ccmps - Find out about CCID-specfic packet-size limits +* We only consider the HC-sender CCID for setting the CCMPS (RFC 4340, 14.), +* since the RX CCID is restricted to feedback packets (Acks), which are small +* in comparison with the data traffic. A value of 0 means "no current CCMPS". +*/ +static u32 dccp_determine_ccmps (const struct dccp_sock *dp) +{ +const struct ccid *tx_ccid = dp->dccps_hc_tx_ccid; + +if (tx_ccid =NULL || tx_ccid->ccid_ops =NULL ) +return 0 ; +return tx_ccid->ccid_ops->ccid_ccmps; +} +unsigned int dccp_sync_mss (struct sock *sk,u32 pmtu) {struct inet_connection_sock *icsk =inet_csk (sk);struct dccp_sock *dp =dccp_sk (sk); -int mss_now = (pmtu - icsk->icsk_af_ops->net_header_len - -sizeof (struct dccp_hdr ) -sizeof (struct dccp_hdr_ext )); +u32 ccmps =dccp_determine_ccmps (dp); +int cur_mps = ccmps ?min (pmtu, ccmps) : pmtu; -/* Now subtract optional transport overhead */ - mss_now -= icsk->icsk_ext_hdr_len; +/* Account for header lengths and IPv4/v6 option overhead */ + cur_mps -= (icsk->icsk_af_ops->net_header_len + icsk->icsk_ext_hdr_len + +sizeof (struct dccp_hdr ) +sizeof (struct dccp_hdr_ext ));/* * FIXME: this should come from the CCID infrastructure, where, say,
@@ -151,13 +167,13 @@ unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu)* make it a multiple of 4 */ - mss_now -= ((5 +6 +10 +6 +6 +6 +3 ) /4 ) *4 ; + cur_mps -= ((5 +6 +10 +6 +6 +6 +3 ) /4 ) *4 ;/* And store cached results */ icsk->icsk_pmtu_cookie = pmtu; - dp->dccps_mss_cache = mss_now; + dp->dccps_mss_cache = cur_mps; -return mss_now; +return cur_mps; }EXPORT_SYMBOL_GPL (dccp_sync_mss);
Signature · 1 line
1.5.3.4
David Miller
maintainerFrom: Arnaldo Carvalho de Melo <[email protected]>
Date: Thu, 13 Dec 2007 23:41:59 -0200
Quoted 3 lines
Please consider pulling from:
master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.25
Pulled, but could you please reformat Gerrit's changelog entries in the future? They have these 80+ long lines which are painful to read in ascii email clients and in terminal output.
I'll do this by hand during my next rebase for this case, but I will push back when I see it again in future pull requests.
Em Fri, Dec 14, 2007 at 11:29:14AM -0800, David Miller escreveu:
Quoted 5 lines
From: Arnaldo Carvalho de Melo <[email protected]>
Date: Thu, 13 Dec 2007 23:41:59 -0200Quoted 2 lines
Please consider pulling from:
Quoted 8 lines
Quoted 1 line
master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.25
Pulled, but could you please reformat Gerrit's changelog entries in the future? They have these 80+ long lines which are painful to read in ascii email clients and in terminal output.
I'll do this by hand during my next rebase for this case, but I will push back when I see it again in future pull requests.
OK, will take that into account in future requests,
Thanks a lot,
- Arnaldo