Commit b537633
bnxt_en: update xdp_rxq_info in queue restart logic
When the netdev_rx_queue_restart() restarts queues, the bnxt_en driver
updates(creates and deletes) a page_pool.
But it doesn't update xdp_rxq_info, so the xdp_rxq_info is still
connected to an old page_pool.
So, bnxt_rx_ring_info->page_pool indicates a new page_pool, but
bnxt_rx_ring_info->xdp_rxq is still connected to an old page_pool.
An old page_pool is no longer used so it is supposed to be
deleted by page_pool_destroy() but it isn't.
Because the xdp_rxq_info is holding the reference count for it and the
xdp_rxq_info is not updated, an old page_pool will not be deleted in
the queue restart logic.
Before restarting 1 queue:
./tools/net/ynl/samples/page-pool
enp10s0f1np1[6] page pools: 4 (zombies: 0)
refs: 8192 bytes: 33554432 (refs: 0 bytes: 0)
recycling: 0.0% (alloc: 128:8048 recycle: 0:0)
After restarting 1 queue:
./tools/net/ynl/samples/page-pool
enp10s0f1np1[6] page pools: 5 (zombies: 0)
refs: 10240 bytes: 41943040 (refs: 0 bytes: 0)
recycling: 20.0% (alloc: 160:10080 recycle: 1920:128)
Before restarting queues, an interface has 4 page_pools.
After restarting one queue, an interface has 5 page_pools, but it
should be 4, not 5.
The reason is that queue restarting logic creates a new page_pool and
an old page_pool is not deleted due to the absence of an update of
xdp_rxq_info logic.
Fixes: 2d694c2 ("bnxt_en: implement netdev_queue_mgmt_ops")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Reviewed-by: David Wei <dw@davidwei.uk>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Link: https://patch.msgid.link/20240721053554.1233549-1-ap420073@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent f7578df commit b537633
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4052 | 4052 | | |
4053 | 4053 | | |
4054 | 4054 | | |
| 4055 | + | |
4055 | 4056 | | |
4056 | 4057 | | |
4057 | 4058 | | |
| |||
15018 | 15019 | | |
15019 | 15020 | | |
15020 | 15021 | | |
| 15022 | + | |
| 15023 | + | |
| 15024 | + | |
| 15025 | + | |
| 15026 | + | |
| 15027 | + | |
| 15028 | + | |
| 15029 | + | |
| 15030 | + | |
| 15031 | + | |
15021 | 15032 | | |
15022 | 15033 | | |
15023 | 15034 | | |
| |||
15047 | 15058 | | |
15048 | 15059 | | |
15049 | 15060 | | |
| 15061 | + | |
| 15062 | + | |
| 15063 | + | |
15050 | 15064 | | |
15051 | 15065 | | |
15052 | 15066 | | |
| |||
15062 | 15076 | | |
15063 | 15077 | | |
15064 | 15078 | | |
| 15079 | + | |
| 15080 | + | |
15065 | 15081 | | |
15066 | 15082 | | |
15067 | 15083 | | |
| |||
15145 | 15161 | | |
15146 | 15162 | | |
15147 | 15163 | | |
| 15164 | + | |
15148 | 15165 | | |
15149 | 15166 | | |
15150 | 15167 | | |
| |||
0 commit comments