Skip to content

RFC ethdev: introduce device reinitialisation API

Ciara Loftus dpdk-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ethdev: introduce device reinitialisation APIlib/ethdev/ethdev_driver.h lib/ethdev/ethdev_trace.h lib/ethdev/ethdev_trace_points.c +2 more+71 -00 replies
2/3net/iavf: implement device reinitialisation callbackdrivers/net/intel/iavf/iavf.h drivers/net/intel/iavf/iavf_ethdev.c drivers/net/intel/iavf/iavf_vchnl.c+43 -130 replies
3/3app/testpmd: support port reinitialisationapp/test-pmd/cmdline.c app/test-pmd/testpmd.c app/test-pmd/testpmd.h+37 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/3] ethdev: introduce device reinitialisation API

This RFC arose from a discussion [1] around whether a generic API that performs device reset and reinitialisation would be useful. While the net effect of a call to such an API can be achieved with a sequence of calls to existing APIs (reset, configure, rx/tx queue_setup), the benefit of encapsulating this all under one API is twofold:
1. the burden is taken off the user for supplying the device configuration in the call, we use the existing device conf under the hood and only need the port_id as input.
2. it can prevent potential unnecessary/repeat reconfiguration steps. The PMD dev_reinit ops will only perform the necessary reconfiguration steps after the device reset.

Patch 1 implements the API, Patch 2 implements one example of the reinit op for the iavf driver and Patch 3 integrates the API into testpmd.

[1] https://mails.dpdk.org/archives/dev/2025-October/325386.html

Ciara Loftus (3):
ethdev: introduce device reinitialisation API net/iavf: implement device reinitialisation callback app/testpmd: support port reinitialisation

 app/test-pmd/cmdline.c               | 15 +++++---
 app/test-pmd/testpmd.c               | 26 ++++++++++++++
 app/test-pmd/testpmd.h               |  1 +
 drivers/net/intel/iavf/iavf.h        |  2 +-
 drivers/net/intel/iavf/iavf_ethdev.c | 52 ++++++++++++++++++++++------
 drivers/net/intel/iavf/iavf_vchnl.c  |  2 +-
 lib/ethdev/ethdev_driver.h           |  4 +++
 lib/ethdev/ethdev_trace.h            |  7 ++++
 lib/ethdev/ethdev_trace_points.c     |  3 ++
 lib/ethdev/rte_ethdev.c              | 32 +++++++++++++++++
 lib/ethdev/rte_ethdev.h              | 25 +++++++++++++
 11 files changed, 151 insertions(+), 18 deletions(-)
Signature · 1 line
2.34.1