浏览代码

dfc_qmi: Honor tcp ancillary bit even when there is no change in grant

The tcp ancillary bit has been updated to be sent in almost all cases
unlike earlier where this was sent in case of TCP DL traffic.
This bit will now not be set only in case of adverse scenarios, so
this change ensures that the ACK queue state is updated in case the
ancillary bit is unset.

CRs-Fixed: 2957344
Change-Id: I4e1f26c9d3fabc64401284e36b48d82a4f3a5161
Signed-off-by: Subash Abhinov Kasiviswanathan <[email protected]>
Subash Abhinov Kasiviswanathan 4 年之前
父节点
当前提交
9c7db82138
共有 1 个文件被更改,包括 16 次插入6 次删除
  1. 16 6
      core/dfc_qmi.c

+ 16 - 6
core/dfc_qmi.c

@@ -923,12 +923,18 @@ int dfc_bearer_flow_ctl(struct net_device *dev,
 
 	enable = bearer->grant_size ? true : false;
 
-	qmi_rmnet_flow_control(dev, bearer->mq_idx, enable);
+	/* Do not flow disable tcp ack q in tcp bidir
+	 * ACK queue opened first to drain ACKs faster
+	 * Although since tcp ancillary is true most of the time,
+	 * this shouldn't really make a difference
+	 * If there is non zero grant but tcp ancillary is false,
+	 * send out ACKs anyway
+	 */
+	if (bearer->ack_mq_idx != INVALID_MQ)
+		qmi_rmnet_flow_control(dev, bearer->ack_mq_idx,
+				       enable || bearer->tcp_bidir);
 
-	/* Do not flow disable tcp ack q in tcp bidir */
-	if (bearer->ack_mq_idx != INVALID_MQ &&
-	    (enable || !bearer->tcp_bidir))
-		qmi_rmnet_flow_control(dev, bearer->ack_mq_idx, enable);
+	qmi_rmnet_flow_control(dev, bearer->mq_idx, enable);
 
 	if (!enable && bearer->ack_req)
 		dfc_send_ack(dev, bearer->bearer_id,
@@ -1022,8 +1028,12 @@ static int dfc_update_fc_map(struct net_device *dev, struct qos_info *qos,
 			itm->bytes_in_flight = 0;
 		}
 
+		/* update queue state only if there is a change in grant
+		 * or change in ancillary tcp state
+		 */
 		if ((itm->grant_size == 0 && adjusted_grant > 0) ||
-		    (itm->grant_size > 0 && adjusted_grant == 0))
+		    (itm->grant_size > 0 && adjusted_grant == 0) ||
+		    (itm->tcp_bidir ^ DFC_IS_TCP_BIDIR(ancillary)))
 			action = true;
 
 		/* This is needed by qmap */