diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2009-01-05 00:42:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-05 00:42:53 -0500 |
commit | ddebc973c56b51b4e5d84d606f0430d81b895d67 (patch) | |
tree | cebe0e4461346072b2063132fc1d9cf8c3e148f1 /net/dccp/ccids/ccid3.c | |
parent | 6ea2fde13abd3444008ab5e9585f9ed249e6047e (diff) |
dccp: Lockless integration of CCID congestion-control plugins
Based on Arnaldo's earlier patch, this patch integrates the standardised
CCID congestion control plugins (CCID-2 and CCID-3) of DCCP with dccp.ko:
* enables a faster connection path by eliminating the need to always go
through the CCID registration lock;
* updates the implementation to use only a single array whose size equals
the number of configured CCIDs instead of the maximum (256);
* since the CCIDs are now fixed array elements, synchronization is no
longer needed, simplifying use and implementation.
CCID-2 is suggested as minimum for a basic DCCP implementation (RFC 4340, 10);
CCID-3 is a standards-track CCID supported by RFC 4342 and RFC 5348.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ccids/ccid3.c')
-rw-r--r-- | net/dccp/ccids/ccid3.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 3b8bd7ca6761..a27b7f4c19c5 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -940,10 +940,9 @@ static int ccid3_hc_rx_getsockopt(struct sock *sk, const int optname, int len, | |||
940 | return 0; | 940 | return 0; |
941 | } | 941 | } |
942 | 942 | ||
943 | static struct ccid_operations ccid3 = { | 943 | struct ccid_operations ccid3_ops = { |
944 | .ccid_id = DCCPC_CCID3, | 944 | .ccid_id = DCCPC_CCID3, |
945 | .ccid_name = "TCP-Friendly Rate Control", | 945 | .ccid_name = "TCP-Friendly Rate Control", |
946 | .ccid_owner = THIS_MODULE, | ||
947 | .ccid_hc_tx_obj_size = sizeof(struct ccid3_hc_tx_sock), | 946 | .ccid_hc_tx_obj_size = sizeof(struct ccid3_hc_tx_sock), |
948 | .ccid_hc_tx_init = ccid3_hc_tx_init, | 947 | .ccid_hc_tx_init = ccid3_hc_tx_init, |
949 | .ccid_hc_tx_exit = ccid3_hc_tx_exit, | 948 | .ccid_hc_tx_exit = ccid3_hc_tx_exit, |
@@ -964,23 +963,5 @@ static struct ccid_operations ccid3 = { | |||
964 | 963 | ||
965 | #ifdef CONFIG_IP_DCCP_CCID3_DEBUG | 964 | #ifdef CONFIG_IP_DCCP_CCID3_DEBUG |
966 | module_param(ccid3_debug, bool, 0644); | 965 | module_param(ccid3_debug, bool, 0644); |
967 | MODULE_PARM_DESC(ccid3_debug, "Enable debug messages"); | 966 | MODULE_PARM_DESC(ccid3_debug, "Enable CCID-3 debug messages"); |
968 | #endif | 967 | #endif |
969 | |||
970 | static __init int ccid3_module_init(void) | ||
971 | { | ||
972 | return ccid_register(&ccid3); | ||
973 | } | ||
974 | module_init(ccid3_module_init); | ||
975 | |||
976 | static __exit void ccid3_module_exit(void) | ||
977 | { | ||
978 | ccid_unregister(&ccid3); | ||
979 | } | ||
980 | module_exit(ccid3_module_exit); | ||
981 | |||
982 | MODULE_AUTHOR("Ian McDonald <ian.mcdonald@jandi.co.nz>, " | ||
983 | "Arnaldo Carvalho de Melo <acme@ghostprotocols.net>"); | ||
984 | MODULE_DESCRIPTION("DCCP TFRC CCID3 CCID"); | ||
985 | MODULE_LICENSE("GPL"); | ||
986 | MODULE_ALIAS("net-dccp-ccid-3"); | ||