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 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) 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=TxrwSxkLpb9xiStEQtHUfDsG9PiOZbPr0F7E+FcYU+c=; b=UIEdoIcMbXG+0/cg65TQpcI0wV34B05BlLS7o0fMkIrJ0ZTSIEDByR/xd5Ucx2TUxP hJ9x3U2T5hLWnhPdVO65v7ZauxoAJKoU8IsrtbQEJd1c/0NFk+b6pgLlUifl1RO6kGee cWU6eDmcjx06BLG0IGczFx2RkRG4pfsv2aEhu1xVBW6MLVDsQwwZPbGD+Ukfg3hbZfpB 7+4pgjb/RSWfup2ms+koVmC0VL6pI9K9ho33Aen5WhDTRZQfUchzmPpYmFd202u1cHCo VvnWB5Mlb5Wc0PlA/c53zutn+SbIWlpluljSwbHv66GMkSmV0052SJA0NDvxM1jYVdVi dEoA== 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=TxrwSxkLpb9xiStEQtHUfDsG9PiOZbPr0F7E+FcYU+c=; b=FSzruLeRMsZEUR1vwGEaMrQOitzcYWwt98+jCOiGoHCbwiYI/YeIyiwbA3MwcIL52A 5Eb3aTwvBjtTmUguSXhuPFCvboFTnjvPmWblXV58cyN76ecCToJgW0pR6hqIpJAh+eAB jk/1usRLaSxwZJbQITTW2/6X7NSN/U0EsDxyOvVx9UDJ1g87c/rH6VnDUFD0i3Yp58vN Zu7E7KiK4S3bU3YOf4TY5GRbJnTXV1Acv6f9+hakQrHwlg32iWb9+HdjI8//6CdEBbTn C3iA3rxThEC2FL+ERZ9IievfoqqPNNQu0SmNOzY3MGBT9pY+fGKroxO28ADHIkRFkPMd nnXA== X-Gm-Message-State: AIVw112dVaykVsl02fuW/lwSkAX4BwlLUN5m+s/TZQNHmp9d9dWU4szj TtJiUICFFodHlb1gSJk= X-Received: by 10.223.176.148 with SMTP id i20mr833443wra.165.1501075839730; Wed, 26 Jul 2017 06:30:39 -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 d26sm16186659wra.92.2017.07.26.06.30.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Jul 2017 06:30:38 -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:30:16 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: <5ec0604196fb087a42fa75e6ddc2a04aab293593.1501047767.git.shacharbe@mellanox.com> References: <5ec0604196fb087a42fa75e6ddc2a04aab293593.1501047767.git.shacharbe@mellanox.com> Subject: [dpdk-dev] [PATCH 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:30:41 -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] 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