Skip to content

Commit da1f6d4

Browse files
lxindavem330
authored andcommitted
sctp: rename asoc intl_enable to asoc peer.intl_capable
To keep consistent with other asoc features, we move intl_enable to peer.intl_capable in asoc. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1c13475 commit da1f6d4

File tree

5 files changed

+23
-22
lines changed

5 files changed

+23
-22
lines changed

include/net/sctp/structs.h

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,28 +1679,30 @@ struct sctp_association {
16791679
__be16 addip_disabled_mask;
16801680

16811681
/* These are capabilities which our peer advertised. */
1682-
__u8 ecn_capable:1, /* Can peer do ECN? */
1682+
__u16 ecn_capable:1, /* Can peer do ECN? */
16831683
ipv4_address:1, /* Peer understands IPv4 addresses? */
16841684
ipv6_address:1, /* Peer understands IPv6 addresses? */
16851685
hostname_address:1, /* Peer understands DNS addresses? */
16861686
asconf_capable:1, /* Does peer support ADDIP? */
16871687
prsctp_capable:1, /* Can peer do PR-SCTP? */
16881688
reconf_capable:1, /* Can peer do RE-CONFIG? */
1689-
auth_capable:1; /* Is peer doing SCTP-AUTH? */
1690-
1691-
/* sack_needed : This flag indicates if the next received
1692-
* : packet is to be responded to with a
1693-
* : SACK. This is initialized to 0. When a packet
1694-
* : is received sack_cnt is incremented. If this value
1695-
* : reaches 2 or more, a SACK is sent and the
1696-
* : value is reset to 0. Note: This is used only
1697-
* : when no DATA chunks are received out of
1698-
* : order. When DATA chunks are out of order,
1699-
* : SACK's are not delayed (see Section 6).
1700-
*/
1701-
__u8 sack_needed:1, /* Do we need to sack the peer? */
1689+
intl_capable:1, /* Can peer do INTERLEAVE */
1690+
auth_capable:1, /* Is peer doing SCTP-AUTH? */
1691+
/* sack_needed:
1692+
* This flag indicates if the next received
1693+
* packet is to be responded to with a
1694+
* SACK. This is initialized to 0. When a packet
1695+
* is received sack_cnt is incremented. If this value
1696+
* reaches 2 or more, a SACK is sent and the
1697+
* value is reset to 0. Note: This is used only
1698+
* when no DATA chunks are received out of
1699+
* order. When DATA chunks are out of order,
1700+
* SACK's are not delayed (see Section 6).
1701+
*/
1702+
sack_needed:1, /* Do we need to sack the peer? */
17021703
sack_generation:1,
17031704
zero_window_announced:1;
1705+
17041706
__u32 sack_cnt;
17051707

17061708
__u32 adaptation_ind; /* Adaptation Code point. */
@@ -2049,8 +2051,7 @@ struct sctp_association {
20492051

20502052
__u8 need_ecne:1, /* Need to send an ECNE Chunk? */
20512053
temp:1, /* Is it a temporary association? */
2052-
force_delay:1,
2053-
intl_enable:1;
2054+
force_delay:1;
20542055

20552056
__u8 strreset_enable;
20562057
__u8 strreset_outstanding; /* request param count on the fly */

net/sctp/sm_make_chunk.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
438438
if (sp->adaptation_ind)
439439
chunksize += sizeof(aiparam);
440440

441-
if (asoc->intl_enable) {
441+
if (asoc->peer.intl_capable) {
442442
extensions[num_ext] = SCTP_CID_I_DATA;
443443
num_ext += 1;
444444
}
@@ -2028,7 +2028,7 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
20282028
break;
20292029
case SCTP_CID_I_DATA:
20302030
if (sctp_sk(asoc->base.sk)->strm_interleave)
2031-
asoc->intl_enable = 1;
2031+
asoc->peer.intl_capable = 1;
20322032
break;
20332033
default:
20342034
break;

net/sctp/socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7692,7 +7692,7 @@ static int sctp_getsockopt_interleaving_supported(struct sock *sk, int len,
76927692
goto out;
76937693
}
76947694

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

76987698
if (put_user(len, optlen))

net/sctp/stream_interleave.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,6 +1358,6 @@ void sctp_stream_interleave_init(struct sctp_stream *stream)
13581358
struct sctp_association *asoc;
13591359

13601360
asoc = container_of(stream, struct sctp_association, stream);
1361-
stream->si = asoc->intl_enable ? &sctp_stream_interleave_1
1362-
: &sctp_stream_interleave_0;
1361+
stream->si = asoc->peer.intl_capable ? &sctp_stream_interleave_1
1362+
: &sctp_stream_interleave_0;
13631363
}

net/sctp/stream_sched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ int sctp_sched_get_value(struct sctp_association *asoc, __u16 sid,
228228
void sctp_sched_dequeue_done(struct sctp_outq *q, struct sctp_chunk *ch)
229229
{
230230
if (!list_is_last(&ch->frag_list, &ch->msg->chunks) &&
231-
!q->asoc->intl_enable) {
231+
!q->asoc->peer.intl_capable) {
232232
struct sctp_stream_out *sout;
233233
__u16 sid;
234234

0 commit comments

Comments
 (0)