* [PATCHES 0/3]: DCCP patches for 2.6.25 @ 2007-12-14 1:41 Arnaldo Carvalho de Melo 2007-12-14 1:42 ` [PATCH 1/3] [DCCP]: Documentation for CCID operations Arnaldo Carvalho de Melo 2007-12-14 19:29 ` [PATCHES 0/3]: DCCP patches for 2.6.25 David Miller 0 siblings, 2 replies; 8+ messages in thread From: Arnaldo Carvalho de Melo @ 2007-12-14 1:41 UTC (permalink / raw) To: David S. Miller; +Cc: netdev, dccp 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(-) ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] [DCCP]: Documentation for CCID operations 2007-12-14 1:41 [PATCHES 0/3]: DCCP patches for 2.6.25 Arnaldo Carvalho de Melo @ 2007-12-14 1:42 ` Arnaldo Carvalho de Melo 2007-12-14 1:42 ` [PATCH 2/3] [CCID]: More informative registration Arnaldo Carvalho de Melo 2007-12-14 19:29 ` [PATCHES 0/3]: DCCP patches for 2.6.25 David Miller 1 sibling, 1 reply; 8+ messages in thread From: Arnaldo Carvalho de Melo @ 2007-12-14 1:42 UTC (permalink / raw) To: David S. Miller Cc: netdev, dccp, Gerrit Renker, Ian McDonald, Arnaldo Carvalho de Melo From: Gerrit Renker <gerrit@erg.abdn.ac.uk> This adds documentation for the ccid_operations structure. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- net/dccp/ccid.h | 35 ++++++++++++++++++++++++++++------- 1 files changed, 28 insertions(+), 7 deletions(-) diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h index c65cb24..e3cdd8a 100644 --- a/net/dccp/ccid.h +++ b/net/dccp/ccid.h @@ -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); -- 1.5.3.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] [CCID]: More informative registration 2007-12-14 1:42 ` [PATCH 1/3] [DCCP]: Documentation for CCID operations Arnaldo Carvalho de Melo @ 2007-12-14 1:42 ` Arnaldo Carvalho de Melo 2007-12-14 1:42 ` [PATCH 3/3] [DCCP]: Introducing CCMPS Arnaldo Carvalho de Melo 0 siblings, 1 reply; 8+ messages in thread From: Arnaldo Carvalho de Melo @ 2007-12-14 1:42 UTC (permalink / raw) To: David S. Miller Cc: netdev, dccp, Gerrit Renker, Ian McDonald, Arnaldo Carvalho de Melo From: Gerrit Renker <gerrit@erg.abdn.ac.uk> 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. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- net/dccp/ccid.c | 8 ++++---- net/dccp/ccids/ccid2.c | 2 +- net/dccp/ccids/ccid3.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c index c45088b..4809753 100644 --- a/net/dccp/ccid.c +++ b/net/dccp/ccid.c @@ -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; diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index 48eeb44..b5b52eb 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c @@ -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, diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index a818a1e..876c747 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c @@ -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, -- 1.5.3.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] [DCCP]: Introducing CCMPS 2007-12-14 1:42 ` [PATCH 2/3] [CCID]: More informative registration Arnaldo Carvalho de Melo @ 2007-12-14 1:42 ` Arnaldo Carvalho de Melo 0 siblings, 0 replies; 8+ messages in thread From: Arnaldo Carvalho de Melo @ 2007-12-14 1:42 UTC (permalink / raw) To: David S. Miller Cc: netdev, dccp, Gerrit Renker, Ian McDonald, Arnaldo Carvalho de Melo From: Gerrit Renker <gerrit@erg.abdn.ac.uk> 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. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- net/dccp/ccid.h | 2 ++ net/dccp/output.c | 30 +++++++++++++++++++++++------- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h index e3cdd8a..fdeae7b 100644 --- a/net/dccp/ccid.h +++ b/net/dccp/ccid.h @@ -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, diff --git a/net/dccp/output.c b/net/dccp/output.c index 5589a5e..3b763db 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c @@ -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); -- 1.5.3.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCHES 0/3]: DCCP patches for 2.6.25 2007-12-14 1:41 [PATCHES 0/3]: DCCP patches for 2.6.25 Arnaldo Carvalho de Melo 2007-12-14 1:42 ` [PATCH 1/3] [DCCP]: Documentation for CCID operations Arnaldo Carvalho de Melo @ 2007-12-14 19:29 ` David Miller 2007-12-14 21:26 ` Arnaldo Carvalho de Melo 1 sibling, 1 reply; 8+ messages in thread From: David Miller @ 2007-12-14 19:29 UTC (permalink / raw) To: acme; +Cc: netdev, dccp From: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Thu, 13 Dec 2007 23:41:59 -0200 > 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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCHES 0/3]: DCCP patches for 2.6.25 2007-12-14 19:29 ` [PATCHES 0/3]: DCCP patches for 2.6.25 David Miller @ 2007-12-14 21:26 ` Arnaldo Carvalho de Melo 0 siblings, 0 replies; 8+ messages in thread From: Arnaldo Carvalho de Melo @ 2007-12-14 21:26 UTC (permalink / raw) To: David Miller; +Cc: acme, netdev, dccp Em Fri, Dec 14, 2007 at 11:29:14AM -0800, David Miller escreveu: > From: Arnaldo Carvalho de Melo <acme@redhat.com> > Date: Thu, 13 Dec 2007 23:41:59 -0200 > > > 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. OK, will take that into account in future requests, Thanks a lot, - Arnaldo ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCHES 0/3]: DCCP patches for 2.6.25 @ 2007-12-08 18:52 Arnaldo Carvalho de Melo 2007-12-09 8:32 ` David Miller 0 siblings, 1 reply; 8+ messages in thread From: Arnaldo Carvalho de Melo @ 2007-12-08 18:52 UTC (permalink / raw) To: David S. Miller; +Cc: netdev, dccp Hi David, Please consider pulling from: master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.25 Best Regards, - Arnaldo b/net/dccp/ccids/ccid3.c | 16 ++++++++-------- b/net/dccp/ccids/lib/loss_interval.c | 2 +- b/net/dccp/ccids/lib/packet_history.c | 13 ++++++------- net/dccp/ccids/ccid3.c | 4 +--- net/dccp/ccids/lib/packet_history.c | 6 ------ 5 files changed, 16 insertions(+), 25 deletions(-) ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCHES 0/3]: DCCP patches for 2.6.25 2007-12-08 18:52 Arnaldo Carvalho de Melo @ 2007-12-09 8:32 ` David Miller 0 siblings, 0 replies; 8+ messages in thread From: David Miller @ 2007-12-09 8:32 UTC (permalink / raw) To: acme; +Cc: netdev, dccp From: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Sat, 8 Dec 2007 16:52:10 -0200 > Hi David, > > Please consider pulling from: > > master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.25 Pulled, thanks a lot. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-12-14 21:27 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-12-14 1:41 [PATCHES 0/3]: DCCP patches for 2.6.25 Arnaldo Carvalho de Melo 2007-12-14 1:42 ` [PATCH 1/3] [DCCP]: Documentation for CCID operations Arnaldo Carvalho de Melo 2007-12-14 1:42 ` [PATCH 2/3] [CCID]: More informative registration Arnaldo Carvalho de Melo 2007-12-14 1:42 ` [PATCH 3/3] [DCCP]: Introducing CCMPS Arnaldo Carvalho de Melo 2007-12-14 19:29 ` [PATCHES 0/3]: DCCP patches for 2.6.25 David Miller 2007-12-14 21:26 ` Arnaldo Carvalho de Melo -- strict thread matches above, loose matches on Subject: below -- 2007-12-08 18:52 Arnaldo Carvalho de Melo 2007-12-09 8:32 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).