Quellcode durchsuchen

qcacld-3.0: Sync pool status with netif queue status

When flow pool is created, pool status is set to FLOW_POOL_ACTIVE_UNPAUSED
irrespective of whether netif queues are paused or not.
Also, when descriptors are transferred from invalid pool to deficient pool,
pool status is not checked. So, if deficient pool is paused, then even
after receiving required descriptors from invalid pool, its status and
netif queues will still remain paused due to which traffic will not be able
to resume ever.

Sync pool status with netif queue status by:
1) Unpausing netif queues as well when pool is created.
2) If deficient pool is paused and on receiving descriptors from invalid
   pool, no. of descriptors goes beyond start threshold, unpause the
   queues and set the pool status to FLOW_POOL_ACTIVE_UNPAUSED.

Change-Id: I69390e40130892d218372e4a8a0ab4b0c7b94b7e
CRs-Fixed: 2025759
Himanshu Agarwal vor 8 Jahren
Ursprung
Commit
d6f3c5a3be
1 geänderte Dateien mit 15 neuen und 0 gelöschten Zeilen
  1. 15 0
      core/dp/txrx/ol_txrx_flow_control.c

+ 15 - 0
core/dp/txrx/ol_txrx_flow_control.c

@@ -314,7 +314,17 @@ ol_tx_distribute_descs_to_deficient_pools(struct ol_tx_flow_pool_t *src_pool)
 			desc_move_count = ol_tx_move_desc_n(src_pool,
 						dst_pool, desc_move_count);
 			desc_count -= desc_move_count;
+
 			qdf_spin_lock_bh(&dst_pool->flow_pool_lock);
+			if (dst_pool->status == FLOW_POOL_ACTIVE_PAUSED) {
+				if (dst_pool->avail_desc > dst_pool->start_th) {
+					pdev->pause_cb(dst_pool->member_flow_id,
+						      WLAN_WAKE_ALL_NETIF_QUEUE,
+						      WLAN_DATA_FLOW_CONTROL);
+					dst_pool->status =
+						FLOW_POOL_ACTIVE_UNPAUSED;
+				}
+			}
 		}
 		qdf_spin_unlock_bh(&dst_pool->flow_pool_lock);
 		if (desc_count == 0)
@@ -654,6 +664,11 @@ void ol_tx_flow_pool_map_handler(uint8_t flow_id, uint8_t flow_type,
 
 	case FLOW_TYPE_VDEV:
 		ol_tx_flow_pool_vdev_map(pool, flow_id);
+		qdf_spin_lock_bh(&pool->flow_pool_lock);
+		pdev->pause_cb(flow_id,
+			       WLAN_WAKE_ALL_NETIF_QUEUE,
+			       WLAN_DATA_FLOW_CONTROL);
+		qdf_spin_unlock_bh(&pool->flow_pool_lock);
 		break;
 	default:
 		if (pool_create)