From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20059.outbound.protection.outlook.com [40.107.2.59]) by dpdk.org (Postfix) with ESMTP id 479F4107A for ; Wed, 13 Dec 2017 15:29:44 +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=JFTUL637coI0eN1+jOP0XlFJKTo5nYlXrQMRBJj9edc=; b=TyJ80+X3PtSIqJZ6lZL8JtCqcR4jK6SQiCz7/i8idmBPdXgwZSCLzg128S9NGEYun46lT4d0JG9So7yeavEiMqOPdn/0Y23VkH0bKOTHrvbACVI0zekWapfZneopAXPfyzLKPSiw69ll4a23PnxYYwxiVE2tznXiyj7WIAcYWRE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by AM0PR0502MB3649.eurprd05.prod.outlook.com (2603:10a6:208:1d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Wed, 13 Dec 2017 14:29:41 +0000 From: Matan Azrad To: Adrien Mazarguil , Thomas Monjalon , Gaetan Rivet Cc: dev@dpdk.org Date: Wed, 13 Dec 2017 14:29:26 +0000 Message-Id: <1513175370-16583-1-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1509637324-13525-1-git-send-email-matan@mellanox.com> References: <1509637324-13525-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: DB6PR0301CA0049.eurprd03.prod.outlook.com (2603:10a6:4:54::17) To AM0PR0502MB3649.eurprd05.prod.outlook.com (2603:10a6:208:1d::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6b1ac171-8ea4-435f-285c-08d54235f364 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081)(2017052603307); SRVR:AM0PR0502MB3649; X-Microsoft-Exchange-Diagnostics: 1; AM0PR0502MB3649; 3:O2bHZNDkD/Vwsw3Nnyta8gBjPgER4/I0uWwbz08pa5/jtEULDKJoM+786KE7Vlt1AP5UyP8DpckjHI+cFLnx0OpP24xSZPtzAV0XfHmH1EhpjXMBJGMvslq9iW4ohG/PByYLCmfOTU0m1xrG5DIW+rhWPg6B6VIIuREJfeyFXbUwzs7t+yZqsbCeLMkWDGqr2rPCcyBWndZ9zc7PPB6iFW7lxGk53dQk+OR7CfQQbZIy0GGDHuQGXKG4FAo7dzeX; 25:1Sqgh4Q5cv8fV5J58ahaw2IcNnGr5EF4IFP9MFeJtMeV3CjuzEsX+B6YxK4c+yaR+fdhyUUUIor5QehTiN0nAqH3Yuw0L0Mr7h2jLhS4Oz2h+bN+1jRYHSTUHQslwCDVztp8t2EwzTnlQxeM5Oksz6+wbpQIZ8zMT8SM40nJQJcK7HIJ7JMLObJ8ff5C9l1mLIs+qooLNxE7PpXG5Byf5fJN0cmQbGMbHFaCkNHyME0bLMZS+DdxMfqMYfjNShG70by3neRiOvNGz3rD2EWDZ4vPnmB8iogrKzkLjbxeykj5sWEt17V39m+7ofZhcXX4rFmECfbtVfAHSTxOhqjW8w==; 31:mz8kEuDY/NzCjSDu/SO+Uml4ytHfeXuFTORb9pRchRDGKrMtR1lvzGegFB2L9eGqkQbw0SE59JdXpP/Km/aZWLo0Johw7wxXGU95cwWtWCmbQbpTg0fOFX4Nm2QZUbCfl6CQPRZA8j/KjJtd7d8NCNOVupMt6dgOfzhxW9U+z/YRirmo4JJhLKeYCkzIJoFieKWD/B5jWaXUS4/nwa84fPs7+se3l+Xm4OHNupi04kE= X-MS-TrafficTypeDiagnostic: AM0PR0502MB3649: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM0PR0502MB3649; 20:MtowWL9530yhfvHc0t3gGW79Cf0BcskKwJ1jcOb0Td3MoQ5fih/na9lNHcLHPnlW8SqBIWwqzgdMzM3usJ2uBK7GXsW0kcV+qNryYPrjLr0JwzS3er8BBUtlfpGPclShcWm3O4RGmn8Mqm7MerUkQt7IHVqb9wJiLHUwITFfw/UUeN58ohuj0d6Dw82H8ULquRjWSOkovKXXVmPYpmhareHDXT6To7OJ9c9S6vz2V+dPBzQnTJ+5JsXZUcpqtCmglLx1KCh4zR7McVc+7XGboEGOwW6s/qY9Bex0i3Gx9tYOzlW3K7fU3g+kvfidAIvjYhSfFcQhwC0apxzz5Q2ByK6R0QMdPyF0v8vWIH8Rks70LXZN80i4O/YwsBQMwZ8oWrriV7knR1JmUWOkFFw0oySD6o/X6UpqNBawID6WYGYtTHkIXwTW8812FB3UwjEpMW7G6MS/MtRgRR4MdK7mY+anL7W1/BJeeWJjFDv94HjWe0aT4wfT3r0X5bndsiFc; 4:eTEE9gJ/LcA5f5sG4+3ofwbCW4kVUwi80dgqROFJeiqIKt+k9qqjJmKgbMUpYY+L2M8hckm9NaKJc/c7Q5IVuHisH7JpmljVI200AnCklqQHEaaG5WFFdELAQk0ZA4M1yPtr7tVJ9Xkr6oDEQgLIdYOtJnESbKwcVECLUECVudgz5NwnEAjHGtw6lY/Z4UhwVDtzM5nDVhXdGt8qruJDF03GvC+SVmjolbIeVPkhHrJA3gso1WcT3Wi3kFHhCKYpuANG1WJnE8ch+GnMNHfYymWde4bNi9HumQuZhifKItcpgVIdsjCNHSafxgGWLsKq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(3231023)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123560025)(20161123558100)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM0PR0502MB3649; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM0PR0502MB3649; X-Forefront-PRVS: 052017CAF1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(376002)(346002)(199004)(189003)(8936002)(305945005)(16526018)(51416003)(7696005)(106356001)(68736007)(52116002)(4326008)(81156014)(3846002)(16586007)(81166006)(36756003)(6116002)(97736004)(316002)(76176011)(8676002)(86362001)(5660300001)(33026002)(66066001)(7736002)(4720700003)(53936002)(47776003)(478600001)(2906002)(69596002)(6666003)(25786009)(110136005)(55016002)(50226002)(48376002)(2950100002)(50466002)(21086003)(386003)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3649; 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; AM0PR0502MB3649; 23:0NdqUCUMsvbQceM88LnvEgJZTbF5H7wWkNp7bXM?= =?us-ascii?Q?eGHMBdtlyRi/TYiAg75MbXWqK+b7TntZIxL+bumxTYRxxyRN5JmsAb6VjORn?= =?us-ascii?Q?TNrvQguzK3EEL4Gcqdj7n0+b7cPT4WfbfZzpqjgUWjfiMQPaUL2shjiEI8ql?= =?us-ascii?Q?ZQbR4QewlLcLViWhtAf0f/5LXs7f1QclOvbPGrxwIwVymD4rq0iFMYFV+DhK?= =?us-ascii?Q?hE9ILCmFKHGy9SlQsQXL4HPZkHW7sS4i2+/EiUYsqpDShVoy7eKGgsZCOoMj?= =?us-ascii?Q?sPG6vqDfeu15xHiKrtdFyrp0ImYJYhjtXYa5QYjWoPv9QolM+kGLA3NOVQCx?= =?us-ascii?Q?+OcQW1QCf5fk2bHCIzTC/WlUdoqH9S6ul06Ju0I69uCt6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haRaCMwdHXq+GNLchuO7x+01Srjgl6yGbsVrCmqntHDltSaohYJF4azbK6k6sac0Tfe02DIs8pQiUimvMguErIAQK+dopCDCFJ7PxOh0rKHGbt3jwWkAiVZ4HrjgMG3FcA9wv12ZuFe/ao0ZgncXsSOLogqwNrJZqoUMnJ5xbk5rT50LubRRVLFeRA88Sfk9dI9RwTMptTzhFQEga1QkpC0g6SJpGAnWAD89Y=; 5:cMXs/lgekoRLGmiYtzlOtliPv+OPq8S1l/nQvINIDzTT5gII9OZFleEgxON/xfS52lBh6wUxqb998cJKGmCkUlGFqrbNbpnObqzM9tm8MfAmRz3itl+oCncXdXNB4+yjFBToHl8aKxlmty2Z+NXwHW2x4Wz+APdzpMsSrC17Kck=; 24:qzfSn3Lup89G2Dm7LDvph25lw0a7tKh3EmRNqSvNGyy8ptRmAVOvaycgrw0vvQnNV+QHK6vwaOeJStYErinTOpfG30hCe6C1B49U2I7Snv0=; 7:cwz0blfBDBW84rtZ2jsS14p5TPZv0oNh2NqaQSdAxOpLdjEa/LrKMJJ1UXGvNEYLLfbF4U3M64DY3KVkd2r06I/AfJZwfgCQTtzXsLoLflDTGrjtiYyMt9qSWmdQdBvtHObrcpCdgpe4mjEN4v0W2MhV7kP1Ram3E9Xhiu/uyh82DDj2P8qeVwc8z+e3aUjqYHeLyuVHptEAcgt3p/rxn24UBaa5DZHm/R/u0NuUxhXo+ae7AfKMquCbaXbgB5ZI SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2017 14:29:41.8482 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b1ac171-8ea4-435f-285c-08d54235f364 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3649 Subject: [dpdk-dev] [PATCH v2 0/4] Fail-safe 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: Wed, 13 Dec 2017 14:29:44 -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 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. Matan Azrad (4): ethdev: add devop to check removal status net/mlx4: support a device removal check operation net/mlx5: support a device removal check operation net/failsafe: fix removed device handling drivers/net/failsafe/failsafe_flow.c | 18 ++++++++++------- drivers/net/failsafe/failsafe_ops.c | 34 ++++++++++++++++++++++----------- drivers/net/failsafe/failsafe_private.h | 10 ++++++++++ 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 | 28 ++++++++++++++++++++++++--- lib/librte_ether/rte_ethdev.h | 17 +++++++++++++++++ lib/librte_ether/rte_ethdev_version.map | 7 +++++++ 12 files changed, 138 insertions(+), 21 deletions(-) -- 1.8.3.1