[PATCH v3 0/6] net/netvsc: bug fixes and runtime queue reconfiguration
Long Li
longli at microsoft.com
Tue Mar 3 04:56:37 CET 2026
> -----Original Message-----
> From: Long Li <longli at microsoft.com>
> Sent: Monday, March 2, 2026 6:54 PM
> To: dev at dpdk.org
> Cc: stephen at networkplumber.org; Long Li <longli at microsoft.com>; Wei Hu
> <weh at microsoft.com>; stable at dpdk.org
> Subject: [PATCH v3 0/6] net/netvsc: bug fixes and runtime queue reconfiguration
>
> This series fixes several resource management bugs in the netvsc PMD and adds
> support for runtime queue count reconfiguration.
Please discard this series. Didn't pass tests.
I will send v4 after clearing all tests.
Long
>
> Patches 1-5 are bug fixes:
> 1. Subchannel leak on device removal — subchannels allocated during
> configure are never closed in uninit.
> 2. Double-free of primary Rx queue — hn_dev_free_queues() already
> frees hv->primary, then uninit frees it again.
> 3. Init error path leaks — hv->primary and hv->channels[0] not freed
> on failure after allocation.
> 4. Event callback leak — device event callback not unregistered when
> rxfilter or vf_start fails in hn_dev_start().
> 5. MTU change path leaks — missing chimney bitmap teardown/rebuild,
> rxbuf_info leak, and VMBus channel close before free.
>
> Patch 6 adds runtime queue count reconfiguration via port stop/configure/start,
> with full NVS/RNDIS session teardown and reinit when the queue count changes.
>
> v3:
> - Split into 6 patches: 5 bug fixes (patches 1-5) + 1 feature (patch 6)
> - New patch 2: fix double-free of primary Rx queue on uninit
> - New patch 3: fix resource leak in init error path
> - New patch 4: fix event callback leak on rxfilter/vf_start failure
> - New patch 5: fix resource leaks in MTU change path (chimney bitmap,
> rxbuf_info leak, missing VMBus chan close before free)
> - Patch 6 (reconfig): fix subchan_cleanup to call hn_rndis_conf_offload
> so device retains offload config on partial failure
> - Patch 6 (reconfig): fix recovery path to set hv->primary->chan after
> re-opening channel, preventing use-after-free of stale pointer
> - Patch 6 (reconfig): add hn_chim_init in recovery path to rebuild
> chimney bitmap after successful recovery
> - Fix Fixes tag on patch 5 to point to correct MTU support commit
>
> v2:
> - Split subchannel leak fix into separate patch with Fixes tag (patch 1)
> - Fix reinit_failed recovery: re-map device before chan_open when device
> is unmapped to prevent undefined behavior on unmapped ring buffers
> - Move hn_rndis_conf_offload() to after reinit block so offload config
> targets the final RNDIS session instead of being lost on teardown
> - Use write lock in hn_vf_tx/rx_queue_release() to prevent race with
> concurrent fast-path readers holding read lock
> - Reset RSS indirection table to queue 0 in subchan_cleanup error path
> - Fix multi-line comment style to follow DPDK convention
>
> Long Li (6):
> net/netvsc: fix subchannel leak on device removal
> net/netvsc: fix double-free of primary Rx queue on uninit
> net/netvsc: fix resource leak in init error path
> net/netvsc: fix event callback leak on rxfilter failure
> net/netvsc: fix resource leaks in MTU change path
> net/netvsc: support runtime queue count reconfiguration
>
> drivers/net/netvsc/hn_ethdev.c | 243 ++++++++++++++++++++++++++++++---
> drivers/net/netvsc/hn_vf.c | 16 ++-
> 2 files changed, 234 insertions(+), 25 deletions(-)
>
> --
> 2.43.0
More information about the dev
mailing list