All of lore.kernel.org
 help / color / mirror / Atom feed
From: Serhii Iliushyk <sil-plv@napatech.com>
To: stephen@networkplumber.org, mko-plv@napatech.com, ckm@napatech.com
Cc: dev@dpdk.org
Subject: [PATCH v1 0/3]  net/ntnic: fix virt queue data in BSS
Date: Tue,  8 Sep 2026 18:27:21 +0200	[thread overview]
Message-ID: <20260908162724.463767-1-sil-plv@napatech.com> (raw)

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


             reply	other threads:[~2026-09-08 16:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 16:27 Serhii Iliushyk [this message]
2026-09-08 16:27 ` [PATCH v1 1/3] net/ntnic: remove unused unmanaged virt queue setup ops Serhii Iliushyk
2026-09-08 16:27 ` [PATCH v1 2/3] net/ntnic: check virt queue hardware setup result Serhii Iliushyk
2026-09-08 16:27 ` [PATCH v1 3/3] net/ntnic: fix virt queue data in BSS Serhii Iliushyk
2026-09-08 17:18 ` [PATCH v1 0/3] " Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260908162724.463767-1-sil-plv@napatech.com \
    --to=sil-plv@napatech.com \
    --cc=ckm@napatech.com \
    --cc=dev@dpdk.org \
    --cc=mko-plv@napatech.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.