From 163a364d27e30dd80d545e03427d34d35d36171f Mon Sep 17 00:00:00 2001 From: Alok Kumar Date: Thu, 21 May 2020 20:27:09 +0530 Subject: [PATCH] qcacmn: Set TCP PSH flag only for the last segment of TSO packet Currently, if TCP PSH flag is set in TSO packet then PSH flag is set for each TSO segment in the driver. This causes GRO flush for each segment received in the receiver side. Set this PSH flag only in last TSO segment so that GRO flush happens for the last segment in the receiver end. Change-Id: I6d6b34fab71ab2984ea68d8197f2979d25b36c6b CRs-Fixed: 2692251 --- qdf/linux/src/qdf_nbuf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qdf/linux/src/qdf_nbuf.c b/qdf/linux/src/qdf_nbuf.c index 860e1f5e223d..1cf3323df3ed 100644 --- a/qdf/linux/src/qdf_nbuf.c +++ b/qdf/linux/src/qdf_nbuf.c @@ -3047,7 +3047,6 @@ static inline void __qdf_nbuf_fill_tso_cmn_seg_info( curr_seg->seg.tso_flags.syn = tso_cmn_info->tcphdr->syn; curr_seg->seg.tso_flags.rst = tso_cmn_info->tcphdr->rst; - curr_seg->seg.tso_flags.psh = tso_cmn_info->tcphdr->psh; curr_seg->seg.tso_flags.ack = tso_cmn_info->tcphdr->ack; curr_seg->seg.tso_flags.urg = tso_cmn_info->tcphdr->urg; curr_seg->seg.tso_flags.ece = tso_cmn_info->tcphdr->ece; @@ -3160,6 +3159,10 @@ uint32_t __qdf_nbuf_get_tso_info(qdf_device_t osdev, struct sk_buff *skb, __qdf_nbuf_fill_tso_cmn_seg_info(curr_seg, &tso_cmn_info); + /* If TCP PSH flag is set, set it in the last or only segment */ + if (num_seg == 1) + curr_seg->seg.tso_flags.psh = tso_cmn_info.tcphdr->psh; + if (unlikely(skb_proc == 0)) return tso_info->num_segs;