From: Gerrit Renker <gerrit@erg.abdn.ac.uk> To: acme@ghostprotocols.net Cc: dccp@vger.kernel.org, netdev@vger.kernel.org Subject: [RFC] [Patch 3/4] dccp: Add unregister function Date: Sat, 20 Dec 2008 09:08:21 +0100 [thread overview] Message-ID: <20081220080821.GD3853@gerrit.erg.abdn.ac.uk> (raw) In-Reply-To: 20081218.222842.174783235.davem@davemloft.net dccp: Add unregister function This adds an unregister function to facilitate unloading the DCCP module. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> --- net/dccp/ccid.h | 3 ++- net/dccp/ccid.c | 48 +++++++++++++++++++++++++++--------------------- net/dccp/proto.c | 3 ++- 3 files changed, 31 insertions(+), 23 deletions(-) --- a/net/dccp/ccid.h +++ b/net/dccp/ccid.h @@ -91,7 +91,8 @@ extern struct ccid_operations ccid2_ops; extern struct ccid_operations ccid3_ops; #endif -extern int ccids_register_builtins(void); +extern int ccid_register_builtins(void); +extern void ccid_unregister_builtins(void); struct ccid { struct ccid_operations *ccid_ops; --- a/net/dccp/ccid.c +++ b/net/dccp/ccid.c @@ -123,7 +123,7 @@ static int ccid_register(struct ccid_ope return 0; } -static int ccid_unregister(struct ccid_operations *ccid_ops) +static void ccid_unregister(struct ccid_operations *ccid_ops) { ccid_kmem_cache_destroy(ccid_ops->ccid_hc_tx_slab); ccid_ops->ccid_hc_tx_slab = NULL; @@ -132,28 +132,8 @@ static int ccid_unregister(struct ccid_o pr_info("CCID: Unregistered CCID %d (%s)\n", ccid_ops->ccid_id, ccid_ops->ccid_name); - return 0; -} - -int ccids_register_builtins(void) -{ - int i, err; - - for (i = 0; i < ARRAY_SIZE(ccids); i++) { - err = ccid_register(ccids[i]); - if (err) - goto unwind_registrations; - } - - return 0; - -unwind_registrations: - while(--i >= 0) - ccid_unregister(ccids[i]); - return err; } - static struct ccid_operations *ccid_find_by_id(const u8 id) { int i; @@ -231,3 +211,29 @@ void ccid_hc_tx_delete(struct ccid *ccid } EXPORT_SYMBOL_GPL(ccid_hc_tx_delete); + +int __init ccid_register_builtins(void) +{ + int i, err; + + for (i = 0; i < ARRAY_SIZE(ccids); i++) { + err = ccid_register(ccids[i]); + if (err) + goto unwind_registrations; + } + + return 0; + +unwind_registrations: + while(--i >= 0) + ccid_unregister(ccids[i]); + return err; +} + +void ccid_unregister_builtins(void) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(ccids); i++) + ccid_unregister(ccids[i]); +} --- a/net/dccp/proto.c +++ b/net/dccp/proto.c @@ -1119,7 +1119,7 @@ static int __init dccp_init(void) if (rc) goto out_ackvec_exit; - rc = ccids_register_builtins(); + rc = ccid_register_builtins(); if (rc) goto out_sysctl_exit; @@ -1148,6 +1148,7 @@ out_free_bind_bucket_cachep: static void __exit dccp_fini(void) { + ccid_unregister_builtins(); dccp_mib_exit(); free_pages((unsigned long)dccp_hashinfo.bhash, get_order(dccp_hashinfo.bhash_size *
WARNING: multiple messages have this Message-ID (diff)
From: Gerrit Renker <gerrit@erg.abdn.ac.uk> To: dccp@vger.kernel.org Subject: [RFC] [Patch 3/4] dccp: Add unregister function Date: Sat, 20 Dec 2008 08:08:21 +0000 [thread overview] Message-ID: <20081220080821.GD3853@gerrit.erg.abdn.ac.uk> (raw) dccp: Add unregister function This adds an unregister function to facilitate unloading the DCCP module. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> --- net/dccp/ccid.h | 3 ++- net/dccp/ccid.c | 48 +++++++++++++++++++++++++++--------------------- net/dccp/proto.c | 3 ++- 3 files changed, 31 insertions(+), 23 deletions(-) --- a/net/dccp/ccid.h +++ b/net/dccp/ccid.h @@ -91,7 +91,8 @@ extern struct ccid_operations ccid2_ops; extern struct ccid_operations ccid3_ops; #endif -extern int ccids_register_builtins(void); +extern int ccid_register_builtins(void); +extern void ccid_unregister_builtins(void); struct ccid { struct ccid_operations *ccid_ops; --- a/net/dccp/ccid.c +++ b/net/dccp/ccid.c @@ -123,7 +123,7 @@ static int ccid_register(struct ccid_ope return 0; } -static int ccid_unregister(struct ccid_operations *ccid_ops) +static void ccid_unregister(struct ccid_operations *ccid_ops) { ccid_kmem_cache_destroy(ccid_ops->ccid_hc_tx_slab); ccid_ops->ccid_hc_tx_slab = NULL; @@ -132,28 +132,8 @@ static int ccid_unregister(struct ccid_o pr_info("CCID: Unregistered CCID %d (%s)\n", ccid_ops->ccid_id, ccid_ops->ccid_name); - return 0; -} - -int ccids_register_builtins(void) -{ - int i, err; - - for (i = 0; i < ARRAY_SIZE(ccids); i++) { - err = ccid_register(ccids[i]); - if (err) - goto unwind_registrations; - } - - return 0; - -unwind_registrations: - while(--i >= 0) - ccid_unregister(ccids[i]); - return err; } - static struct ccid_operations *ccid_find_by_id(const u8 id) { int i; @@ -231,3 +211,29 @@ void ccid_hc_tx_delete(struct ccid *ccid } EXPORT_SYMBOL_GPL(ccid_hc_tx_delete); + +int __init ccid_register_builtins(void) +{ + int i, err; + + for (i = 0; i < ARRAY_SIZE(ccids); i++) { + err = ccid_register(ccids[i]); + if (err) + goto unwind_registrations; + } + + return 0; + +unwind_registrations: + while(--i >= 0) + ccid_unregister(ccids[i]); + return err; +} + +void ccid_unregister_builtins(void) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(ccids); i++) + ccid_unregister(ccids[i]); +} --- a/net/dccp/proto.c +++ b/net/dccp/proto.c @@ -1119,7 +1119,7 @@ static int __init dccp_init(void) if (rc) goto out_ackvec_exit; - rc = ccids_register_builtins(); + rc = ccid_register_builtins(); if (rc) goto out_sysctl_exit; @@ -1148,6 +1148,7 @@ out_free_bind_bucket_cachep: static void __exit dccp_fini(void) { + ccid_unregister_builtins(); dccp_mib_exit(); free_pages((unsigned long)dccp_hashinfo.bhash, get_order(dccp_hashinfo.bhash_size *
next prev parent reply other threads:[~2008-12-20 8:08 UTC|newest] Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-12-17 21:46 [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation Arnaldo Carvalho de Melo 2008-12-17 21:46 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Arnaldo Carvalho de Melo 2008-12-18 5:21 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation David Miller 2008-12-18 5:21 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: David Miller 2008-12-18 5:33 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation Gerrit Renker 2008-12-18 5:33 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Gerrit Renker 2008-12-19 3:15 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation David Miller 2008-12-19 3:15 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: David Miller 2008-12-19 5:24 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation Gerrit Renker 2008-12-19 5:24 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Gerrit Renker 2008-12-19 6:28 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation David Miller 2008-12-19 6:28 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: David Miller 2008-12-19 7:56 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation gerrit 2008-12-19 7:56 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: gerrit 2008-12-20 23:51 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation Arnaldo Carvalho de Melo 2008-12-20 23:51 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Arnaldo Carvalho de Melo 2008-12-20 8:08 ` [RFC] [Patch 0/4] dccp: Working prototype of integrating the modules Gerrit Renker 2008-12-20 8:08 ` [RFC] [Patch 0/4] dccp: Working prototype of integrating the Gerrit Renker 2008-12-20 8:08 ` [RFC] [Patch 1/4] dccp: Remove old CCID-module references Gerrit Renker 2008-12-20 8:08 ` Gerrit Renker 2008-12-20 8:08 ` [RFC] [Patch 2/4] dccp: Lockless use of CCID blocks Gerrit Renker 2008-12-20 8:08 ` Gerrit Renker 2008-12-21 0:32 ` Arnaldo Carvalho de Melo 2008-12-21 0:32 ` Arnaldo Carvalho de Melo 2008-12-23 17:08 ` Gerrit Renker 2008-12-23 17:08 ` Gerrit Renker 2008-12-23 17:17 ` Gerrit Renker 2008-12-23 17:17 ` Gerrit Renker 2009-01-01 10:49 ` Gerrit Renker 2009-01-01 10:49 ` Gerrit Renker 2009-01-03 7:30 ` [Patch 0/3] " Gerrit Renker 2009-01-03 7:30 ` Gerrit Renker 2009-01-03 7:30 ` [PATCH 1/3] dccp: Lockless integration of CCID congestion-control plugins Gerrit Renker 2009-01-03 7:30 ` Gerrit Renker 2009-01-03 7:30 ` [PATCH 2/3] dccp: Clean up ccid.c after integration of CCID plugins Gerrit Renker 2009-01-03 7:30 ` Gerrit Renker 2009-01-03 7:30 ` [PATCH 3/3] dccp: Integrate the TFRC library with DCCP Gerrit Renker 2009-01-03 7:30 ` Gerrit Renker 2009-01-05 5:46 ` David Miller 2009-01-05 5:46 ` David Miller 2009-01-17 9:36 ` [PATCH 0/4] dccp: Completing feature negotiation Gerrit Renker 2009-01-17 9:36 ` Gerrit Renker 2009-01-17 9:36 ` [PATCH 1/4] dccp: Initialisation framework for " Gerrit Renker 2009-01-17 9:36 ` Gerrit Renker 2009-01-17 9:36 ` [PATCH 2/4] dccp: Implement both feature-local and feature-remote Sequence Window feature Gerrit Renker 2009-01-17 9:36 ` Gerrit Renker 2009-01-17 9:36 ` [PATCH 3/4] dccp: Initialisation and type-checking of feature sysctls Gerrit Renker 2009-01-17 9:36 ` Gerrit Renker 2009-01-17 9:36 ` [PATCH 4/4] dccp: Debugging functions for feature negotiation Gerrit Renker 2009-01-17 9:36 ` Gerrit Renker 2009-01-19 5:40 ` David Miller 2009-01-19 5:40 ` David Miller 2009-01-19 5:40 ` [PATCH 3/4] dccp: Initialisation and type-checking of feature sysctls David Miller 2009-01-19 5:40 ` [PATCH 3/4] dccp: Initialisation and type-checking of feature David Miller 2009-01-19 5:40 ` [PATCH 2/4] dccp: Implement both feature-local and feature-remote Sequence Window feature David Miller 2009-01-19 5:40 ` [PATCH 2/4] dccp: Implement both feature-local and David Miller 2009-01-19 5:39 ` [PATCH 1/4] dccp: Initialisation framework for feature negotiation David Miller 2009-01-19 5:39 ` [PATCH 1/4] dccp: Initialisation framework for feature David Miller 2009-01-05 5:46 ` [PATCH 2/3] dccp: Clean up ccid.c after integration of CCID plugins David Miller 2009-01-05 5:46 ` [PATCH 2/3] dccp: Clean up ccid.c after integration of CCID David Miller 2009-01-05 5:45 ` [PATCH 1/3] dccp: Lockless integration of CCID congestion-control plugins David Miller 2009-01-05 5:45 ` [PATCH 1/3] dccp: Lockless integration of CCID David Miller 2008-12-20 8:08 ` Gerrit Renker [this message] 2008-12-20 8:08 ` [RFC] [Patch 3/4] dccp: Add unregister function Gerrit Renker 2008-12-21 0:35 ` Arnaldo Carvalho de Melo 2008-12-21 0:35 ` Arnaldo Carvalho de Melo 2008-12-20 8:08 ` [RFC] [Patch 4/4] dccp: Integrate the TFRC library (dependency) Gerrit Renker 2008-12-20 8:08 ` Gerrit Renker 2008-12-21 0:55 ` Arnaldo Carvalho de Melo 2008-12-21 0:55 ` Arnaldo Carvalho de Melo 2008-12-23 10:54 ` Gerrit Renker 2008-12-23 10:54 ` Gerrit Renker
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20081220080821.GD3853@gerrit.erg.abdn.ac.uk \ --to=gerrit@erg.abdn.ac.uk \ --cc=acme@ghostprotocols.net \ --cc=dccp@vger.kernel.org \ --cc=netdev@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.