From 770ae511590f9ba3cb56bfbb3136404b3b0f62cf Mon Sep 17 00:00:00 2001 From: Manikanta Pubbisetty Date: Mon, 17 May 2021 17:47:24 +0530 Subject: [PATCH] qcacld-3.0: consider aggregated packets for packet drop Currently, in the DP RX thread packet drop logic, the aggregated packet as a whole is considered as one single packet. An aggregated packet can hold anywhere between 2-16 packets, considering it as a single packet will make the entire drop logic incorrect. Consider all packets in the aggregate while computing the number of enqueues & dequeues to fix the problem. Change-Id: I70e65bcdfdbaf7821b36606ac6eeae61eaca7406 CRs-Fixed: 2948104 --- core/dp/txrx3.0/dp_rx_thread.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/dp/txrx3.0/dp_rx_thread.c b/core/dp/txrx3.0/dp_rx_thread.c index 9f6a4e03d63d..4c2af69b5fab 100644 --- a/core/dp/txrx3.0/dp_rx_thread.c +++ b/core/dp/txrx3.0/dp_rx_thread.c @@ -278,6 +278,8 @@ static QDF_STATUS dp_rx_tm_thread_enqueue(struct dp_rx_thread *rx_thread, qdf_nbuf_set_next(head_ptr, NULL); qdf_nbuf_queue_head_enqueue_tail(&rx_thread->nbuf_queue, head_ptr); + /* count aggregated RX frame into enqueued stats */ + nbuf_queued += qdf_nbuf_get_gso_segs(head_ptr); head_ptr = next_ptr_list; } @@ -418,6 +420,8 @@ static int dp_rx_thread_process_nbufq(struct dp_rx_thread *rx_thread) while (nbuf_list) { num_list_elements = QDF_NBUF_CB_RX_NUM_ELEMENTS_IN_LIST(nbuf_list); + /* count aggregated RX frame into stats */ + num_list_elements += qdf_nbuf_get_gso_segs(nbuf_list); rx_thread->stats.nbuf_dequeued += num_list_elements; vdev_id = QDF_NBUF_CB_RX_VDEV_ID(nbuf_list);