From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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=rcTzE7wab//ntw4BcvcZ3EByp4yhnGa5Iofwdgh5z8g=; b=g47NRSPl6LxUOvU+vdoaSJli1V9Tw61h9BTSZ5+Qc52CUeQkgUuwYKHqQOIsJYNBqOQLZ8OhJO4NHeBuAmF/8BKzmjJIlhBXjDFENC4ULWUdc6xaDqV7gt7QqyUdZwVSA4s0X8W38dNBBfFtql2PlzgJjpBjcpP913R4HZJSFag= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by AM6PR0502MB3799.eurprd05.prod.outlook.com (2603:10a6:209:a::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Wed, 17 Jan 2018 20:19:50 +0000 From: Matan Azrad To: Ferruh Yigit , Adrien Mazarguil , Gaetan Rivet Cc: Thomas Monjalon , dev@dpdk.org Date: Wed, 17 Jan 2018 20:19:11 +0000 Message-Id: <1516220357-13013-1-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1515587465-9304-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 X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: HE1PR06CA0129.eurprd06.prod.outlook.com (2603:10a6:7:16::16) To AM6PR0502MB3799.eurprd05.prod.outlook.com (2603:10a6:209:a::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d9f17457-6cf7-4840-6a92-08d55de7aa30 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM6PR0502MB3799; X-Microsoft-Exchange-Diagnostics: 1; AM6PR0502MB3799; 3:xUhHSEPafjVvLwtJkY1Eixj8q8GWurh8CkYnbDg+fxowJUmGE2LZVr7LAiZ/cB2SxRCZjfbxKC1owoCAwhftuyNBfTjgty41lPDOoPkc/zDVdhvghZm5bYWHV518RSJQe9xs1GvCFEhkWr9eEjqJUB8QorNN6AzeeDF7ER/5dpstKVFgTeiszKQM2yuxkbMda770BgFT9EzGDhv2C1eDk9xSnMV3QtP1kY5laSUg1NmfDuWShJ6REoXRTN01TLS3; 25:LsAGJVIuAIs0sENM9cICH6Rr55uFnZZWQ60p1Sxk59Y8Ztqr214amVaxYiGlaB7tgcxB29wDf4vofxlZUYkxHFDw06aIYQyK9RorFlP7O/ZVKFgVv8k786M/cQXZhBgWlPMh8CNoF5KgVJgo2ja0BsPdgZuMe+EXHngr4Zol9Qkm2pmcS41OXEH0V3eci1P5Bh49D5cOtg504jpHjo05/6ClnOXQYkwVL1pWbDQTPSjFogHdi79RHoYO3OAmvfNSBQOET0VUWSW7sifkdzxebud22spQ/OgX2FmRg8gFHNZXDkWf7FAm3bXhIy7t6iAP/+RDSYXjimGsYaVhHhH7zw==; 31:f87HXO57roAa4g9gOduYkn8H3WGD8gtTzU/7Mg8BCUQB8ZlDy4txAjlF2N/qXoPZkACZ1rtZ0OQPLxMjmIxjPE+pFW5Q8PJZ6kTW32TlVPn4a9wxQ0EF83oJFMcZtW6b9BbNhjwflwtytgcYyxJ3Cav3OKo8CVJocXwMHPoYBKIz+BEtVPNOEd5aXrgZrxu6XURxvcD2BT3QK9d+Rn8GXsIHPTMrLB1QSTep7y6Uu7Y= X-MS-TrafficTypeDiagnostic: AM6PR0502MB3799: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM6PR0502MB3799; 20:BWysPthfncIWfCOcok0u12ZPpmQLdk7j0Y8Rxg5ejBn79LN78n+IybvXO1nDUTwftfD9bw7e3QcGejxtgtrqSVe2AqFQbnCo3tUQ3g8lFJjZNfSyd8JsMBceAEnnYmUWkojLhwM/ZeawN+KDR+DAKjs9TkyNDump1NZsBx0xQ1jAHwN99QRmO/u3fXYHHooEicZcm/UQxulJxPbXzGuuvHBBQc9Zbj4O1ExPd1NTRLNz5zRh2E3g0IOYVo4Ln/6dnA5tCnaJXImeFanjkLGaX5CRzKcaEfowQ14Sk/zxGWb3sRuOvYWyV8MCU7uK1hGJb94FMWR+hLLHVkzTZTfMkXbh9RD0BlZX774cd12bbuLZ/JyMQLFcyxXMeHCnY3MKxMJU0V22yEYwDQtZq9I62vdCRxrTQjmoijjPMYZUfkrEWQq90X5WLV+6hi9zQhL/xQb5S3XtKKHSGSmLE++/4Q5aXjBd2iMwuU5IMhEcTaEesX3WBip7DcO+gp4+AL2n; 4:jDF40qRcEq6SAr3Y5sY66kv2/ncfxs/Bnysl+zw6ce+CgjOiXbAxoYF/O3MzJ3NpruvsAGrUMoP1P6ek4o7NoIK6bQVO6n5i6ewTsghDUGvBmF/ZwwrJj20LRn6VarjV1M8Q096wag5Yawetrp+p/1uTtgVQIQLmINTkCfnaxC5HRTfn6TYg6jzl5O19Yz8C7/26nX/oA7MuZT7sVXr5QJwRFrVLXdOkNegNIteYYk1Zx7aLXtxX1R159zAO9FnqnHz0K2dLGEkpqf5BsZtowbiTVU+YSlvsO7KDGc7t2+uq9YF8nAT6+AwfY7pjfFcB 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)(3002001)(10201501046)(93006095)(93001095)(3231023)(944501161)(6055026)(6041268)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM6PR0502MB3799; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM6PR0502MB3799; X-Forefront-PRVS: 0555EC8317 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(39380400002)(39860400002)(396003)(199004)(189003)(51416003)(6666003)(50226002)(53936002)(68736007)(106356001)(55016002)(21086003)(47776003)(16526018)(2906002)(66066001)(105586002)(97736004)(4720700003)(2950100002)(478600001)(52116002)(305945005)(48376002)(50466002)(33026002)(5660300001)(76176011)(69596002)(86362001)(3846002)(7696005)(7736002)(8936002)(81156014)(8676002)(110136005)(16586007)(25786009)(386003)(36756003)(6116002)(81166006)(316002)(26005)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0502MB3799; 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; AM6PR0502MB3799; 23:PyyinRHGEBKqyfa1VP/0VnpI5tFR0S5q43b2wlG?= =?us-ascii?Q?04eHd1w8tH5h9vgNFO+TJ+EEE8d2S/12GBvDsuyisLA5091Igf+JqC1GPm82?= =?us-ascii?Q?x9hIKRh87xvpYtWHo4wwa+KHHwS8O0ylJEFgm9cEEYjdpyuYChxZhb9bsS6U?= =?us-ascii?Q?3YR8gjqoIWwCgU8Hb+oLWtiKnZ4JA0t3vdjptQVoep+dNAjfLtKE0Y90YHu/?= =?us-ascii?Q?3/SYjcTQmtFVBpzWcF7mQ6mqoW1sXfAI4dwQ0y1QL2xriToxUwhTC48FxGDr?= =?us-ascii?Q?oBVBlwXzf85lJxZLogOwouWMRtW7TFo+K9XD0ElOlieg/Sw2rOCq7VKoC/i8?= =?us-ascii?Q?AiQxDUOzhjPObonQPXKKCTokic6x+UAj/sshKdFngJCiuo3z6sPDL85STq1y?= =?us-ascii?Q?3UEbNxSwL6WeK8FqzS7dbu7pM0vW24sMeLnZS/v6DRdBPv1G+lDzVcDbxvHi?= =?us-ascii?Q?OwBCHNx1Hy5hx2rMeB3zXuTrlvfNlV3al8J0bm7ghjE5sekOgVbW9wJpmcop?= =?us-ascii?Q?T7wONil8yEWKVnyeeWT95iq3q7czunEhI+MIOPp5C2Pc1KZa3fZzo03iod+C?= =?us-ascii?Q?jiBZxp5PNf94P3hIb/qnR89kVWtFM8SnnxWdhBXbLh81vAP7kHE1DiR7FjYK?= =?us-ascii?Q?MTZzLN89L3z77SGRaxwlYXDHQyD0xrJVvU6GhoWK5s+D+VjXpAGu96sUZgsQ?= =?us-ascii?Q?WEihJjvjLAnMvj/NobwSqpkgN9P6vBsABhLzz+8i9bi+Xzrrj91XipwKfeLH?= =?us-ascii?Q?vc1rQCkIfzId0ZjcOqPdILvH+m2JzGFL32w4Qz3xMB792KZVc44RF0LgqtOK?= =?us-ascii?Q?PHrotjl73zPhTSVS06ZMMRDLVWLgvfs2iRFLSeYMU+6mhGglDn/b9Sg1nL15?= =?us-ascii?Q?dAZDsTGifSpOuLaWJ+ivr6X7p1hYYQA66w6JoJ/ea/aMAf5K32niNUWF9owf?= =?us-ascii?Q?M18lRF19PISESaOVSX6Yua0FBp9WyZVJA64Xy/H32rK2Y4OstW3CbgphQQsV?= =?us-ascii?Q?nfxQ8H19uN10dvEXwUUi7EpR5sTBMJT4EqVuhg4RT5UmPL0oLV4BaSa1XXRS?= =?us-ascii?Q?F3djRFR46cgpdQ+V2XOALF8Eplp3JXCSEdKuFfmvEYAswo1EZZfX/4rlKNPg?= =?us-ascii?Q?4EHXSRqCtkt1pV0CXiNR2jG168Vz2AJHQsOqMKhG2id852iaUufE8gw=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM6PR0502MB3799; 6:/OWKC2JhMn5mLbk0+VVdf0xwfBpuVvl5CvQO9ARpY+DDkcaCVUIbejhNzg0bmUI+A44N9aW11TWPiMyCCaVdiWzf6iqeoSx2XX+z/MkQY5C0HzvQO6r4q3d6C/EkqOfDNwo/Dv0DvJXVEsoYi+jIDqqbTw9PTQpoVb1uXqqDCW+orCKPaBmCOrk6Umd6U/1D9+5uUbVuaIdSp/Pdk9LoLJX3RdRzOalfJWiOr7S7F5lvfTgDVTka9fkmQ/HYo1WmBHIPhL4KzI0Jn5uPozXvg4u/3hkKBbcNL48ScRjVXJyVcVfUCR+bqsjAFJWVmP2Dm0nkZ0exTrukJ0MAcuT/05EZeqhXUfimnqxz+bPuDDs=; 5:OQ3e732J05f2LwF35EuE8jC0n7lz7ZxzLOjACIwuGLepNEcP8vS9dVHj6hCi+CjiBPuo2n2EX2IWFk6BEPZcghTjqNKENrSYKxoBVhCEmqPLIfPqT+eCdekB0sQ3kLobRNqHDn1VmDAGI8BR3B3x8N42RErnCVWIbFvG+Jt3+7M=; 24:B2nH+7QP+54uR1dp9uoyk5PHJQkNGEYlq1bfkmgu15G1h4UvHxwIflt/mSgnXIRHIMoE2O7amZygUMXY2H8oBt9VYf3BULEqYnhMQbIpj44=; 7:ofzTPjnZ5TXOl2pbW29vdB3LLSuWdlWyq/cK1vCNzK+83GuzrPZ/Mzs1HVrgtcvdZ1MNYNM8NV/HKJ8jXPb0UCI4Pgz4hOoodWPVENb3zdMKZtE/axP7dKYXIcbML2sI8aBEPofWdDQEhK5KT+QUZdU8c4EGdUUPeVniT6bNvj2FrCuGMxASi2vHie+aHLKl/4KvzW1Se02UCTQ9K24v/ewqV8NkzW9J6wgWPuXsxeLrHPsq3QHq6OqfBwcKYKVz SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2018 20:19:50.7702 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d9f17457-6cf7-4840-6a92-08d55de7aa30 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0502MB3799 Subject: [dpdk-dev] [PATCH v5 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: Wed, 17 Jan 2018 20:19:53 -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. 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