Re: [PATCHv2 3/5] sctp: extend socket API for sched configuration

From: Shan Wei
Date: Wed Oct 13 2010 - 04:32:37 EST


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@xxxxxxxx>
> ---
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/