net/ntnic: fix virt queue data in BSS
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | net/ntnic: remove unused unmanaged virt queue setup opsdrivers/ drivers/ | +0 | 0 replies | |
| 2/3 | net/ntnic: check virt queue hardware setup resultdrivers/ | +88 | 0 replies | |
| 3/3 | net/ntnic: fix virt queue data in BSSdrivers/ drivers/ | +173 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH v1 0/3] net/ntnic: fix virt queue data in BSS
This series addresses the bug report "ntnic: virt queue data in BSS" (Bugzilla ID: 1975). The report lists five problems with keeping the virt queue state in static arrays; each is addressed as follows.
- BSS memory is slower than hugepages because of TLB overhead, which can cause performance loss in the hot path.
The per-queue state, and the copy of the packet buffer descriptors indexed on every burst, are now allocated from the EAL heap.
- Hard coding the size wastes space.
The 128-entry Rx and Tx arrays are gone; one object is allocated per configured queue and freed when the queue is released.
- Data in BSS is not visible to a secondary process.
The state now lives in EAL memory. The PMD still does not support primary/secondary operation, but this no longer stands in the way.
- NUMA aware allocation was not possible.
Both allocations are made with rte_zmalloc_socket() on the NUMA node of the adapter, next to the rings and buffers they describe.
- Cache alignment.
The queue object is cache line aligned and no longer shares a line with a neighboring queue.
Patch 1 drops two never-called setup ops so that only the managed setup and release paths own the queue state. Patch 2 makes a failed hardware setup visible to the caller, which patch 3 relies on to free the queue object on failure. Patch 3 is the fix itself; it also fixes a leak of the descriptor copy on queue re-setup and an ignored allocation failure that led to a NULL dereference in the burst functions.
Serhii Iliushyk (3):
net/ntnic: remove unused unmanaged virt queue setup ops net/ntnic: check virt queue hardware setup result net/ntnic: fix virt queue data in BSS
drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c | 334 +++++++++++------- drivers/net/ntnic/ntnic_ethdev.c | 52 ++- drivers/net/ntnic/ntnic_mod_reg.h | 30 -- 3 files changed, 245 insertions(+), 171 deletions(-)
Signature · 1 line
2.45.0