diff options
author | Konstantin Khorenko <khorenko@virtuozzo.com> | 2018-08-10 13:11:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-11 15:25:15 -0400 |
commit | 05364ca03cfd419caecb292fede20eb39667eaae (patch) | |
tree | 134bb5ed07d0dccfb47220d5b760c5e2be8a673f /net/sctp/socket.c | |
parent | b70f1f3af47f4a21a25678f9ee587ed7986d62f8 (diff) |
net/sctp: Make wrappers for accessing in/out streams
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 <obabin@virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 502c0d7cb105..e96b15a66aba 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -1911,7 +1911,7 @@ static int sctp_sendmsg_to_asoc(struct sctp_association *asoc, | |||
1911 | goto err; | 1911 | goto err; |
1912 | } | 1912 | } |
1913 | 1913 | ||
1914 | if (unlikely(!asoc->stream.out[sinfo->sinfo_stream].ext)) { | 1914 | if (unlikely(!SCTP_SO(&asoc->stream, sinfo->sinfo_stream)->ext)) { |
1915 | err = sctp_stream_init_ext(&asoc->stream, sinfo->sinfo_stream); | 1915 | err = sctp_stream_init_ext(&asoc->stream, sinfo->sinfo_stream); |
1916 | if (err) | 1916 | if (err) |
1917 | goto err; | 1917 | goto err; |
@@ -7154,7 +7154,7 @@ static int sctp_getsockopt_pr_streamstatus(struct sock *sk, int len, | |||
7154 | if (!asoc || params.sprstat_sid >= asoc->stream.outcnt) | 7154 | if (!asoc || params.sprstat_sid >= asoc->stream.outcnt) |
7155 | goto out; | 7155 | goto out; |
7156 | 7156 | ||
7157 | streamoute = asoc->stream.out[params.sprstat_sid].ext; | 7157 | streamoute = SCTP_SO(&asoc->stream, params.sprstat_sid)->ext; |
7158 | if (!streamoute) { | 7158 | if (!streamoute) { |
7159 | /* Not allocated yet, means all stats are 0 */ | 7159 | /* Not allocated yet, means all stats are 0 */ |
7160 | params.sprstat_abandoned_unsent = 0; | 7160 | params.sprstat_abandoned_unsent = 0; |