netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v3 0/3] bnxt_en: support header page pool in queue API
@ 2024-12-04  4:10 David Wei
  2024-12-04  4:10 ` [PATCH net v3 1/3] bnxt_en: refactor tpa_info alloc/free into helpers David Wei
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: David Wei @ 2024-12-04  4:10 UTC (permalink / raw)
  To: netdev, Michael Chan, Andy Gospodarek, Somnath Kotur
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, David Wei

Commit 7ed816be35ab ("eth: bnxt: use page pool for head frags") added a
separate page pool for header frags. Now, frags are allocated from this
header page pool e.g. rxr->tpa_info.data.

The queue API did not properly handle rxr->tpa_info and so using the
queue API to i.e. reset any queues will result in pages being returned
to the incorrect page pool, causing inflight != 0 warnings.

Fix this bug by properly allocating/freeing tpa_info and copying/freeing
head_pool in the queue API implementation.

The 1st patch is a prep patch that refactors helpers out to be used by
the implementation patch later.

The 2nd patch is a drive-by refactor. Happy to take it out and re-send
to net-next if there are any objections.

The 3rd patch is the implementation patch that will properly alloc/free
rxr->tpa_info.

---
v3:
 - use common helper bnxt_separate_head_pool() instead of comparing
   head_pool and page_pool
 - better document why TPA changes were needed in patch 3
v2:
 - remove unneeded struct bnxt_rx_ring_info *rxr declaration
 - restore unintended removal of page_pool_disable_direct_recycling()

David Wei (3):
  bnxt_en: refactor tpa_info alloc/free into helpers
  bnxt_en: refactor bnxt_alloc_rx_rings() to call
    bnxt_alloc_rx_agg_bmap()
  bnxt_en: handle tpa_info in queue API implementation

 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 205 ++++++++++++++--------
 1 file changed, 129 insertions(+), 76 deletions(-)

-- 
2.43.5


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

end of thread, other threads:[~2024-12-31 11:50 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04  4:10 [PATCH net v3 0/3] bnxt_en: support header page pool in queue API David Wei
2024-12-04  4:10 ` [PATCH net v3 1/3] bnxt_en: refactor tpa_info alloc/free into helpers David Wei
2024-12-04  4:10 ` [PATCH net v3 2/3] bnxt_en: refactor bnxt_alloc_rx_rings() to call bnxt_alloc_rx_agg_bmap() David Wei
2024-12-04  4:10 ` [PATCH net v3 3/3] bnxt_en: handle tpa_info in queue API implementation David Wei
2024-12-10 12:25   ` Yunsheng Lin
2024-12-10 18:14     ` David Wei
2024-12-11 12:32       ` Yunsheng Lin
2024-12-11 16:10         ` David Wei
2024-12-11 17:11           ` Michael Chan
2024-12-12  0:48             ` Jakub Kicinski
2024-12-12 11:23               ` Yunsheng Lin
2024-12-12 14:56                 ` Jakub Kicinski
2024-12-13 12:17                   ` Yunsheng Lin
2024-12-31 11:49                     ` Yunsheng Lin
2024-12-16 21:41             ` David Wei
2024-12-16 22:48               ` Michael Chan
2024-12-16 22:59                 ` David Wei
2024-12-04 22:43 ` [PATCH net v3 0/3] bnxt_en: support header page pool in queue API Michael Chan
2024-12-05  3:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).