* sctp: fix to retranmit at least one DATA chunk
@ 2010-01-15 3:49 Wei Yongjun
0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2010-01-15 3:49 UTC (permalink / raw)
To: linux-sctp
While doing retranmit, if control chunk is exists, such as
FORWARD TSN chunk, and the DATA chunk can not be bundled with
the control chunk because the limit of PMTU, none DATA chunk
will be retranmitted in the current implementation. This
patch fix to retranmit at least one DATA chunk in this case.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
net/sctp/outqueue.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 8092032..61cd7f1 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -609,13 +609,20 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt,
if (fast_rtx && !chunk->fast_retransmit)
continue;
+redo:
/* Attempt to append this chunk to the packet. */
status = sctp_packet_append_chunk(pkt, chunk);
switch (status) {
case SCTP_XMIT_PMTU_FULL:
- /* Send this packet. */
- error = sctp_packet_transmit(pkt);
+ if (!pkt->has_data && !pkt->has_cookie_echo) {
+ /* Send a control chunk. */
+ error = sctp_packet_transmit(pkt);
+ goto redo;
+ } else {
+ /* Send this packet. */
+ error = sctp_packet_transmit(pkt);
+ }
/* If we are retransmitting, we should only
* send a single packet.
--
1.6.2.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-15 3:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-15 3:49 sctp: fix to retranmit at least one DATA chunk Wei Yongjun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.