diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-12-14 11:41:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-15 13:52:21 -0500 |
commit | 8e0c3b73cec1b943affde91b3c412ad8266b4694 (patch) | |
tree | 1fe6fd360a75d7c56967aebc41cabf95d54949fa /net/sctp/outqueue.c | |
parent | 2d07a49aded490a0a4a2748e64030a0f59b6b8be (diff) |
sctp: implement generate_ftsn for sctp_stream_interleave
generate_ftsn is added as a member of sctp_stream_interleave, used to
create fwdtsn or ifwdtsn chunk according to abandoned chunks, called
in sctp_retransmit and sctp_outq_sack.
sctp_generate_iftsn works for ifwdtsn, and sctp_generate_fwdtsn is
still used for making fwdtsn.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo R. Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r-- | net/sctp/outqueue.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 7d67feeeffc1..af9b5ebcae50 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -67,8 +67,6 @@ static void sctp_mark_missing(struct sctp_outq *q, | |||
67 | __u32 highest_new_tsn, | 67 | __u32 highest_new_tsn, |
68 | int count_of_newacks); | 68 | int count_of_newacks); |
69 | 69 | ||
70 | static void sctp_generate_fwdtsn(struct sctp_outq *q, __u32 sack_ctsn); | ||
71 | |||
72 | static void sctp_outq_flush(struct sctp_outq *q, int rtx_timeout, gfp_t gfp); | 70 | static void sctp_outq_flush(struct sctp_outq *q, int rtx_timeout, gfp_t gfp); |
73 | 71 | ||
74 | /* Add data to the front of the queue. */ | 72 | /* Add data to the front of the queue. */ |
@@ -591,7 +589,7 @@ void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport, | |||
591 | * following the procedures outlined in C1 - C5. | 589 | * following the procedures outlined in C1 - C5. |
592 | */ | 590 | */ |
593 | if (reason == SCTP_RTXR_T3_RTX) | 591 | if (reason == SCTP_RTXR_T3_RTX) |
594 | sctp_generate_fwdtsn(q, q->asoc->ctsn_ack_point); | 592 | q->asoc->stream.si->generate_ftsn(q, q->asoc->ctsn_ack_point); |
595 | 593 | ||
596 | /* Flush the queues only on timeout, since fast_rtx is only | 594 | /* Flush the queues only on timeout, since fast_rtx is only |
597 | * triggered during sack processing and the queue | 595 | * triggered during sack processing and the queue |
@@ -942,6 +940,7 @@ static void sctp_outq_flush(struct sctp_outq *q, int rtx_timeout, gfp_t gfp) | |||
942 | case SCTP_CID_ECN_ECNE: | 940 | case SCTP_CID_ECN_ECNE: |
943 | case SCTP_CID_ASCONF: | 941 | case SCTP_CID_ASCONF: |
944 | case SCTP_CID_FWD_TSN: | 942 | case SCTP_CID_FWD_TSN: |
943 | case SCTP_CID_I_FWD_TSN: | ||
945 | case SCTP_CID_RECONF: | 944 | case SCTP_CID_RECONF: |
946 | status = sctp_packet_transmit_chunk(packet, chunk, | 945 | status = sctp_packet_transmit_chunk(packet, chunk, |
947 | one_packet, gfp); | 946 | one_packet, gfp); |
@@ -956,7 +955,8 @@ static void sctp_outq_flush(struct sctp_outq *q, int rtx_timeout, gfp_t gfp) | |||
956 | * sender MUST assure that at least one T3-rtx | 955 | * sender MUST assure that at least one T3-rtx |
957 | * timer is running. | 956 | * timer is running. |
958 | */ | 957 | */ |
959 | if (chunk->chunk_hdr->type == SCTP_CID_FWD_TSN) { | 958 | if (chunk->chunk_hdr->type == SCTP_CID_FWD_TSN || |
959 | chunk->chunk_hdr->type == SCTP_CID_I_FWD_TSN) { | ||
960 | sctp_transport_reset_t3_rtx(transport); | 960 | sctp_transport_reset_t3_rtx(transport); |
961 | transport->last_time_sent = jiffies; | 961 | transport->last_time_sent = jiffies; |
962 | } | 962 | } |
@@ -1372,7 +1372,7 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_chunk *chunk) | |||
1372 | 1372 | ||
1373 | asoc->peer.rwnd = sack_a_rwnd; | 1373 | asoc->peer.rwnd = sack_a_rwnd; |
1374 | 1374 | ||
1375 | sctp_generate_fwdtsn(q, sack_ctsn); | 1375 | asoc->stream.si->generate_ftsn(q, sack_ctsn); |
1376 | 1376 | ||
1377 | pr_debug("%s: sack cumulative tsn ack:0x%x\n", __func__, sack_ctsn); | 1377 | pr_debug("%s: sack cumulative tsn ack:0x%x\n", __func__, sack_ctsn); |
1378 | pr_debug("%s: cumulative tsn ack of assoc:%p is 0x%x, " | 1378 | pr_debug("%s: cumulative tsn ack of assoc:%p is 0x%x, " |
@@ -1795,7 +1795,7 @@ static inline int sctp_get_skip_pos(struct sctp_fwdtsn_skip *skiplist, | |||
1795 | } | 1795 | } |
1796 | 1796 | ||
1797 | /* Create and add a fwdtsn chunk to the outq's control queue if needed. */ | 1797 | /* Create and add a fwdtsn chunk to the outq's control queue if needed. */ |
1798 | static void sctp_generate_fwdtsn(struct sctp_outq *q, __u32 ctsn) | 1798 | void sctp_generate_fwdtsn(struct sctp_outq *q, __u32 ctsn) |
1799 | { | 1799 | { |
1800 | struct sctp_association *asoc = q->asoc; | 1800 | struct sctp_association *asoc = q->asoc; |
1801 | struct sctp_chunk *ftsn_chunk = NULL; | 1801 | struct sctp_chunk *ftsn_chunk = NULL; |