From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0060.outbound.protection.outlook.com [104.47.1.60]) by dpdk.org (Postfix) with ESMTP id E94881B1D6 for ; Wed, 10 Jan 2018 13:31:26 +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=zJgaY6YCOUfYGnIsoKhVM3pBFpGrrujrXEslqP6hsTA=; b=pTKbcawWxp6k3CGLv1PW/oVFBTd86fsrpv9qjHX4Pl6tUISL663hA40znFkUa63IrFRAlFFezr55X38ecw5x+/EMoNPS3OTQ/1QAF8SfikgiFwckM4SD11N6Hhk9SVLSVIA8smlS0v/qjdTMgapSFhQHHGswGI91dwjuHgkFlBI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by AM0PR0502MB3796.eurprd05.prod.outlook.com (2603:10a6:208:1e::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Wed, 10 Jan 2018 12:31:25 +0000 From: Matan Azrad To: Thomas Monjalon , Gaetan Rivet Cc: dev@dpdk.org Date: Wed, 10 Jan 2018 12:30:59 +0000 Message-Id: <1515587465-9304-1-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1513703415-29145-1-git-send-email-matan@mellanox.com> References: <1513703415-29145-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: AM0PR0102CA0064.eurprd01.prod.exchangelabs.com (2603:10a6:208::41) To AM0PR0502MB3796.eurprd05.prod.outlook.com (2603:10a6:208:1e::30) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f51e1727-81c6-4834-982c-08d5582610e4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM0PR0502MB3796; X-Microsoft-Exchange-Diagnostics: 1; AM0PR0502MB3796; 3:IPdPMy8nePms06YxInAmOSVaMG8ajkgFRWSOe0jOHIb/wOTtGnlI+Hwj123KX8wYrtUgEg0zgQanEZZ22GCJrAdZ5Z0Ocwnk3eroGU+LzPHb4/5ApMN98lncVDQHd6CVc+9lOCYRBR2rwt3O+KoBTDopJ4sj68qqdnWXvrTxsReYpacQM4AS+LbVR4x4TeBvepp9O5v1xI4i7v/zT9bQQutoUGZ12sFXN6VL2ZJIgWPm1KlMkt6POs1jhOoW8mRB; 25:fTfN7TxhxFmmTD5DOM950WmUU7nM0HccDgQv9+lcwduMG0zuO4zGavpx4hAlKESSa9/fEWE3RiDvAkN+xZjzuLXvi2HuXJIYibwbtjvOJr67bWrIaTedBRmd6/UaUVntUbgqlswsTvg6Rc3Qjt2D9eW4Fm1bQo8xaZz/5GSVt/I8LEdOktQmCmn7NqMdbe3YqIPvK9iLpWbC7BELtlcehvqBk9Ff7nYYCD4DrwpFTWtTOw+rn1kJ2zdFcmIEIdrfibXXEPt0Fnd5fYTwQp+ZQdVi4dYGfctGqNs2wIthvOSrA2RC6bOfan86RHx+a5e9C9/12w+N68jUBPMt90MJLA==; 31:bdpudMPisBfnQ6LTkK0cBvfgxS5aCCbguA5tLCNYUl4U0jfYFnWz6+/OjDTtjVnozO6lvzOsuvZHc30jek5c7UAQOvNaet4DcYN5G4RLsHh7h4+ElIyL+mch3SArEAx0LhB7TL64A0MuDjRe3Ub39eeU44d8WMmE0cPMZH90l++ZAf6TqPqHeNI+2KEawpP5an2BuO7xe7ZW6lcf7xcv/agkx0yd/YWZSWtP5k+f3po= X-MS-TrafficTypeDiagnostic: AM0PR0502MB3796: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM0PR0502MB3796; 20:KqM5F6kKpyGQdlQG4AGuWiWPhggrI7BcjRgZUmM83Ns65D9RAwbp3CSVt05Dh1w4O5DM0QccEmjoLRfr1WZBFg5S+A+g3ZbkMG8ZoXuwtyVk/X+zonGp3USAu78AJdVMZm7S632H/AoTuT9ajzEm1v9xvx/Mjc4REJeZ/veLWgloQSakwUtnT8zFVhtE4G2jfozhqEe8vfDRxddal0E7b9xefu1RDVZwbt8kR9tUFPDJSTpTkNG1ymATQLl0vbBI88Xsl7V9tkJydJ0/gUGakuSWMyX9easfvx+PwRxXJyJBkbYGdqOzMeCH2mN2z2XP65rdr4qOPsLofbU6moJBmsQpDCxhSluUgGOHatLoIU9v1/DEXcfLrBcR4oBq+4U4BgpjH52RXwaVq6vGV6xZEjsLsbIBM4NWviOp5V1GqzxqNBkzB6ZkA64rWnoAKZNPsqqrFk68M6t05NEkH3l+h1Gs16GOgQWMQSY+JISvsAH8JkfAQb4+5V6pjm+k9lah; 4:ZCnqFKizsq0Xv5QgxTvlXHoEmEg9jwJd++oeJL5M/jxsTgfcyOE+N0RkgUHxLRJR0afahIUbvlNMWXoFpIWFO75YzxTkH7KU0HzyD+IF56CThPBjSoH+K84y/F/VCuhCSBMQ5HpaJMvodylKulTnkKk0a+F7GIXplMqa3aZDwDGSGJjysZSZ3/baM9Ih6kTGQccSVm6V3lse50LzmrqcXRYXYWCmoGeiD06F8Bd7oN2HJ62ffTTBVAM4v63Ci6cJ3SexDw6T19PO51BhCFxgRxhLwHCNaPRKikm23kLaYwJ5yQy9L1QVYtkiYHZn/cMF 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)(3231023)(944501075)(10201501046)(3002001)(6055026)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM0PR0502MB3796; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM0PR0502MB3796; X-Forefront-PRVS: 0548586081 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(396003)(376002)(39860400002)(366004)(39380400002)(199004)(189003)(55016002)(68736007)(21086003)(25786009)(6666003)(2950100002)(4720700003)(6116002)(3846002)(4326008)(81166006)(8936002)(86362001)(50226002)(97736004)(69596002)(53936002)(16586007)(105586002)(16526018)(305945005)(7736002)(48376002)(316002)(8676002)(81156014)(36756003)(110136005)(5660300001)(50466002)(106356001)(66066001)(51416003)(33026002)(52116002)(478600001)(7696005)(386003)(76176011)(47776003)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3796; 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; AM0PR0502MB3796; 23:aaw+QCG9LilHd/g9ACkLlGFhWEcBZEVOKG85qMm?= =?us-ascii?Q?t9SAXvs8Raovetjg2CFx10RC0YDiHHxT1TZVuZwpnSjik/MJhdDDWI7GGVJy?= =?us-ascii?Q?1iy+Na9DANUWQmlX9dQuYmyNtMl5arIGCBSHPH29XBRmWcFQB7LyOb804WT9?= =?us-ascii?Q?S+6JIk25EaxX4IPMlwH8HNgoHQiqkge5loOkbPJUysOJv97ILb1Hd1ccFI2A?= =?us-ascii?Q?V+t7LyA0M+na4RhqFQvipseM3ZqJpWu/X7fWESpdsrO+fY7tGa6e40Z6o2Ur?= =?us-ascii?Q?pZMcphgTCk04gjZ4OXp+fNTmLTD5xGwIabdNAjTi3/XQw8j4m7ehrtzBcesr?= =?us-ascii?Q?INn4LdRZAjtixGyfjdIytzhLc9JPNm4/asUaitaGFw5MR/t9x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uvMcICntjS4K2Yh3dq9r2hOXjbWSqI1A1EMphwT38L9eGSOelIi7C2X/CKTjMZUZjCbs1L02XNPKvJNXJE2ni06SMdWx1pXBOt0uHvHgwAcUHXFKbFu7/uDvKkuMpVDwmRte945sGyBtxln9EZbMqYyF0riF+S44IKcF83SVcMaqKXC/rl1sgWwXZJrIS20lgLtPq0gSz8TDHC4h1oaZM0QKPb7m8SecYIsHx58UVpSwBQkPzDyE2dtpuzmXq5LDPu7nQg2QSYPmtu1Zw=; 5:cm6VRCF1GckHEHUiViEvhtifksYgUppevtTaZPUr7gVJ6fUVmnJlJH8BNedLK/xI4SXc3xqbRcDrn859DfwVafw8rsc7OGAwPS65gRxnnFxr6FQj9erIZmXsYWu9tWhaJ7wlSQ9zdL3SuNKWIhUVIOtcCx7XURFfM8spTIEeGWA=; 24:45G+aqykQrscgKy7IqcPZ/sEFe2T5ZC2c3FtWm5BMbs4MKEZKx0zaWkMIwmYExQ/qetE3adaQqAmiAz8kcd941WpMjyC4v6lq/6TvUbRtN0=; 7:3rtCMqkM2lzgKItTxilit7gcQb6fLukGCV7QXox38/HnI2pT7yKQVW+FbWRuy5HRqRHM4fJEZCTFcEvzwawIf/cM7AN42ySIVcc6leZTsaAid5cfjzexXQuFA58fDcAfghxlk7KqObCI2gel+eGFZuYxghJB2cyiSMvOuDEFWvHgMp/M/A7KeBGHWQWhtAPqrZnbN81L9/SdOIcpkpM7kSf43uf5CNme3VGUrYRRR3vnbNqHZjDIM9pV1nRIVaSP SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 12:31:25.4305 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f51e1727-81c6-4834-982c-08d5582610e4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3796 Subject: [dpdk-dev] [PATCH v4 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, 10 Jan 2018 12:31:27 -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. 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 | 213 +++++++++++++++++++++----------- 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, 333 insertions(+), 100 deletions(-) -- 1.8.3.1