DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [Bug 488] mlx4: cannot reattach devices
@ 2020-06-10 11:59 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2020-06-10 11:59 UTC (permalink / raw)
  To: dev

https://bugs.dpdk.org/show_bug.cgi?id=488

            Bug ID: 488
           Summary: mlx4: cannot reattach devices
           Product: DPDK
           Version: 18.11
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: major
          Priority: Normal
         Component: other
          Assignee: dev@dpdk.org
          Reporter: david.marchand@redhat.com
  Target Milestone: ---

I reproduced on master and stable/18.11:

# ./master/app/testpmd -c 0x3 -w 0000:00:00.0 -m 2048 --log-level '*:debug' --
--total-num-mbufs 2048 -i
...
testpmd: No probed ethernet devices
Interactive-mode selected
testpmd: create a new mbuf pool <mbuf_pool_socket_0>: n=2048, size=2176,
socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mbuf_pool_socket_1>: n=2048, size=2176,
socket=1
testpmd: preferred mempool ops selected: ring_mp_mc
Done

testpmd> port attach 0000:03:00.0
Attaching a new port...
EAL: PCI device 0000:03:00.0 on NUMA socket 0
EAL:   probe driver: 15b3:1007 net_mlx4
EAL: Probe PCI driver: net_mlx4 (15b3:1007) device: 0000:03:00.0 (socket 0)
EAL: Mem event callback 'MLX4_MEM_EVENT_CB:(nil)' registered
net_mlx4: PCI information matches, using device "mlx4_0" (VF: false)
net_mlx4: 2 port(s) detected
net_mlx4: port 1 MAC address is 24:8a:07:f7:36:d0
net_mlx4: port 2 MAC address is 24:8a:07:f7:36:d1
EAL: request: eal_dev_mp_request
Port 0 is attached. Now total ports is 1
Done
Port 1 is attached. Now total ports is 2
Done

testpmd> port close all
Closing ports...
Port closing is using an old behaviour.
The driver net_mlx4 should migrate to the new behaviour.
Port closing is using an old behaviour.
The driver net_mlx4 should migrate to the new behaviour.
Done

testpmd> port detach 0
Removing a device...
EAL: request: eal_dev_mp_request
EAL: PCI device 0000:03:00.0 on NUMA socket 0
EAL:   remove driver: 15b3:1007 net_mlx4
Device is detached
Now total ports is 2
Done


Here, we can see that the 2 ports associated to this device are still seen in
ethdev.
(gdb) p rte_eth_devices[0].data.name
$1 = "mlx4_0 port 1", '\000' <repeats 50 times>
(gdb) p rte_eth_devices[0].state
$2 = RTE_ETH_DEV_ATTACHED


I had a look at the mlx4 driver and I can't find where port releasing happens
when detaching a device.
I suppose this driver still has to undergo the RTE_ETH_DEV_CLOSE_REMOVE
migration.


Subsequent attach request fails with:

testpmd> port attach 0000:03:00.0
Attaching a new port...
EAL: PCI device 0000:03:00.0 on NUMA socket 0
EAL:   probe driver: 15b3:1007 net_mlx4
EAL: Probe PCI driver: net_mlx4 (15b3:1007) device: 0000:03:00.0 (socket 0)
net_mlx4: PCI information matches, using device "mlx4_0" (VF: false)
net_mlx4: 2 port(s) detected
net_mlx4: port 1 MAC address is 24:8a:07:f7:36:d0
Ethernet device with name mlx4_0 port 1 already allocated
net_mlx4: can not allocate rte ethdev
EAL: Driver cannot attach the device (0000:03:00.0)
EAL: Failed to attach device on primary process
testpmd: Failed to attach port 0000:03:00.0

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

only message in thread, other threads:[~2020-06-10 11:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 11:59 [dpdk-dev] [Bug 488] mlx4: cannot reattach devices 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).