lkml.org 
[lkml]   [2010]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCHv2 2/5] sctp: implement pluggable multistream scheduling
From
Signed-off-by: Yaogong Wang <ywang15@ncsu.edu>
---
net/sctp/protocol.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index d40c5cc..0121def 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1310,11 +1310,13 @@ SCTP_STATIC __init int sctp_init(void)
/* Add FCFS to sctp_sched_list */
status = sctp_register_sched(&sctp_fcfs);
if (status)
- goto err_v6_add_protocol;
+ goto err_register_sched;

status = 0;
out:
return status;
+err_register_sched:
+ sctp_v6_del_protocol();
err_v6_add_protocol:
sctp_v4_del_protocol();
err_add_protocol:
--
1.7.0.4


On Mon, Sep 13, 2010 at 9:45 AM, Vlad Yasevich
<vladislav.yasevich@hp.com> wrote:
> One small nit.
>
> On 09/11/2010 09:12 PM, Yaogong Wang wrote:
>> Implement the pluggable multistream scheduling framework.
>> Provide the default first-come-first-serve (FCFS) algorithm.
>>
>> Signed-off-by: Yaogong Wang <ywang15@ncsu.edu>
>> ---
>> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
>> index 5027b83..d40c5cc 100644
>> --- a/net/sctp/protocol.c
>> +++ b/net/sctp/protocol.c
>> @@ -1157,6 +1157,9 @@ SCTP_STATIC __init int sctp_init(void)
>>       sctp_max_instreams              = SCTP_DEFAULT_INSTREAMS;
>>       sctp_max_outstreams             = SCTP_DEFAULT_OUTSTREAMS;
>>
>> +     /* Initialize default multistream scheduling algorithm to FCFS */
>> +     sctp_default_sched_ops          = &sctp_fcfs;
>> +
>>       /* Initialize handle used for association ids. */
>>       idr_init(&sctp_assocs_id);
>>
>> @@ -1304,6 +1307,11 @@ SCTP_STATIC __init int sctp_init(void)
>>       if (status)
>>               goto err_v6_add_protocol;
>>
>> +     /* Add FCFS to sctp_sched_list */
>> +     status = sctp_register_sched(&sctp_fcfs);
>> +     if (status)
>> +             goto err_v6_add_protocol;
>> +
>
> This needs its own tag that will call sctp_v6_del_protocol().
>
> -vlad
>
>>       status = 0;
>>  out:
>>       return status;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-09-19 20:59    [W:0.049 / U:0.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site