[DPDK/ethdev Bug 1484] net/netvsc deadlock during VF hot add when setting MTU
bugzilla at dpdk.org
bugzilla at dpdk.org
Tue Jul 9 21:07:10 CEST 2024
https://bugs.dpdk.org/show_bug.cgi?id=1484
Bug ID: 1484
Summary: net/netvsc deadlock during VF hot add when setting MTU
Product: DPDK
Version: 23.11
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: dev at dpdk.org
Reporter: joshua.knight at netscout.com
Target Milestone: ---
Created attachment 284
--> https://bugs.dpdk.org/attachment.cgi?id=284&action=edit
netvsc deadlock patch
This issue is seen on DPDK 23.11.1 running on Ubuntu 22.04 in Micrsoft Azure.
During VF hot add, there is a deadlock that occurs when the MTU is being set.
The hn_vf_add function takes the VF write lock, then proceeds to call
hn_vf_mtu_set which attempts to take the read lock, causing deadlock.
We originally found this while cherrypicking this commit
"0479315ce9636e43affc6d24d39c63bbd1f44d5a net/netvsc: support MTU set" to
22.11, but we are able to reproduce it in 23.11.1
I've attached a patch we are using to work around this issue, by not
additionally locking while setting MTU.
You can reproduce this easily with the testpmd on Ubuntu.
In 22.11 when the hn_vf_attach function is called it eventually ends in the VF
port being started
hn_vf_attach(): Couldn't find port for VF
hn_vf_add(): RNDIS reports VF but device not found, retrying
hn_vf_attach(): Couldn't find port for VF
hn_vf_add(): RNDIS reports VF but device not found, retrying
netvsc_hotplug_retry(): Found matching MAC address, adding device 997f:00:02.0
network name enP39295s2
EAL: Probe PCI driver: mlx5_pci (15b3:1016) device: 997f:00:02.0 (socket 0)
mlx5_net: No available register for sampler.
Port 0: link state change event
hn_vf_attach(): found matching VF port 0
hn_vf_add(): configuring VF port 0
hn_vf_add(): Starting VF port 0
In 23.11.1 however, it never gets past configuring the port stage. Attempting
to exit testpmd with 'quit' hangs as well, waiting for lcores to finish which
never happens.
hn_vf_attach(): Couldn't find port for VF
hn_vf_add(): RNDIS reports VF but device not found, retrying
hn_vf_attach(): Couldn't find port for VF
hn_vf_add(): RNDIS reports VF but device not found, retrying
netvsc_hotplug_retry(): Found matching MAC address, adding device 997f:00:02.0
network name enP39295s2
EAL: Probe PCI driver: mlx5_pci (15b3:1016) device: 997f:00:02.0 (socket 0)
mlx5_net: No available register for sampler.
Port 0: link state change event
hn_vf_attach(): found matching VF port 0
hn_vf_add(): configuring VF port 0
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20240709/b8e8f27f/attachment-0001.htm>
More information about the dev
mailing list