Messages in this thread | | | Date | Wed, 13 Oct 2010 16:31:59 +0800 | From | Shan Wei <> | Subject | Re: [PATCHv2 3/5] sctp: extend socket API for sched configuration |
| |
Yaogong Wang wrote, at 09/12/2010 09:13 AM: > Augment SCTP socket API with a new socket option SCTP_SCHED > to choose and configure multistream scheduling algorithm. > > Signed-off-by: Yaogong Wang <ywang15@ncsu.edu> > --- > include/net/sctp/structs.h | 4 ++ > include/net/sctp/user.h | 19 ++++++++++ > net/sctp/outqueue.c | 4 ++ > net/sctp/sm_sideeffect.c | 45 +++++++++++++++++++++++-- > net/sctp/socket.c | 80 ++++++++++++++++++++++++++++++++++++++++++++ > 5 files changed, 149 insertions(+), 3 deletions(-) > > diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h > index 52af764..1a76417 100644 > --- a/include/net/sctp/structs.h > +++ b/include/net/sctp/structs.h > @@ -333,6 +333,8 @@ struct sctp_sock { > > /* Multistream scheduling */ > const struct sctp_sched_ops *sched_ops; > + __u16 sched_config_len; > + void *sched_config; > > struct sctp_initmsg initmsg; > struct sctp_rtoinfo rtoinfo; > @@ -1173,6 +1175,8 @@ struct sctp_outq { > > /* Multistream scheduling */ > const struct sctp_sched_ops *sched_ops; > + __u16 sched_config_len; > + void *sched_config;
Why did you take these two fields into sctp_sock and sctp_outq? These two fields between sctp_sock and sctp_outq has same role, we can only defined in one place. How about using sctp_sk(sctp_outq->asoc->base.sk) to access these two fields?
-- Best Regards ----- Shan Wei
| |