aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2019-10-04 09:06:41 -0700
committerTony Lindgren <tony@atomide.com>2019-10-04 09:06:41 -0700
commit1913c7f3fc2514e09262baf2267a82dfdb215c39 (patch)
tree1aaf6970e99c1f5535776f9fd9067f0d811b2532 /net/ipv4/tcp_output.c
parentARM: dts: am4372: Set memory bandwidth limit for DISPC (diff)
parentARM: omap2plus_defconfig: Fix selected panels after generic panel changes (diff)
downloadwireguard-linux-1913c7f3fc2514e09262baf2267a82dfdb215c39.tar.xz
wireguard-linux-1913c7f3fc2514e09262baf2267a82dfdb215c39.zip
Merge tag 'fix-missing-panels' into fixes
Diffstat (limited to '')
-rw-r--r--net/ipv4/tcp_output.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 8a645f304e6c..fec6d67bfd14 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1050,11 +1050,22 @@ static int __tcp_transmit_skb(struct sock *sk, struct sk_buff *skb,
tcb = TCP_SKB_CB(skb);
memset(&opts, 0, sizeof(opts));
- if (unlikely(tcb->tcp_flags & TCPHDR_SYN))
+ if (unlikely(tcb->tcp_flags & TCPHDR_SYN)) {
tcp_options_size = tcp_syn_options(sk, skb, &opts, &md5);
- else
+ } else {
tcp_options_size = tcp_established_options(sk, skb, &opts,
&md5);
+ /* Force a PSH flag on all (GSO) packets to expedite GRO flush
+ * at receiver : This slightly improve GRO performance.
+ * Note that we do not force the PSH flag for non GSO packets,
+ * because they might be sent under high congestion events,
+ * and in this case it is better to delay the delivery of 1-MSS
+ * packets and thus the corresponding ACK packet that would
+ * release the following packet.
+ */
+ if (tcp_skb_pcount(skb) > 1)
+ tcb->tcp_flags |= TCPHDR_PSH;
+ }
tcp_header_size = tcp_options_size + sizeof(struct tcphdr);
/* if no packet is in qdisc/device queue, then allow XPS to select
@@ -1403,7 +1414,7 @@ static int __pskb_trim_head(struct sk_buff *skb, int len)
} else {
shinfo->frags[k] = shinfo->frags[i];
if (eat) {
- shinfo->frags[k].page_offset += eat;
+ skb_frag_off_add(&shinfo->frags[k], eat);
skb_frag_size_sub(&shinfo->frags[k], eat);
eat = 0;
}