Jelajahi Sumber

qcacld-3.0: Update num_elem enqueued to rx_thread after head frag_list

Today we enqueue nbuf list to rx_thread via nbuf frags_list.
If deliver_head happens to have frags_list then it is delivered alone.
Remaining list of skbs are delivered using frags_list of next skb.
It does not takecare to update QDF_NBUF_CB_RX_NUM_ELEMENTS_IN_LIST of
the new head_skb with remaining num skbs, make sure to update it.

Also add nbuf_queued to take care of this accounting.

Change-Id: I5557b5c56576c46fc8564a87a27d167b8785bb95
CRs-Fixed: 2559875
Manjunathappa Prakash 5 tahun lalu
induk
melakukan
a59028c1c9
1 mengubah file dengan 5 tambahan dan 1 penghapusan
  1. 5 1
      core/dp/txrx3.0/dp_rx_thread.c

+ 5 - 1
core/dp/txrx3.0/dp_rx_thread.c

@@ -153,6 +153,7 @@ static QDF_STATUS dp_rx_tm_thread_enqueue(struct dp_rx_thread *rx_thread,
 	qdf_nbuf_t head_ptr, next_ptr_list;
 	uint32_t temp_qlen;
 	uint32_t num_elements_in_nbuf;
+	uint32_t nbuf_queued;
 	struct dp_rx_tm_handle_cmn *tm_handle_cmn;
 	uint8_t reo_ring_num = QDF_NBUF_CB_RX_CTX_ID(nbuf_list);
 	qdf_wait_queue_head_t *wait_q_ptr;
@@ -174,6 +175,7 @@ static QDF_STATUS dp_rx_tm_thread_enqueue(struct dp_rx_thread *rx_thread,
 	}
 
 	num_elements_in_nbuf = QDF_NBUF_CB_RX_NUM_ELEMENTS_IN_LIST(nbuf_list);
+	nbuf_queued = num_elements_in_nbuf;
 
 	dp_rx_tm_walk_skb_list(nbuf_list);
 
@@ -193,6 +195,8 @@ static QDF_STATUS dp_rx_tm_thread_enqueue(struct dp_rx_thread *rx_thread,
 	if (!head_ptr)
 		goto enq_done;
 
+	QDF_NBUF_CB_RX_NUM_ELEMENTS_IN_LIST(head_ptr) = num_elements_in_nbuf;
+
 	next_ptr_list = head_ptr->next;
 
 	if (next_ptr_list) {
@@ -209,7 +213,7 @@ static QDF_STATUS dp_rx_tm_thread_enqueue(struct dp_rx_thread *rx_thread,
 enq_done:
 	temp_qlen = qdf_nbuf_queue_head_qlen(&rx_thread->nbuf_queue);
 
-	rx_thread->stats.nbuf_queued[reo_ring_num] += num_elements_in_nbuf;
+	rx_thread->stats.nbuf_queued[reo_ring_num] += nbuf_queued;
 
 	if (temp_qlen > rx_thread->stats.nbufq_max_len)
 		rx_thread->stats.nbufq_max_len = temp_qlen;