From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0069.outbound.protection.outlook.com [104.47.1.69]) by dpdk.org (Postfix) with ESMTP id 9EDEC271 for ; Tue, 19 Dec 2017 18:10:42 +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=Z+gliZPqUDCkz+J92U8jiDV7B5aTEKcX99Z30++nX+A=; b=LksNM5P4FIcJPm3yYhzh2URrox0p/rYs4BxZW/SDkn91RmMs9LEMtk/dKCK1+MoM1bQquns+HJzxE3tTFYSbj7fvma3hCvj8ZOYQVpU2qgE1lGpcgNdPjVfLT6D1HTSAzLBt+MbbnoGX4G6DmcrCSgpV0FvJQblDyQjsRtrGTPY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by AM6PR0502MB3655.eurprd05.prod.outlook.com (2603:10a6:209:9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Tue, 19 Dec 2017 17:10:39 +0000 From: Matan Azrad To: Adrien Mazarguil , Thomas Monjalon , Gaetan Rivet Cc: dev@dpdk.org Date: Tue, 19 Dec 2017 17:10:09 +0000 Message-Id: <1513703415-29145-1-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1513175370-16583-1-git-send-email-matan@mellanox.com> References: <1513175370-16583-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: DB3PR0202CA0017.eurprd02.prod.outlook.com (2603:10a6:8:1::30) To AM6PR0502MB3655.eurprd05.prod.outlook.com (2603:10a6:209:9::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 12080727-d64f-4ecb-3753-08d547036e69 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603307); SRVR:AM6PR0502MB3655; X-Microsoft-Exchange-Diagnostics: 1; AM6PR0502MB3655; 3:mYaBMzzSU9CjuDPPxpV7jXmGYx1lF5QHWBapfUFsp/Vn4U3D0aVgACPtsM/6dfSjVyDXwDrdra/NJA9XXKiAis4WCJAFEel/HnpuRhZjH6zn1GL6ecF/pI0qUZ6xdgruNIRNXxtASJ4/+FAbFXU+lD8hpQCoB7t4YCBu/MS6HgKRE81HDffKcuY7BwGACxTYjzmMnS6BrbJtot7gkipIjasmLnyCH2HrrgRwVBl2SYHBLvM2clrNEsyvY19tzNyj; 25:ahwD+IA8clfbdpu7Jzd2dv8p5mR64sEXBSo+JW4pABT3kyupQkt8V6gr5iegl9gGtxgJGl4vqQzOnbNdULc7uETV2z1ZVbFUFTkWemYZnyhdYojqJUsVlg4Mf/7y7vGxRj5/RBK4bpvz8tx4yktaRjPs/wg/z+XkF/pY8nD6Eu1evWtmoD62iPZPF4r09DmxCGdRhpDOKMHmk3wnIeD4w736Mz425qW+LlGo97Fm8J0tx9d7fm+z3PE0HVhEnXGh3WHxH6C3ql3iWVDOeZWEaP0nyTeB5CpBINRhbMFCu+wwsLUQVZjy8nZMefjiTtZgMFNtuzM5iCnwRI0UqK4Wsg==; 31:IOF8Fyj/WixToPlY7mVn4jRE2WtRjoAL4qCl5PJHyna9yeDfzkP3S33ItCOEi1Zbh5y7g7f8FMfGS5RW0wLKVsJz4q5C3CnhdALe2f7CRG1n/6Ktop7P4z27df3ht/XiOTUN44BcBrsSwtt6iEa6WXZoMTyS+7FTqu55wXeeptkpjVD3hx43j0hWqGcu9FjByNt5qitpSigE1hJHWE3OYqPARsmopxQ8z2I2G7tLoqI= X-MS-TrafficTypeDiagnostic: AM6PR0502MB3655: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM6PR0502MB3655; 20:ffDd/cGKXkRn9li9RG5Uh8527uyVVAMVR7k+sOcKJL5vABYfPUZXwg7hErM7t+8K4EzFn+8BeFNDWmlv8GdEHSTD6c2XpMDQwOHbQxCMgEDqi87V8h7v81X0jMnrnqGT/HovhI50wx8snsvyqunKmyZUp14BxdrEWB46l/9xBl1kYhHpTMLms7McKK2h9KXCMcplgifbCF8hTFKnb0dJYq4T0EFQ6Dek3VWCpa6DoRiH4xOjXE8+y9/gj2w04d5eN3o7eoRUM1amqdhdUZK9NljTiACNmqCd46I93i2zlDXhQPFzXBC3aRVvt6cM4ODqi5kMY4h+tz4CQTqche85mmT9T4dEFItltECsH0p7Fz6bAFgDxpwYY5w/1ieHHfz8P9c/RV/6DmNDkpHA9vhHvyUDq+BzS7NLTEUY5meknvMUzRtyxp+YQ7mLFILaL2mSMbHnFPyz+dD3EVhkyPC6ekVAfKV5Qlw7siM5C1AFDjYz7MON6Qk/alKDbzFajbR4; 4:8ia8MEDTHc6qEpgDhxOeQP5X52R2/kDUZ08bUiPsCGff5B4hYXAxNPQdETLLsZcG5UnZeUF8mvh4BR4xQzRjbkNcDCwI5JYc7Ahp/YCGMXd6K14c//MMpOVl7r0JbEKr0/YeZ4lIyt/Pgj5XtP6JOALH4LdiJQrZ+MkSJ1VDhv08q5Mb+FPLelGRvloqHoGoGUmnXasSO/P9ysE3r6Azjbv1NKCr1nNyGcOdJy3FIgt34Yu3811F01O1uoqg8+Zjf8J9YVx1tqGS0SEsm56eWEued+tV1NysBYRF13m7UxlGU242e6RHsB2gPUw5564X 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)(93006095)(93001095)(10201501046)(3002001)(3231023)(6055026)(6041248)(20161123558100)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM6PR0502MB3655; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM6PR0502MB3655; X-Forefront-PRVS: 052670E5A4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(346002)(39860400002)(376002)(366004)(189003)(199004)(52116002)(47776003)(81166006)(69596002)(66066001)(7696005)(305945005)(2906002)(5660300001)(7736002)(55016002)(478600001)(51416003)(4720700003)(33026002)(6666003)(386003)(2950100002)(16586007)(16526018)(110136005)(316002)(48376002)(8936002)(106356001)(105586002)(50226002)(50466002)(76176011)(36756003)(68736007)(21086003)(8676002)(81156014)(53936002)(3846002)(25786009)(97736004)(86362001)(4326008)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0502MB3655; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; AM6PR0502MB3655; 23:rEElJqiqIAQpL4q+LuBeXdFSWuNYSAizmkU1fso?= =?us-ascii?Q?AYWNbJdkAwPbg47UFfZwF5xCdwy9/G7a7koVMPfmGuWFYzMZIe5e+4TEAUII?= =?us-ascii?Q?7JVmf4H2LQwDHrZcK2+0o92Ssr6dxW+j1WUMIcVjcp2ax8HawgH79eOEaCO/?= =?us-ascii?Q?6ddT3vXozMf4LLRQMgkQWzax6F9GBTxbSycTuwr/i+CNsSw4MevB+zmmCJOu?= =?us-ascii?Q?E2d3qCngVThymcgCKKqZvPvGYFOqSma1U8z+7rnb+plsk8nCuXAUzssQCfTB?= =?us-ascii?Q?7YD5bVXvO5t4RfKqu3D0eWznfuEbHbrv9oYugrVsGBePOQ6cppaVcl/idzI6?= =?us-ascii?Q?LL854ltD8GWRWwgFfIigzwwnnAwB4VcfvtxuR8EJEtKQ5q5sGZp2LO8d9d0O?= =?us-ascii?Q?pMB5wynY/UQ+BSpuZk80xottSNrBlQp5Rt496lgo96JJJLkp4U9NlIc+fbQZ?= =?us-ascii?Q?xKh2QbhBtpjNYqU7+4grumMd8h8rtB7vt2l6M+HvbJNSxBzfxBc0K7qJEmp6?= =?us-ascii?Q?uG2z9L6g356BZ+oTiDHBhgJfJxK9vCa/CCyDxDEmeul1uXqbcs0HjfHkfsvr?= =?us-ascii?Q?b1y7WDqih8P3VT6EHWZyqEuevrBy9v0AVBVcEwxFRoosyCp3Zqm3Sb05/FlN?= =?us-ascii?Q?P5013748BOnPsKxdn2bxhVx70UvtzjPe0AO+FpgeLBH2Cdj18Dn4hHli0kTb?= =?us-ascii?Q?E+QH5VBhdxZXVqwuNcf7RX88rfJdBqjuIBY/lSXanVG1bmKngwgV3yWv0zzo?= =?us-ascii?Q?OuODlDTDJ7FukMBVfjn/hh3gWVKIOkHUv1nbPInnCbZzNOn5JvVyEcal05If?= =?us-ascii?Q?GWbPWmYcLgowRKmjEUhusqgLpntN5GMUcyRTPCVE6SsHESIxrKI1msSfYmwV?= =?us-ascii?Q?NjHSX/KDd7KO6IY9GbHqLL5mHx9SlkuYouvVojnJA9YY1lR21xTA1lQESXSk?= =?us-ascii?Q?CpGHm0z/bDHFTZfbqzIrKouAmbhBkvyWyLZwodsW9bzDuxEjkA1XMa7n9KmS?= =?us-ascii?Q?vTb1ocrzlQZrq4Yo4MTkZnXkD3nQhzzqJtaVLD98iuiXf8TzZ69WqnLnmubv?= =?us-ascii?Q?RqIz2Mk6Zv9Jmt1cwIz1c7juF1IuZ74uEOxGKXcJjicma4QzIkCC5gc9Gy1b?= =?us-ascii?Q?nqLPf9cSgfP4=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM6PR0502MB3655; 6:MXP3Az+PRmx8xcGECGiPv/bL4WDp2AgSg+fiRAoZNcsYMukLkKFMbW8jPKFp7J9viws7awgEnlFd8WKUAVMa30M2/pw7E/UHViArwbMco48D8xmohfWNQKU+jv6E9HUR54+bwKHJRm1Ds1oQY6457AlTWw7zVflkM0NoGTdl9Jc0QebhproUUU709DdR12BwDnujf5Zez8j8Z23zfk/mSYHC9TZL1nrivBdT1pgIhCsxl6hDm8JJWKUS27Pe9aYIAplI59uEozZ87EZckMpuCV1uaD/dyCwcapToELmbw1Q8mMrZwAOAdZqgQwtbUtm5BxdWz5b4bnzK/Rk6cisR6wc6mC7vkB3tT9EeStkUfOU=; 5:7a++80JYLluo56f/2TklifBWxiftr4Y+4iV6OUY3Yu/LUefAxkbu938H1v1465Fw43EOaIOSmg1mzYWx3Q5Hob8quA80SWSqb/ktQN6ZPdlu99A362X6/M2fMINeItSGND4i2mMJlqKidWrs55wGkKy9egdSe15eeTKsZKBeeLs=; 24:cldx2t+sLa1owBydYYV3wGIwCy0fF5jUnkLLdVMrKMzRwNLxJjva2s3YA6SLQUOYgrNaNgFggOFxHIz75+O8HlB5yPyEG3Mt0Sn+ccr/EqE=; 7:0h875If4CR6GL5jzslP9t3tgKSBEunwYLwuzwxHjNnUl0KeBj0sEwfRdm9iaFp+HXtZzRBF/SnsKDXpYTQVyFyqmniAPidgFjeQ/3ryRUK8ySDyXD+3/qTtDm2u1M/FYqPOWMVSaLuBvHK9edNJvpByV6liwF/EgMrGJ7NGsZ+A9+n9tVNRlGQE+bs0832LiEDV16wt385cC0b6ux+9f01OTOKis5nsSJrVwspkm8DifDqocp1b5mXMmTiP8LACT SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2017 17:10:39.7375 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 12080727-d64f-4ecb-3753-08d547036e69 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0502MB3655 Subject: [dpdk-dev] [PATCH v3 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: Tue, 19 Dec 2017 17:10:42 -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. 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 | 12 ++ 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, 334 insertions(+), 100 deletions(-) -- 1.8.3.1