DPDK patches and discussions
 help / color / mirror / Atom feed
* [DPDK/ethdev Bug 1484] net/netvsc deadlock during VF hot add when setting MTU
@ 2024-07-09 19:07 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2024-07-09 19:07 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 2758 bytes --]

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@dpdk.org
          Reporter: joshua.knight@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.

[-- Attachment #2: Type: text/html, Size: 4801 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-09 19:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-09 19:07 [DPDK/ethdev Bug 1484] net/netvsc deadlock during VF hot add when setting MTU bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).