diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-06-29 23:52:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-01 12:08:42 -0400 |
commit | 9f8d31471548d9b74609335f9a3c75c7b664c8b4 (patch) | |
tree | 1fbc8c5b81f2d438a65c587c135a85097b3918a2 /net | |
parent | 3583df1a3d7328b42cf116db3fb56b0368fab12b (diff) |
sctp: remove the typedef sctp_data_chunk_t
This patch is to remove the typedef sctp_data_chunk_t, and replace
with struct sctp_data_chunk in the places where it's using this
typedef.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/sctp/output.c | 4 | ||||
-rw-r--r-- | net/sctp/sm_statefuns.c | 6 | ||||
-rw-r--r-- | net/sctp/ulpqueue.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c index 9bf9d84a96b7..9d8504985744 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -723,8 +723,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet, | |||
723 | /* Check whether this chunk and all the rest of pending data will fit | 723 | /* Check whether this chunk and all the rest of pending data will fit |
724 | * or delay in hopes of bundling a full sized packet. | 724 | * or delay in hopes of bundling a full sized packet. |
725 | */ | 725 | */ |
726 | if (chunk->skb->len + q->out_qlen > | 726 | if (chunk->skb->len + q->out_qlen > transport->pathmtu - |
727 | transport->pathmtu - packet->overhead - sizeof(sctp_data_chunk_t) - 4) | 727 | packet->overhead - sizeof(struct sctp_data_chunk) - 4) |
728 | /* Enough data queued to fill a packet */ | 728 | /* Enough data queued to fill a packet */ |
729 | return SCTP_XMIT_OK; | 729 | return SCTP_XMIT_OK; |
730 | 730 | ||
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 1ba9a9b04466..212fe7614d08 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -2990,7 +2990,7 @@ sctp_disposition_t sctp_sf_eat_data_6_2(struct net *net, | |||
2990 | return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); | 2990 | return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); |
2991 | } | 2991 | } |
2992 | 2992 | ||
2993 | if (!sctp_chunk_length_valid(chunk, sizeof(sctp_data_chunk_t))) | 2993 | if (!sctp_chunk_length_valid(chunk, sizeof(struct sctp_data_chunk))) |
2994 | return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, | 2994 | return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, |
2995 | commands); | 2995 | commands); |
2996 | 2996 | ||
@@ -3109,7 +3109,7 @@ sctp_disposition_t sctp_sf_eat_data_fast_4_4(struct net *net, | |||
3109 | return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); | 3109 | return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); |
3110 | } | 3110 | } |
3111 | 3111 | ||
3112 | if (!sctp_chunk_length_valid(chunk, sizeof(sctp_data_chunk_t))) | 3112 | if (!sctp_chunk_length_valid(chunk, sizeof(struct sctp_data_chunk))) |
3113 | return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, | 3113 | return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, |
3114 | commands); | 3114 | commands); |
3115 | 3115 | ||
@@ -6262,7 +6262,7 @@ static int sctp_eat_data(const struct sctp_association *asoc, | |||
6262 | * Actually, allow a little bit of overflow (up to a MTU). | 6262 | * Actually, allow a little bit of overflow (up to a MTU). |
6263 | */ | 6263 | */ |
6264 | datalen = ntohs(chunk->chunk_hdr->length); | 6264 | datalen = ntohs(chunk->chunk_hdr->length); |
6265 | datalen -= sizeof(sctp_data_chunk_t); | 6265 | datalen -= sizeof(struct sctp_data_chunk); |
6266 | 6266 | ||
6267 | deliver = SCTP_CMD_CHUNK_ULP; | 6267 | deliver = SCTP_CMD_CHUNK_ULP; |
6268 | 6268 | ||
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c index 25f7e4140566..0225d62a869f 100644 --- a/net/sctp/ulpqueue.c +++ b/net/sctp/ulpqueue.c | |||
@@ -1090,7 +1090,7 @@ void sctp_ulpq_renege(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk, | |||
1090 | 1090 | ||
1091 | if (chunk) { | 1091 | if (chunk) { |
1092 | needed = ntohs(chunk->chunk_hdr->length); | 1092 | needed = ntohs(chunk->chunk_hdr->length); |
1093 | needed -= sizeof(sctp_data_chunk_t); | 1093 | needed -= sizeof(struct sctp_data_chunk); |
1094 | } else | 1094 | } else |
1095 | needed = SCTP_DEFAULT_MAXWINDOW; | 1095 | needed = SCTP_DEFAULT_MAXWINDOW; |
1096 | 1096 | ||