From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10087.outbound.protection.outlook.com [40.107.1.87]) by dpdk.org (Postfix) with ESMTP id 3C64D1B1D8 for ; Thu, 18 Jan 2018 12:27:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=RlhjSZb33MXQ0XJg8jslvuC4luU7rVookXt+5rqEguo=; b=oB+/z93WxmLHsGaejsDFeaXVxtA8nuKEh63FKRfgfQxZhHN5rF1bPl0UgOpSAgGWBZ8nyO5EQfHLXg5H86fDfXJOLl8Y5fAhIyR1mvQd98BA+c6PmH2CRCpin4aI40gGQslRQ3RnmRYdS92etrs+VxmiTVBU0wAPngqWJdbuDN8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by AM6PR0502MB3797.eurprd05.prod.outlook.com (2603:10a6:209:a::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Thu, 18 Jan 2018 11:27:36 +0000 From: Matan Azrad To: Ferruh Yigit , Adrien Mazarguil , Gaetan Rivet Cc: Thomas Monjalon , dev@dpdk.org Date: Thu, 18 Jan 2018 11:27:08 +0000 Message-Id: <1516274834-19755-1-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1516220357-13013-1-git-send-email-matan@mellanox.com> References: <1516220357-13013-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: HE1PR0102CA0042.eurprd01.prod.exchangelabs.com (2603:10a6:7:7d::19) To AM6PR0502MB3797.eurprd05.prod.outlook.com (2603:10a6:209:a::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6326ed77-7b4b-4cfc-9ee1-08d55e667a27 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(2017052603307)(7153060)(7193020); SRVR:AM6PR0502MB3797; X-Microsoft-Exchange-Diagnostics: 1; AM6PR0502MB3797; 3:0/SKLrQnf2TVSqm/9PjTt0RVcZ2DqDZu0yzfyPL+VzP2LDsbOP1P/A1C3NmzTObR/DaxAKSZYcInQCobFtrXgJCGhhS43wbSTd9UXV1LVmf0MbQTR7NvJqB76BUuLyfPv0JrLm/w6iE6QVOQ+M0eRvo/bZ5lYKsqmviUjJTpbYEbruv939BblTTciEel5R9wk8vw08euAJB1fQ1HGYdDoMDLESlPrv3dmVXje3l3op7hfaYq4ZBnrFgGVjZm8Yg/; 25:V/IZfKDa+OUSLLAUBffFQWh315BS4FPZJr1uZul2ueNMZ8B3cPsrG6hfGIR+x8wvxeWXBcGeMxQ8sKiosSbuIcj4ONJH281Yn1F0/0IkOtvuctDNSSCTMAaMpG6dqPjHiWy4moTbr0vG3mvFGQ0/9bVY2WO6CmTrOSw728d4/GMzBbaCH9YdNW87IyxcPKWBFm5k97nn3eL/gGGY6Ts9txDWKve/9eL8T3ezyjzQDF2EMjM6Edy8mOY7yOajKp33/3kuYbn33RjJzMhL3vGm2JT6OPq45dZqtEJEa+Rj2qK5DJoXJVvI9uIrwFtl5V8bq3cEQcX2JwdCD2c9l7XoVg==; 31:kTNxIZBj91t8aKDn3+z/vPHyGDMo8hIVb2u8vQcZFPuHhIHQQ3X81Tghq2dU3u02lbS2klTj1fL6Dh1/9lZnFLG2QlRy9L9Pul7LdzU02rfCnoOc94rp5f0JaWKs4VRSzsoK6RtCDZYG7JTXJsrSDKhbmh2X9ev4MUK6BEuPIwImMvmclnFlJCu6ZdZ/DeFdBJDozSmXsuuc2yp/9PCjKIkSwZmXw2wOa5dGYf6LqKk= X-MS-TrafficTypeDiagnostic: AM6PR0502MB3797: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM6PR0502MB3797; 20:NHB0c68D4Fp18g0Da6F6AYA1nM2KHVmliDwVbGnHshDz7BuPNGVXLwe+csO7G/lJGmNWfxA3M/0BEcLF6iCFbE5YA7bCPMvgFuIKMGWtBrBKXoLP5A7uG15pJUt2zkTF5aNzbAM5XR1yD8s1aLTux69SqWKDfWN0JziXLOf3PjjS570mKGeCprATggHNuq8JtTjspTBEcv4OsvDDvvUndfZwc4kAUntG5Qq/JQzxM170R8dcHwqStIcRd8JcfqbLLG+1UJs+FCgTAy4GdGOsul0Xs3BIDDMt9aNVaBSqKgkcCjByl1bNMB3AfLh3rk49mg/UscyeWTITRB+gAlo1piLN2VTMD7AWfECgnsaoadqHk6JZQX3SbsufIjL0CE1DJidbHVKP+EkNo0/2IaENIj84SEcoNWkXFNYQRRZ6hgOABo+df1nH+KJcUSvFVDAe1EnBrtdrrhSP/G0XIaNlqBgFGMlfg1jjkdl5wNORgWqEUWQ6fA1GxT2P7joi19/X; 4:o9Vhw5G9z5UpjnW5/Qux+V8ZOudvjdoz9NT99nK4ydOesQcGX6YivwLIdvamSN1UINpaehOZCMGn9Wojb4Vrm1ONQU9DkCMn4Oe5JEJADPwGJ6kRczkZ3CxHm3iXQv9voP8ITTdF8j1S/r0DHnn7oA8ZY0JVUWG1TtsiAVT1DIBw1Ge/+uRzBHJTDzqqW8P+1oOASQVvuS4atk0ctG1lKqIZLu5UZVJU/5wthkHKp3v1f74vBb1Ai+hzKsayIRgtGfK8QuvlHqeoFHGZxBDFSHGmCSqTObXyn8PF5QjHui7UrXEdS1bZkFIMYmjZ+O1x X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231023)(2400060)(944501161)(10201501046)(6055026)(6041268)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(6072148)(201708071742011); SRVR:AM6PR0502MB3797; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM6PR0502MB3797; X-Forefront-PRVS: 05568D1FF7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(39860400002)(346002)(39380400002)(396003)(199004)(189003)(53936002)(6116002)(76176011)(386003)(4720700003)(26005)(7736002)(305945005)(50466002)(66066001)(2906002)(47776003)(16586007)(110136005)(478600001)(316002)(25786009)(21086003)(2950100002)(48376002)(6666003)(51416003)(52116002)(7696005)(81156014)(8936002)(81166006)(4326008)(86362001)(16526018)(97736004)(68736007)(36756003)(50226002)(5660300001)(105586002)(69596002)(3846002)(106356001)(33026002)(55016002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0502MB3797; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM6PR0502MB3797; 23:Trd2rJI3J20QOUb2I93d9somQ6410aH1NJyF+wB?= =?us-ascii?Q?mK3lizgVY1L3QX1szbEAbN0mlgKRWr36+YGJAFxFd4YFCU9j3/+T0MLi3r6H?= =?us-ascii?Q?xoHIKoAsgqNx6KFdK0NQNajmEA7f1QE+Sm2yI7BF6MZhRZO0HOYgAbDiFJuv?= =?us-ascii?Q?1M4AX8HeVpZO5teM8YltQ2gDMwJ1a/oplld+OgLmzw6qnlbif4ml+LsysLsa?= =?us-ascii?Q?57PUQxbWED5RPhiUV5+bD66QxkXSldRakO1uj9JGVwWcTE/YKEW9e32bmlvM?= =?us-ascii?Q?Nx1YfpJQzyGiRJ9Pjvfnxt1ot+8b7rqstOCIeevu+Yx2miHXmNH0UfkIhTLR?= =?us-ascii?Q?YMaB3n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ymfu/cnrKjMB3NYlK0cpKGRSfZ7Yp+kardV7jqqEgZphfYw2BpvWPy1IrIPqTxkYM2WZ8Iy68Y5JjR3AzBT/H5jOOm6XEwujMA/Sez5mzlRDb8Se6+c7LE5gzhCfiQUB5P67lciu1j2PmTqZcAXOPNlzlPf4SOM4sbFRt6j4F0TJWLTmzJkVx2xAn8mD34KTLZxu663vz9Ryw3MM3qMzspIUxSpzxXsznZ5etp6JmNcH+c44yqnK2VffBWYn6RJMNgKl6mAPcR8iCT/aUfd4RQx+zhPomr6xrZNz4llfg/oWfF99ZoqGyieiZYR9pnxI8=; 5:snZ38MhjzV1EuVmW7Sxy+5/FB/mGMZ5YzMbj3mPsc1rzcWlMjCHeDxP1kBfkuH+YNnquvooSZpByN/+A+pgl8omZ2hHwWUarMHAzkEX89QisZHjGT08lEjZXYy9gUUwnOkgkXgWV2TS7/Q6C+GsAnXpfExBz9t0dP6SVXjk/CP0=; 24:RQ597OY5BrXNo6TF8S2Lu/+8lPJJ2UwFI6fVhfv98ngo3KIfcZnZQmnUyzE7pFQqpr0mWjXVAIi92zt0agdzogww1AwIgfk/AgmoX0fPR3w=; 7:Jjg/kiH272pgone+pXRAMgQV4/c5ObHceFIKnwhaUCZe007rpQpP0GTAJ0Yku9ZoVFkvkelWhQkXL5JYSTM7dLV5Kr5+jCC8R478ku08cFVjVFnGsMLsSOVgJnVr+yFz35hHZgIImTCrUlt6c9QiZRO+EzEBh9nu1QBwh6siHHIIE4YaCh7UI2Qw2vXO8xIjPIZ4xBlz1jWTS8nDXkviMxYE5eKPJgT+RjnDa+pbXDxurdm3ybDS5UICmaM7ObnT SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 11:27:36.2353 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6326ed77-7b4b-4cfc-9ee1-08d55e667a27 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0502MB3797 Subject: [dpdk-dev] [PATCH v6 0/6] Fail-safe\ethdev: fix removal handling lack 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: Thu, 18 Jan 2018 11:27:39 -0000 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. V6: Move ethdev new API to be EXPERIMENTAL. 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 | 71 ++++++++++- lib/librte_ether/rte_ethdev_version.map | 1 + lib/librte_ether/rte_flow.c | 34 ++++- lib/librte_ether/rte_flow.h | 2 + 14 files changed, 335 insertions(+), 100 deletions(-) -- 1.8.3.1