[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170728195919.10099-4-natale.patriciello@gmail.com>
Date: Fri, 28 Jul 2017 21:59:17 +0200
From: Natale Patriciello <natale.patriciello@...il.com>
To: "David S . Miller" <davem@...emloft.net>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
James Morris <jmorris@...ei.org>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
Patrick McHardy <kaber@...sh.net>
Cc: netdev <netdev@...r.kernel.org>,
Ahmed Said <ahmed.said@...roma2.it>,
Natale Patriciello <natale.patriciello@...il.com>,
Francesco Zampognaro <zampognaro@....uniroma2.it>,
Cesare Roseti <roseti@....uniroma2.it>
Subject: [RFC PATCH v1 3/5] tcp: PSH frames sent without timer involved
Segments flagged with 'PSH' should be sent as soon as possible,
ignoring the timing set by the congestion control (if any).
This patch avoids the waiting of 'PSH' segments in the TCP queue.
Signed-off-by: Natale Patriciello <natale.patriciello@...il.com>
Tested-by: Ahmed Said <ahmed.said@...roma2.it>
---
net/ipv4/tcp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 40aca7803cf2..ebaedbf75b63 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -975,9 +975,9 @@ static ssize_t do_tcp_sendpages(struct sock *sk, struct page *page, int offset,
if (forced_push(tp)) {
tcp_mark_push(tp, skb);
- __tcp_push_pending_frames(sk, mss_now, TCP_NAGLE_PUSH);
- } else if (skb == tcp_send_head(sk))
tcp_push_one(sk, mss_now);
+ } else if (skb == tcp_send_head(sk))
+ __tcp_push_pending_frames(sk, mss_now, TCP_NAGLE_PUSH);
continue;
wait_for_sndbuf:
@@ -1320,9 +1320,9 @@ int tcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
if (forced_push(tp)) {
tcp_mark_push(tp, skb);
- __tcp_push_pending_frames(sk, mss_now, TCP_NAGLE_PUSH);
- } else if (skb == tcp_send_head(sk))
tcp_push_one(sk, mss_now);
+ } else if (skb == tcp_send_head(sk))
+ __tcp_push_pending_frames(sk, mss_now, TCP_NAGLE_PUSH);
continue;
wait_for_sndbuf:
--
2.13.2
Powered by blists - more mailing lists