From mboxrd@z Thu Jan 1 00:00:00 1970 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 A34C02B89 for ; Wed, 26 Jul 2017 15:36:10 +0200 (CEST) Received: by mail-wr0-f180.google.com with SMTP id k71so78209802wrc.2 for ; Wed, 26 Jul 2017 06:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=c6IrxeH7sRwlcn52a1Zptuo0yvU+ZAITQDFY3joSgZc=; b=EFIz65CNj5QoMZw3bEKcTT70EZKoUxeuo/BUVUeRrWdlNZJutrj5A79/zvF+xjOmu9 4V9UjKbA0B4LYfFGIoH9i83Qf4l8GLNFckWwyiUHAgK8RTyv79EhPziz37RW8otlb+r7 745axiuyxhccFdTptSvO/Ndsai/sVIacxt1vbkTDDHiqKIz6OQSJkiAY2QaI2i25paDN +RGsN+NmjEeC4t6+OyBf/hpu1iC4e70/HkrRtqfmO00E5u6ZeRRdvX+yEZFHhRysca4R T2wBFK7yqe/RiTE5qR8ijS9RNNro3w0+fg4yWaHBHonzYyOnE4Dfh34T9wiXgUoq52uK EP/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=c6IrxeH7sRwlcn52a1Zptuo0yvU+ZAITQDFY3joSgZc=; b=mEotVnlKMYhd2Y5zsL2P76sGMwfJUC70Z8SUtpIK1rgju/udJk2ppvZKizlwj5cmb2 WgkeVb3LbGW+PwmFE+ogqaoKJuFv6i48VDpM8pK8dsOHr2+CntvtQnKdXvbBCGPWUEjA VihQpPBGSsgGiDrkS1dJ4NZb2MT06XsnBq1UwgG82QIk3QFKWthqD7BU2EZ7ScuUCWi5 GGwwAXVVKCgFNP7PQ+QCz76l8v2RuJ33DYaG8uH0ioFtmOcLpd/dLe4QN098KP4xvCat tyi5YxxQeCNJvp8S4EKz6jCZZM4aU5FzvDUlrjq9RUL7VoZj13aBP65HOo2hl0eA4Kpm QfWQ== X-Gm-Message-State: AIVw113aVJgHwBcB5TorH6O7zR0Xut8GByClNcoY05iL1wybn1c82p6K W842N/byCM4U2Cycxzg= X-Received: by 10.223.130.120 with SMTP id 111mr917488wrb.21.1501076169931; Wed, 26 Jul 2017 06:36:09 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id c13sm3144707wrc.7.2017.07.26.06.36.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Jul 2017 06:36:09 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet , Thomas Monjalon , Shachar Beiser , Adrien Mazarguil , Nelio Laranjeiro Date: Wed, 26 Jul 2017 15:35:51 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 0/6] fix ethdev device detach X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 13:36:10 -0000 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(-) -- 2.1.4