Commit da1f6d4d authored by Xin Long's avatar Xin Long Committed by David S. Miller

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: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1c134753
...@@ -1679,28 +1679,30 @@ struct sctp_association { ...@@ -1679,28 +1679,30 @@ struct sctp_association {
__be16 addip_disabled_mask; __be16 addip_disabled_mask;
/* These are capabilities which our peer advertised. */ /* These are capabilities which our peer advertised. */
__u8 ecn_capable:1, /* Can peer do ECN? */ __u16 ecn_capable:1, /* Can peer do ECN? */
ipv4_address:1, /* Peer understands IPv4 addresses? */ ipv4_address:1, /* Peer understands IPv4 addresses? */
ipv6_address:1, /* Peer understands IPv6 addresses? */ ipv6_address:1, /* Peer understands IPv6 addresses? */
hostname_address:1, /* Peer understands DNS addresses? */ hostname_address:1, /* Peer understands DNS addresses? */
asconf_capable:1, /* Does peer support ADDIP? */ asconf_capable:1, /* Does peer support ADDIP? */
prsctp_capable:1, /* Can peer do PR-SCTP? */ prsctp_capable:1, /* Can peer do PR-SCTP? */
reconf_capable:1, /* Can peer do RE-CONFIG? */ reconf_capable:1, /* Can peer do RE-CONFIG? */
auth_capable:1; /* Is peer doing SCTP-AUTH? */ intl_capable:1, /* Can peer do INTERLEAVE */
auth_capable:1, /* Is peer doing SCTP-AUTH? */
/* sack_needed : This flag indicates if the next received /* sack_needed:
* : packet is to be responded to with a * This flag indicates if the next received
* : SACK. This is initialized to 0. When a packet * packet is to be responded to with a
* : is received sack_cnt is incremented. If this value * SACK. This is initialized to 0. When a packet
* : reaches 2 or more, a SACK is sent and the * is received sack_cnt is incremented. If this value
* : value is reset to 0. Note: This is used only * reaches 2 or more, a SACK is sent and the
* : when no DATA chunks are received out of * value is reset to 0. Note: This is used only
* : order. When DATA chunks are out of order, * when no DATA chunks are received out of
* : SACK's are not delayed (see Section 6). * order. When DATA chunks are out of order,
*/ * SACK's are not delayed (see Section 6).
__u8 sack_needed:1, /* Do we need to sack the peer? */ */
sack_needed:1, /* Do we need to sack the peer? */
sack_generation:1, sack_generation:1,
zero_window_announced:1; zero_window_announced:1;
__u32 sack_cnt; __u32 sack_cnt;
__u32 adaptation_ind; /* Adaptation Code point. */ __u32 adaptation_ind; /* Adaptation Code point. */
...@@ -2049,8 +2051,7 @@ struct sctp_association { ...@@ -2049,8 +2051,7 @@ struct sctp_association {
__u8 need_ecne:1, /* Need to send an ECNE Chunk? */ __u8 need_ecne:1, /* Need to send an ECNE Chunk? */
temp:1, /* Is it a temporary association? */ temp:1, /* Is it a temporary association? */
force_delay:1, force_delay:1;
intl_enable:1;
__u8 strreset_enable; __u8 strreset_enable;
__u8 strreset_outstanding; /* request param count on the fly */ __u8 strreset_outstanding; /* request param count on the fly */
......
...@@ -438,7 +438,7 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, ...@@ -438,7 +438,7 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
if (sp->adaptation_ind) if (sp->adaptation_ind)
chunksize += sizeof(aiparam); chunksize += sizeof(aiparam);
if (asoc->intl_enable) { if (asoc->peer.intl_capable) {
extensions[num_ext] = SCTP_CID_I_DATA; extensions[num_ext] = SCTP_CID_I_DATA;
num_ext += 1; num_ext += 1;
} }
...@@ -2028,7 +2028,7 @@ static void sctp_process_ext_param(struct sctp_association *asoc, ...@@ -2028,7 +2028,7 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
break; break;
case SCTP_CID_I_DATA: case SCTP_CID_I_DATA:
if (sctp_sk(asoc->base.sk)->strm_interleave) if (sctp_sk(asoc->base.sk)->strm_interleave)
asoc->intl_enable = 1; asoc->peer.intl_capable = 1;
break; break;
default: default:
break; break;
......
...@@ -7692,7 +7692,7 @@ static int sctp_getsockopt_interleaving_supported(struct sock *sk, int len, ...@@ -7692,7 +7692,7 @@ static int sctp_getsockopt_interleaving_supported(struct sock *sk, int len,
goto out; goto out;
} }
params.assoc_value = asoc ? asoc->intl_enable params.assoc_value = asoc ? asoc->peer.intl_capable
: sctp_sk(sk)->strm_interleave; : sctp_sk(sk)->strm_interleave;
if (put_user(len, optlen)) if (put_user(len, optlen))
......
...@@ -1358,6 +1358,6 @@ void sctp_stream_interleave_init(struct sctp_stream *stream) ...@@ -1358,6 +1358,6 @@ void sctp_stream_interleave_init(struct sctp_stream *stream)
struct sctp_association *asoc; struct sctp_association *asoc;
asoc = container_of(stream, struct sctp_association, stream); asoc = container_of(stream, struct sctp_association, stream);
stream->si = asoc->intl_enable ? &sctp_stream_interleave_1 stream->si = asoc->peer.intl_capable ? &sctp_stream_interleave_1
: &sctp_stream_interleave_0; : &sctp_stream_interleave_0;
} }
...@@ -228,7 +228,7 @@ int sctp_sched_get_value(struct sctp_association *asoc, __u16 sid, ...@@ -228,7 +228,7 @@ int sctp_sched_get_value(struct sctp_association *asoc, __u16 sid,
void sctp_sched_dequeue_done(struct sctp_outq *q, struct sctp_chunk *ch) void sctp_sched_dequeue_done(struct sctp_outq *q, struct sctp_chunk *ch)
{ {
if (!list_is_last(&ch->frag_list, &ch->msg->chunks) && if (!list_is_last(&ch->frag_list, &ch->msg->chunks) &&
!q->asoc->intl_enable) { !q->asoc->peer.intl_capable) {
struct sctp_stream_out *sout; struct sctp_stream_out *sout;
__u16 sid; __u16 sid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment