Re: [PATCH v2 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-09 Thread Konstantin Khorenko
On 08/03/2018 11:40 PM, Marcelo Ricardo Leitner wrote: On Fri, Aug 03, 2018 at 07:21:01PM +0300, Konstantin Khorenko wrote: This patch introduces wrappers for accessing in/out streams indirectly. This will enable to replace physically contiguous memory arrays of streams with flexible arrays (or

Re: [PATCH v2 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-09 Thread Konstantin Khorenko
On 08/03/2018 10:50 PM, David Miller wrote: From: Konstantin Khorenko Date: Fri, 3 Aug 2018 19:21:01 +0300 +struct sctp_stream_out *sctp_stream_out(const struct sctp_stream *stream, + __u16 sid) +{ + return ((struct sctp_stream_out *)(stream->out))

Re: [PATCH v2 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-03 Thread Marcelo Ricardo Leitner
On Fri, Aug 03, 2018 at 07:21:01PM +0300, Konstantin Khorenko wrote: > This patch introduces wrappers for accessing in/out streams indirectly. > This will enable to replace physically contiguous memory arrays > of streams with flexible arrays (or maybe any other appropriate > mechanism) which do me

Re: [PATCH v2 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-03 Thread David Miller
From: Konstantin Khorenko Date: Fri, 3 Aug 2018 19:21:01 +0300 > +struct sctp_stream_out *sctp_stream_out(const struct sctp_stream *stream, > + __u16 sid) > +{ > + return ((struct sctp_stream_out *)(stream->out)) + sid; > +} > + > +struct sctp_stream_in *s

RE: [PATCH v2 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-03 Thread David Laight
From: Konstantin Khorenko > Sent: 03 August 2018 17:21 ... > --- a/net/sctp/stream.c > +++ b/net/sctp/stream.c > @@ -37,6 +37,18 @@ > #include > #include > > +struct sctp_stream_out *sctp_stream_out(const struct sctp_stream *stream, > + __u16 sid) > +{ > +

[PATCH v2 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-03 Thread Konstantin Khorenko
This patch introduces wrappers for accessing in/out streams indirectly. This will enable to replace physically contiguous memory arrays of streams with flexible arrays (or maybe any other appropriate mechanism) which do memory allocation on a per-page basis. Signed-off-by: Oleg Babin Signed-off-b