Port needs to be stopped and then closed before it can be detached,
but the documentation was only saying to close the port.
Also, both sections for port detaching and attaching has been reformatted
slightly, to show clearly how to use the commands.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
-Attach a port specified by pci address or virtual device args.
+Attach a port specified by pci address or virtual device args::
+
+ testpmd> port attach (identifier)
To attach a new pci device, the device should be recognized by kernel first.
Then it should be moved under DPDK management.
To attach a new pci device, the device should be recognized by kernel first.
Then it should be moved under DPDK management.
To attach a port created by virtual device, above steps are not needed.
To attach a port created by virtual device, above steps are not needed.
-port attach (identifier)
-
For example, to attach a port whose pci address is 0000:0a:00.0.
.. code-block:: console
For example, to attach a port whose pci address is 0000:0a:00.0.
.. code-block:: console
-Detach a specific port.
-
-Before detaching a port, the port should be closed::
+Detach a specific port::
testpmd> port detach (port_id)
testpmd> port detach (port_id)
+Before detaching a port, the port should be stopped and closed.
+
For example, to detach a pci device port 0.
.. code-block:: console
For example, to detach a pci device port 0.
.. code-block:: console
+ testpmd> port stop 0
+ Stopping ports...
+ Done
testpmd> port close 0
Closing ports...
Done
testpmd> port close 0
Closing ports...
Done
+ testpmd> port stop 0
+ Stopping ports...
+ Done
testpmd> port close 0
Closing ports...
Done
testpmd> port close 0
Closing ports...
Done