All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [dpdk-dev] [Bug 488] mlx4: cannot reattach devices
Date: Wed, 10 Jun 2020 11:59:01 +0000	[thread overview]
Message-ID: <bug-488-3@http.bugs.dpdk.org/> (raw)

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.

                 reply	other threads:[~2020-06-10 11:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-488-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.