From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matan Azrad Subject: [PATCH v5 0/6] Fail-safe\ethdev: fix removal handling lack Date: Wed, 17 Jan 2018 20:19:11 +0000 Message-ID: <1516220357-13013-1-git-send-email-matan@mellanox.com> References: <1515587465-9304-1-git-send-email-matan@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Thomas Monjalon , dev@dpdk.org To: Ferruh Yigit , Adrien Mazarguil , Gaetan Rivet Return-path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10089.outbound.protection.outlook.com [40.107.1.89]) by dpdk.org (Postfix) with ESMTP id 3E03F1B2CC for ; Wed, 17 Jan 2018 21:19:53 +0100 (CET) In-Reply-To: <1515587465-9304-1-git-send-email-matan@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" There is time between the physical removal of the device until sub-device PMDs get a RMV interrupt. At this time DPDK PMDs and applications still don't know about the removal and may call sub-device control operation which should return an error. This series adds new ethdev operation to check device removal, adds support for it in mlx PMDs, adjust ethdev APIs to return -EIO in case of removal and fixes the fail-safe bug of removal error report. V2: Remove ENODEV definition. Remove checks from all mlx control commands. Add new devop - "is_removed". Implement it in mlx4 and mlx5. Fix failsafe bug by the new devop. V3: Adjust ethdev APIs removal error report. Change failsafe check to check eth_dev* return values. Remove backporting of fail-safe patch. V4: Improve fail-safe internal API to adjust the actual error value as discussed. Remove "Fixes" lines from fail-safe patch. No changes in ethdev\mlx patches. V5: Rebase on top of master-net-mlx. Matan Azrad (6): ethdev: add devop to check removal status net/mlx4: support a device removal check operation net/mlx5: support a device removal check operation ethdev: adjust APIs removal error report ethdev: adjust flow APIs removal error report net/failsafe: fix removed device handling drivers/net/failsafe/failsafe_flow.c | 18 ++- drivers/net/failsafe/failsafe_ops.c | 35 +++-- drivers/net/failsafe/failsafe_private.h | 11 ++ drivers/net/mlx4/mlx4.c | 1 + drivers/net/mlx4/mlx4.h | 1 + drivers/net/mlx4/mlx4_ethdev.c | 20 +++ drivers/net/mlx5/mlx5.c | 2 + drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_ethdev.c | 20 +++ lib/librte_ether/rte_ethdev.c | 218 +++++++++++++++++++++----------- lib/librte_ether/rte_ethdev.h | 68 +++++++++- lib/librte_ether/rte_ethdev_version.map | 7 + lib/librte_ether/rte_flow.c | 34 ++++- lib/librte_ether/rte_flow.h | 2 + 14 files changed, 338 insertions(+), 100 deletions(-) -- 1.8.3.1