Skip to content

fix ethdev device detach

Gaetan Rivet dpdk-dev 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 4 repliesIn review
  2. v15 of 6 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- remove coredump from patchset

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ethdev: fix device state on detachapp/test-pmd/testpmd.c lib/librte_ether/rte_ethdev.c+1 -10 replies
2/6ethdev: properly check detach capabilitylib/librte_ether/rte_ethdev.c+0 -100 replies
3/6net/mlx4: advertize the detach capabilitydrivers/net/mlx4/mlx4.c+1 -00 replies
4/6net/mlx5: advertize the detach capabilitydrivers/net/mlx5/mlx5.c+1 -00 replies
5/6app/testpmd: let the user know device detach failedapp/test-pmd/testpmd.c+6 -20 replies
6/6doc: announce ethdev API change for detach flagdoc/guides/rel_notes/deprecation.rst+6 -03 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJohn McNamaraShachar BeiserAdrien MazarguilThomas Monjalon
SeriesT-b A-b
1/6
2/6
3/6
4/6
5/6
6/6A-b A-b A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/6] fix ethdev device detach

Device detach in librte_ether is rough right now.

- Device hotplug capability is not properly checked
- Device state should be set after a successful detach
- MLX drivers are lacking the relevant flag
- And this flag should actually be removed, thus occuring an API change for v17.11. An announce follows.

Without this series on an MLX4 port:

testpmd> port close 0
Closing ports...
Port 0 is now not stopped
Done
testpmd> port stop 0
Stopping ports...
Checking link statuses...
Done
testpmd> port close 0
Closing ports...
Done
testpmd> port detach 0
Detaching a port...
testpmd> show port info 0
Segmentation fault (core dumped)

With this series:

testpmd> port stop 0
Stopping ports...
Checking link statuses...
Done
testpmd> port detach 0
Detaching a port...
Please close port first
testpmd> port close 0
Closing ports...
Done
testpmd> port detach 0
Detaching a port...
Port '00:03.0' is detached. Now total ports is 0 Done
testpmd> show port info 0
Invalid port 0
Valid port range is [0]

v2:

- remove coredump from patchset

Gaetan Rivet (6):
ethdev: fix device state on detach
ethdev: properly check detach capability net/mlx4: advertize the detach capability net/mlx5: advertize the detach capability app/testpmd: let the user know device detach failed
doc: announce ethdev API change for detach flag

 app/test-pmd/testpmd.c               |  9 ++++++---
 doc/guides/rel_notes/deprecation.rst |  6 ++++++
 drivers/net/mlx4/mlx4.c              |  1 +
 drivers/net/mlx5/mlx5.c              |  1 +
 lib/librte_ether/rte_ethdev.c        | 11 +----------
 5 files changed, 15 insertions(+), 13 deletions(-)
Signature · 1 line
2.1.4