All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each CHUNK
@ 2011-06-24 10:15 ` Thomas Graf
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Graf @ 2011-06-24 10:15 UTC (permalink / raw)
  To: Vlad Yasevich, Sridhar Samudrala; +Cc: linux-sctp, netdev

Currently we subtract sizeof(struct sk_buff) of our view of the
receiver's rwnd for each DATA chunk appended to a sctp packet.
Reducing the rwnd by >200 bytes for each DATA chunk quickly
consumes the available window and prevents max MTU sized packets
(for large MTU values) from being generated in combination with
small DATA chunks. The sender has to wait for the next SACK to
be processed for the rwnd to be corrected.

Accounting for data structures required for rx is the responsibility
of the stack which is why we announce a rwnd of sk_rcvbuf/2.

Signed-off-by: Thomas Graf <tgraf@suug.ch>

diff --git a/net/sctp/output.c b/net/sctp/output.c
index b4f3cf0..ceb55b2 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -700,13 +700,7 @@ static void sctp_packet_append_data(struct sctp_packet *packet,
 	/* Keep track of how many bytes are in flight to the receiver. */
 	asoc->outqueue.outstanding_bytes += datasize;
 
-	/* Update our view of the receiver's rwnd. Include sk_buff overhead
-	 * while updating peer.rwnd so that it reduces the chances of a
-	 * receiver running out of receive buffer space even when receive
-	 * window is still open. This can happen when a sender is sending
-	 * sending small messages.
-	 */
-	datasize += sizeof(struct sk_buff);
+	/* Update our view of the receiver's rwnd. */
 	if (datasize < rwnd)
 		rwnd -= datasize;
 	else

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-06-29 14:09 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-24 10:15 [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each CHUNK Thomas Graf
2011-06-24 10:15 ` [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each CHUNK is too aggressive Thomas Graf
2011-06-24 13:48 ` [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each Vladislav Yasevich
2011-06-24 13:48   ` [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each CHUNK is too aggressive Vladislav Yasevich
2011-06-24 14:42   ` [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each Thomas Graf
2011-06-24 14:42     ` [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each CHUNK is too aggressive Thomas Graf
2011-06-24 15:21     ` [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each Vladislav Yasevich
2011-06-24 15:21       ` [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each CHUNK is too aggressive Vladislav Yasevich
2011-06-24 15:53       ` [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each Thomas Graf
2011-06-24 15:53         ` [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each CHUNK is too aggressive Thomas Graf
2011-06-27  9:11       ` [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each Thomas Graf
2011-06-27  9:11         ` [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each CHUNK is too aggressive Thomas Graf
2011-06-29 14:09         ` [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each Vladislav Yasevich
2011-06-29 14:09           ` [PATCH] sctp: Reducing rwnd by sizeof(struct sk_buff) for each CHUNK is too aggressive Vladislav Yasevich

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.