public inbox for ath12k@lists.infradead.org
 help / color / mirror / Atom feed
* Allocating more RX descriptors that can fit in their related rings
@ 2024-09-04 18:01 Remi Pommarel
  2024-09-05 18:36 ` Kalle Valo
  2024-09-06  3:57 ` Karthikeyan Periyasamy
  0 siblings, 2 replies; 7+ messages in thread
From: Remi Pommarel @ 2024-09-04 18:01 UTC (permalink / raw)
  To: ath12k; +Cc: Nicolas Escande

Hello,

As far as I understand a bunch (ATH12K_RX_DESC_COUNT) of rx descriptors
gets allocated, then CMEM is configured for those descriptors cookie
conversion and is kept available in dp->rx_desc_free_list pool.

Those descriptors seem to be used to fed two different rings, the
rx_refill_buf_ring ring via ath12k_dp_rx_bufs_replenish() and the
reo_reinject_ring one with ath12k_dp_rx_h_defrag_reo_reinject(). While
the former is kept fully used if possible the latter is only used on
demand (i.e. reinjection of defragmented MPDU).

It seems that the number of RX descriptors ATH12K_RX_DESC_COUNT (12288)
is higher than what those two rings can fit (DP_REO_REINJECT_RING_SIZE +
DP_RXDMA_BUF_RING_SIZE = 4096 + 32 = 4128).

My question is why are we allocating that much (12288) buffer if only a
small part (4128) can be used in worst case ?

Wouldn't it be ok to only allocate just enough RX descriptors to fill
both ring (with proper 512 alignment to ease CMEM configuration) as
below ?

 #define ATH12K_RX_DESC_COUNT   ALIGN(DP_REO_REINJECT_RING_SIZE + \
                                      DP_RXDMA_BUF_RING_SIZE, \
                                      ATH12K_MAX_SPT_ENTRIES)

Or am I missing something and this is going to impact performances ?

Thanks

-- 
Remi


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-09-09 13:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-04 18:01 Allocating more RX descriptors that can fit in their related rings Remi Pommarel
2024-09-05 18:36 ` Kalle Valo
2024-09-06  3:57 ` Karthikeyan Periyasamy
2024-09-06  4:00   ` Karthikeyan Periyasamy
2024-09-06 16:09     ` Remi Pommarel
2024-09-07  2:39       ` Karthikeyan Periyasamy
2024-09-09 13:12         ` Remi Pommarel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox