dfc: add stall recovery timer

Add watchdog timer to recover potential data stall when data is
not going to the expected DRB and no DFC indication is received.

Change-Id: Iaa4b4814967cf9400c36115a083922376d23928d
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
This commit is contained in:
Subash Abhinov Kasiviswanathan
2020-06-24 10:42:34 -07:00
parent aeca58ead5
commit 1842e30e8a
6 changed files with 163 additions and 10 deletions

View File

@@ -1034,14 +1034,18 @@ static int dfc_update_fc_map(struct net_device *dev, struct qos_info *qos,
itm->grant_size = adjusted_grant;
/* No further query if the adjusted grant is less
* than 20% of the original grant
* than 20% of the original grant. Add to watch to
* recover if no indication is received.
*/
if (dfc_qmap && is_query &&
itm->grant_size < (fc_info->num_bytes / 5))
itm->grant_size < (fc_info->num_bytes / 5)) {
itm->grant_thresh = itm->grant_size;
else
qmi_rmnet_watchdog_add(itm);
} else {
itm->grant_thresh =
qmi_rmnet_grant_per(itm->grant_size);
qmi_rmnet_watchdog_remove(itm);
}
itm->seq = fc_info->seq_num;
itm->ack_req = ack_req;
@@ -1143,6 +1147,7 @@ static void dfc_update_tx_link_status(struct net_device *dev,
itm->grant_size = 0;
itm->tcp_bidir = false;
itm->bytes_in_flight = 0;
qmi_rmnet_watchdog_remove(itm);
dfc_bearer_flow_ctl(dev, itm, qos);
} else if (itm->grant_size == 0 && tx_status && !itm->rat_switch) {
itm->grant_size = DEFAULT_GRANT;