From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: linux-sctp@vger.kernel.org
Subject: sctp: fix to retranmit at least one DATA chunk
Date: Fri, 15 Jan 2010 03:49:37 +0000 [thread overview]
Message-ID: <4B4FE5D1.2040103@cn.fujitsu.com> (raw)
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
reply other threads:[~2010-01-15 3:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B4FE5D1.2040103@cn.fujitsu.com \
--to=yjwei@cn.fujitsu.com \
--cc=linux-sctp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.