Skip to content

Commit e55f4b8

Browse files
lxindavem330
authored andcommitted
sctp: rename sp strm_interleave to ep intl_enable
Like other endpoint features, strm_interleave should be moved to sctp_endpoint and renamed to intl_enable. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent da1f6d4 commit e55f4b8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

include/net/sctp/structs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ struct sctp_sock {
219219
disable_fragments:1,
220220
v4mapped:1,
221221
frag_interleave:1,
222-
strm_interleave:1,
223222
recvrcvinfo:1,
224223
recvnxtinfo:1,
225224
data_ready_signalled:1;
@@ -1324,6 +1323,7 @@ struct sctp_endpoint {
13241323
struct list_head endpoint_shared_keys;
13251324
__u16 active_key_id;
13261325
__u8 auth_enable:1,
1326+
intl_enable:1,
13271327
prsctp_enable:1,
13281328
reconf_enable:1;
13291329

net/sctp/sm_make_chunk.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
269269
if (sp->adaptation_ind)
270270
chunksize += sizeof(aiparam);
271271

272-
if (sp->strm_interleave) {
272+
if (asoc->ep->intl_enable) {
273273
extensions[num_ext] = SCTP_CID_I_DATA;
274274
num_ext += 1;
275275
}
@@ -2027,7 +2027,7 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
20272027
asoc->peer.asconf_capable = 1;
20282028
break;
20292029
case SCTP_CID_I_DATA:
2030-
if (sctp_sk(asoc->base.sk)->strm_interleave)
2030+
if (asoc->ep->intl_enable)
20312031
asoc->peer.intl_capable = 1;
20322032
break;
20332033
default:

net/sctp/socket.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ static int sctp_sendmsg_to_asoc(struct sctp_association *asoc,
19131913
if (err)
19141914
goto err;
19151915

1916-
if (sp->strm_interleave) {
1916+
if (asoc->ep->intl_enable) {
19171917
timeo = sock_sndtimeo(sk, 0);
19181918
err = sctp_wait_for_connect(asoc, &timeo);
19191919
if (err) {
@@ -3581,7 +3581,7 @@ static int sctp_setsockopt_fragment_interleave(struct sock *sk,
35813581
sctp_sk(sk)->frag_interleave = !!val;
35823582

35833583
if (!sctp_sk(sk)->frag_interleave)
3584-
sctp_sk(sk)->strm_interleave = 0;
3584+
sctp_sk(sk)->ep->intl_enable = 0;
35853585

35863586
return 0;
35873587
}
@@ -4484,7 +4484,7 @@ static int sctp_setsockopt_interleaving_supported(struct sock *sk,
44844484
goto out;
44854485
}
44864486

4487-
sp->strm_interleave = !!params.assoc_value;
4487+
sp->ep->intl_enable = !!params.assoc_value;
44884488

44894489
retval = 0;
44904490

@@ -7693,7 +7693,7 @@ static int sctp_getsockopt_interleaving_supported(struct sock *sk, int len,
76937693
}
76947694

76957695
params.assoc_value = asoc ? asoc->peer.intl_capable
7696-
: sctp_sk(sk)->strm_interleave;
7696+
: sctp_sk(sk)->ep->intl_enable;
76977697

76987698
if (put_user(len, optlen))
76997699
goto out;

0 commit comments

Comments
 (0)