OSDN Git Service

ath11k: rx path optimizations
authorManikanta Pubbisetty <mpubbise@codeaurora.org>
Thu, 9 Apr 2020 08:43:17 +0000 (14:13 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 14 Apr 2020 08:34:02 +0000 (11:34 +0300)
During RX, accessing the reo dest ring descriptor directly is consuming
a lot of CPU cycles. Accessing the descriptor after copying it locally
has improved CPU usage by around ~10-15% while measuring throughput
in RX DBTC test cases(all radios are involved in the throughput
measurement).

HW tested: IPQ8074

Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1586421797-885-1-git-send-email-mpubbise@codeaurora.org
drivers/net/wireless/ath/ath11k/dp_rx.c

index a3f2c76..203fd44 100644 (file)
@@ -2403,12 +2403,12 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id,
 
 try_again:
        while ((rx_desc = ath11k_hal_srng_dst_get_next_entry(ab, srng))) {
-               struct hal_reo_dest_ring *desc = (struct hal_reo_dest_ring *)rx_desc;
+               struct hal_reo_dest_ring desc = *(struct hal_reo_dest_ring *)rx_desc;
                enum hal_reo_dest_ring_push_reason push_reason;
                u32 cookie;
 
                cookie = FIELD_GET(BUFFER_ADDR_INFO1_SW_COOKIE,
-                                  desc->buf_addr_info.info1);
+                                  desc.buf_addr_info.info1);
                buf_id = FIELD_GET(DP_RXDMA_BUF_COOKIE_BUF_ID,
                                   cookie);
                mac_id = FIELD_GET(DP_RXDMA_BUF_COOKIE_PDEV_ID, cookie);
@@ -2436,7 +2436,7 @@ try_again:
                total_msdu_reaped++;
 
                push_reason = FIELD_GET(HAL_REO_DEST_RING_INFO0_PUSH_REASON,
-                                       desc->info0);
+                                       desc.info0);
                if (push_reason !=
                    HAL_REO_DEST_RING_PUSH_REASON_ROUTING_INSTRUCTION) {
                        dev_kfree_skb_any(msdu);
@@ -2444,15 +2444,15 @@ try_again:
                        continue;
                }
 
-               rxcb->is_first_msdu = !!(desc->rx_msdu_info.info0 &
+               rxcb->is_first_msdu = !!(desc.rx_msdu_info.info0 &
                                         RX_MSDU_DESC_INFO0_FIRST_MSDU_IN_MPDU);
-               rxcb->is_last_msdu = !!(desc->rx_msdu_info.info0 &
+               rxcb->is_last_msdu = !!(desc.rx_msdu_info.info0 &
                                        RX_MSDU_DESC_INFO0_LAST_MSDU_IN_MPDU);
-               rxcb->is_continuation = !!(desc->rx_msdu_info.info0 &
+               rxcb->is_continuation = !!(desc.rx_msdu_info.info0 &
                                           RX_MSDU_DESC_INFO0_MSDU_CONTINUATION);
                rxcb->mac_id = mac_id;
                rxcb->tid = FIELD_GET(HAL_REO_DEST_RING_INFO0_RX_QUEUE_NUM,
-                                     desc->info0);
+                                     desc.info0);
 
                __skb_queue_tail(&msdu_list, msdu);