[PATCH v1 0/3] net/ntnic: fix virt queue data in BSS
Serhii Iliushyk
sil-plv at napatech.com
Tue Sep 8 18:27:21 CEST 2026
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(-)
--
2.45.0
More information about the dev
mailing list