linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sctp: set ooo_okay properly for Transmit Packet Steering
@ 2019-10-30 16:07 Wally Zhao
  2019-10-30 13:24 ` Marcelo Ricardo Leitner
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Wally Zhao @ 2019-10-30 16:07 UTC (permalink / raw)
  To: vyasevich, nhorman, marcelo.leitner, davem, linux-sctp, netdev,
	linux-kernel
  Cc: wally.zhao, Wally Zhao

Unlike tcp_transmit_skb,
sctp_packet_transmit does not set ooo_okay explicitly,
causing unwanted Tx queue switching when multiqueue is in use;
Tx queue switching may cause out-of-order packets.
Change sctp_packet_transmit to allow Tx queue switching only for
the first in flight packet, to avoid unwanted Tx queue switching.

Signed-off-by: Wally Zhao <wallyzhao@gmail.com>
---
 net/sctp/output.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/sctp/output.c b/net/sctp/output.c
index dbda7e7..5ff75cc 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -626,6 +626,10 @@ int sctp_packet_transmit(struct sctp_packet *packet, gfp_t gfp)
 	/* neighbour should be confirmed on successful transmission or
 	 * positive error
 	 */
+
+	/* allow switch tx queue only for the first in flight pkt */
+	head->ooo_okay = asoc->outqueue.outstanding_bytes == 0;
+
 	if (tp->af_specific->sctp_xmit(head, tp) >= 0 &&
 	    tp->dst_pending_confirm)
 		tp->dst_pending_confirm = 0;
-- 
1.8.3.1


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

end of thread, other threads:[~2019-11-04 14:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30 16:07 [PATCH] sctp: set ooo_okay properly for Transmit Packet Steering Wally Zhao
2019-10-30 13:24 ` Marcelo Ricardo Leitner
2019-10-30 15:54   ` Wei Zhao
2019-10-30 18:35     ` Marcelo Ricardo Leitner
2019-10-30 19:03 ` Eric Dumazet
2019-10-31  1:11   ` Wei Zhao
2019-11-04  8:46 ` [sctp] 327fecdaf3: BUG:kernel_NULL_pointer_dereference,address kernel test robot
2019-11-04 13:25   ` Marcelo Ricardo Leitner
2019-11-04 14:14     ` Wei Zhao
2019-11-04 14:49       ` Marcelo Ricardo Leitner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).