Forráskód Böngészése

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
Alok Kumar 5 éve
szülő
commit
163a364d27
1 módosított fájl, 4 hozzáadás és 1 törlés
  1. 4 1
      qdf/linux/src/qdf_nbuf.c

+ 4 - 1
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;