From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gaetan Rivet Subject: [PATCH 0/6] fix ethdev device detach Date: Wed, 26 Jul 2017 15:30:16 +0200 Message-ID: References: <5ec0604196fb087a42fa75e6ddc2a04aab293593.1501047767.git.shacharbe@mellanox.com> Cc: Gaetan Rivet , Thomas Monjalon , Shachar Beiser , Adrien Mazarguil , Nelio Laranjeiro To: dev@dpdk.org Return-path: Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) by dpdk.org (Postfix) with ESMTP id 9ED87374F for ; Wed, 26 Jul 2017 15:30:40 +0200 (CEST) Received: by mail-wr0-f180.google.com with SMTP id 12so131849027wrb.1 for ; Wed, 26 Jul 2017 06:30:40 -0700 (PDT) In-Reply-To: <5ec0604196fb087a42fa75e6ddc2a04aab293593.1501047767.git.shacharbe@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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] 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 ++++++--- core | Bin 0 -> 114331648 bytes 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 +---------- 6 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 core -- 2.1.4