DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] net/mana: add device reset support
@ 2026-05-22  6:59 Wei Hu
  2026-05-22  6:59 ` [PATCH v3 1/2] " Wei Hu
  2026-05-22  6:59 ` [PATCH v3 2/2] net/mana: add documentation for " Wei Hu
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Hu @ 2026-05-22  6:59 UTC (permalink / raw)
  To: dev, stephen; +Cc: longli, weh

From: Wei Hu <weh@microsoft.com>

Add support for handling hardware service reset events in the
MANA driver. When the MANA kernel driver receives a hardware
service event, it initiates a device reset and notifies userspace
via IBV_EVENT_DEVICE_FATAL. The MANA PMD handles this by
performing an automatic teardown and recovery sequence.

The driver uses ethdev recovery events (ERR_RECOVERING,
RECOVERY_SUCCESS, RECOVERY_FAILED) to notify upper layers of
the reset lifecycle, and a PCI device removal event callback
to distinguish hot-remove from service reset.

Changes since v2:
- Fixed dev_state_qsv memory leak on device removal
- Fixed reset thread TCB/stack leak: reset_thread_active is now
  only cleared by the joiner, not the thread itself
- Fixed second reset crash: removed reset thread join logic from
  mana_dev_close (inner function) to avoid corrupting dev_state
  when called from mana_reset_enter
- Made reset_thread_active RTE_ATOMIC(bool) with explicit ordering
- Added retry loop for rte_dev_event_callback_unregister on -EAGAIN
- Initialized condvar/mutex with PTHREAD_PROCESS_SHARED since priv
  is in hugepage shared memory
- Added re-check of dev_state after lock acquisition in
  mana_intr_handler to prevent racing with pci_remove_event_cb
- Replaced (void *)0 with NULL in mp.c
- Added lock ownership comment block at mana_reset_enter
- Documented rte_dev_event_monitor_start() requirement
- Added mana.rst documentation and release note (patch 2/2)

Changes since v1:
- Removed net/netvsc patch from this series
- Simplified reset exit: mana_reset_exit calls
  mana_reset_exit_delay directly instead of spawning a thread
- Added __rte_no_thread_safety_analysis annotations for clang
- Switched to rte_thread_create_internal_control
- Fixed declaration-after-statement style issues
- Removed unnecessary blank lines and stale comments

Wei Hu (2):
  net/mana: add device reset support
  net/mana: add documentation for device reset support

 doc/guides/nics/mana.rst               |  33 +
 doc/guides/rel_notes/release_26_07.rst |   8 +
 drivers/net/mana/mana.c                | 995 ++++++++++++++++++++++---
 drivers/net/mana/mana.h                |  33 +-
 drivers/net/mana/meson.build           |   2 +-
 drivers/net/mana/mp.c                  |  89 ++-
 drivers/net/mana/mr.c                  |   6 +-
 drivers/net/mana/rx.c                  |  24 +-
 drivers/net/mana/tx.c                  |  40 +-
 9 files changed, 1123 insertions(+), 107 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-22  7:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22  6:59 [PATCH v3 0/2] net/mana: add device reset support Wei Hu
2026-05-22  6:59 ` [PATCH v3 1/2] " Wei Hu
2026-05-22  6:59 ` [PATCH v3 2/2] net/mana: add documentation for " Wei Hu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox