From 3f4207db6621fa6803b5e3a21f8d87c67ec403c4 Mon Sep 17 00:00:00 2001 From: "Nagaraj, Suresh" <suresh.nagaraj@intel.com> Date: Tue, 13 Feb 2018 03:04:34 +0100 Subject: [PATCH] Merge pull request #248 in SW_PON/linux from bugfix/UGW_SW-21667-getting-json-error-during-automation-run-in-prt-pta to xrx500 * commit 'c774259112f0845d6917fdf0c69f723665fc45ca': UGW_SW-21667: avoid piggybacked FIN for TSO packets --- net/ipv4/tcp_output.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 493876cfa..41ba0f6eb 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2968,7 +2968,13 @@ void tcp_send_fin(struct sock *sk) * Note: in the latter case, FIN packet will be sent after a timeout, * as TCP stack thinks it has already been transmitted. */ +#ifdef CONFIG_LTQ_TOE_DRIVER + /* don't piggyback the FIN for large packets (TSO) + bug in HW will add FIN flag for all the segmented packets */ + if (tskb && (tcp_send_head(sk) || tcp_under_memory_pressure(sk)) && (tskb->len < tcp_current_mss(sk))) { +#else if (tskb && (tcp_send_head(sk) || tcp_under_memory_pressure(sk))) { +#endif coalesce: TCP_SKB_CB(tskb)->tcp_flags |= TCPHDR_FIN; TCP_SKB_CB(tskb)->end_seq++; -- GitLab