From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40085.outbound.protection.outlook.com [40.107.4.85]) by dpdk.org (Postfix) with ESMTP id CEDF31B021 for ; Sat, 20 Jan 2018 22:12:43 +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=PNg6kBHVmVe4VCkdFU8EpPAom0m6aCe2LDTktOaXQZ8=; b=Y/3u2A26ia13TJrkEl4/JvnvHd/XssEuvmuWiGkpTFBzyrFZIp4lxlRFgzVEzU4NG8uz2l7z0nAWHOkCVzcJgmytYdC/PuwQWqGFBA2BN1Te0t9v+du6Ul/mpqE+MWgikW1wnKI78aX6n+8Tg/sgCwawzhV19VYLcJz+sHa9DS4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by HE1PR0502MB3804.eurprd05.prod.outlook.com (2603:10a6:7:86::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Sat, 20 Jan 2018 21:12:38 +0000 From: Matan Azrad To: Ferruh Yigit , Adrien Mazarguil , Gaetan Rivet Cc: Thomas Monjalon , dev@dpdk.org Date: Sat, 20 Jan 2018 21:12:18 +0000 Message-Id: <1516482744-8415-1-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1516274834-19755-1-git-send-email-matan@mellanox.com> References: <1516274834-19755-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR0502CA0035.eurprd05.prod.outlook.com (2603:10a6:803:1::48) To HE1PR0502MB3804.eurprd05.prod.outlook.com (2603:10a6:7:86::30) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6b2f8c62-bd75-4e39-bf60-08d5604a89bd X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(2017052603307)(7153060)(7193020); SRVR:HE1PR0502MB3804; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0502MB3804; 3:NTr16XWSqUz0zq+JAdQ97D0HkkEfPBclqyKZMgSJhzRA04boXpRw9zWE7O7v0DcVerf3+pK4mBdd2ryJiawp2PrUsfTWzWdbhUtbyOltVUfKuczXogaHKu/zf6qDRI9nejHynUUjaTSzK6hCLl4ZXN30hfkY5l8/f5E3jiC4rq2+hKWcOiS7yT/6RG3kcxIOJ0kyBYQe17g0T2GnU6o/RtuEC+SDedMZprLIVyL16vBjdYP+23ot3ncDUsEsFyLG; 25:44mJLW74o+sAIXM0fu+Z+eTEx+FX4z8OwC2pYCING2qfupnqwRM3W881EFyHDCtkdzKkNH6KYGgsxMZcC9yqve6U9D137zk2pb304VtyeF9XZ30zsQ4WIbcNVBFIaF/w57OIBKrTwoDTYLTrJraBkQJPCRyq1yoemnwa5DLwiIcpMiYt+2vOsKw/hPytJw0CJ/XzsuHFJKl1+ewX8jHDUAGcmabEdf48Q6q9/zZ0vXkQv2vHqC6K/HUkG8WlOdJvZ+lR9zy9TnHdvvwwr2ZtPtxuR7YLh3u0mlcursNRggYdWxa3A4l4Mls8yhomnYIflRN/LxFAkBITYallBiuNdw==; 31:cCwueH+ug5VShvA56tLph63h3XshLGWIYvSFWDAERvy1bkWXO55M13mSxGD/0ewNULwRB0irFlc/OuNEPEDSrgqdkuM82m2wTx7iHU8I5UmX/JKPLLCFrDU/R0tfA6EwPP4rk1IvQdJ4YmuCDU0345q33ofg8DJKnCMB7jUkQCVUkRVEyfmcTuVmZexlbbJ7dvk3Vr2zMskIhr1OZCLX35MOA5n3JPkces9QBwFeF5w= X-MS-TrafficTypeDiagnostic: HE1PR0502MB3804: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; HE1PR0502MB3804; 20:CN0ZNjG4Yr3fXTYEx3ju6r9UyVy7mFLGiqOIl41528syLv1QISSicJmscqG4HcMPu2XVrBcQNtsMIkaPIsGwUXuSX+EsMyk+p9PrPWx7i7VStgIz+miCp4SoiCNLOVDYAFwkt19bNBt1dklvcZtQrOkhi0qM9g8nHQ/tfjeCu236z3aHfH6khXHP2pLiwpO5VWdFDQdBuPDPg0y9g0biZlbMfdWlc5U0oZN/gEBBZ0Dh+KPSh0MVsA7bFzepS3Dap2mVOZO575Sfo8E1RXn1lgpfY19wm0mfWAvLeerIFa2PvVnvPVX1noA8QalJnUWflGn3m5wD6hOTruBaJz5WvESRtbvIEDU8dk2EbXQiFpqkVuQG/OceKqAG5mcscfhNJF/GXmoBKARZfurfFcpfvcfsEtQvVxY3pVM8qWYg3K6FF9fbVv2K8/pcwc4hMjqjHXr9I+8bEMQjRLDiI/V1VWbrazrJY05C2VWDOO8el89JKvq0gPfRJPIgnw11iGHs; 4:4yq2dQcN8sXAE9Z3ivIU6z5ab1+OUM96GpFm/XwDMYR5hYQ94X7GWPWNZXIx4E3IcdEji3CdwRraAP+K7nZH8MbXVGz+Yj+eadDNwa8oJKHyqxlTm4XZSSB1uIhSmWnyX1cdskScIUvpJpsiXFzRFzuuwr7u1l1ZKAIubRxqNJoL5I3cHRs7cEejgqsM8Ey63onv0vnnbAY6GlE1pUK7yOtuQ2gpcM2I1XS7CG9+ydoI56NZLlcpXt9yckrK4W8xiWJBPk3uSSRa9eESafxlKyC9uVSfMxU72FEidFlowM8mbjPuFtQGD2ndcPEVCxZW X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3231023)(2400081)(944501161)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041288)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:HE1PR0502MB3804; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR0502MB3804; X-Forefront-PRVS: 0558D3C5AC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(346002)(396003)(39380400002)(39860400002)(199004)(189003)(36756003)(47776003)(2906002)(4326008)(5660300001)(6116002)(478600001)(25786009)(50226002)(81156014)(16526018)(316002)(16586007)(51416003)(7696005)(76176011)(3846002)(52116002)(110136005)(33026002)(81166006)(386003)(7736002)(106356001)(105586002)(8936002)(8676002)(305945005)(66066001)(97736004)(53936002)(26005)(86362001)(55016002)(4720700003)(21086003)(48376002)(68736007)(50466002)(6666003)(69596002)(2950100002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0502MB3804; 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; HE1PR0502MB3804; 23:G1lPSws4aR/hb4JQvBShAQ36gi/XF7zfvD4efA0?= =?us-ascii?Q?7nuxNBm5wPpHX58pBVIZHbl+zV0CTS1xnG5+MGgGivRUtBDYT9UBK/gxIvEH?= =?us-ascii?Q?d8+nfSxxzzKK0goYs4Gt5IH2/7rs4eidAPPJ6eWnBBXp3N7lHbxKdGcxg2cC?= =?us-ascii?Q?fVSudn/9MnE3gzCzWCJ4kJ/CZ5Vz6XWZvWUccpSJHju1e8WBv98pk0JVeYmh?= =?us-ascii?Q?baxC++m9AnQ2tydUU12j2Lwb2UEsCmDg9I6QTLkkzAI13OFxqmpHjtLDBe8p?= =?us-ascii?Q?htUV/Oot3n0t44sC2MJuohIIpTNMWWDNVqJd8MCQ665Cuo6U/RPNKqPtpLR7?= =?us-ascii?Q?uQ7Q9z3B+ZEjB1HgmhyIU5ofUo4HCmRtdgl9jfnIhkbWukyHtG7uJVxkzxu0?= =?us-ascii?Q?gj98HcYu1qepMOUfUT2hRLHqXv5U90FNBFX/6SBGUHOXaklczLcgx8Mh3qzl?= =?us-ascii?Q?CFBse2iTxIY1XYBmQXKUSDAZVEH0S3A37TPZ757L4HW43UkL/lR7pzVBhev3?= =?us-ascii?Q?+9iNgRXCCvwyCWIIKgXzCBE5IoAbGKqjAkOAUNyWGg7ZUejRsFPHzJ7RqwEL?= =?us-ascii?Q?c6GPfgbnLv6V/JnLr76K7KkFBr9/wldZQ5axKhXHSh3A8NDkIKF/Bmm4TTea?= =?us-ascii?Q?sP/E8m6D/+UsxQFw076/M536nlOkhRnXnPXyhnhkKa1lchQ4y+re1UCHlrcq?= =?us-ascii?Q?4K2YOV5FOGSqGXtmRYwxWVte3TS9oDOm08yExEt6a7Sa01dt9nwpvfKx7Hkb?= =?us-ascii?Q?XqWSk51uWQawSEHWCz6gyJv54/m7dX9lMKH8WOg+poh5eZMZdDzpFYyTBgA/?= =?us-ascii?Q?1GuhxCux8F99FTPWIFvHXkwDcl8BGzCEQsiRR5zNFMxRzkbW8/piJjs5XKDk?= =?us-ascii?Q?PmqntAW3od5E1haVq5dULWTLoN80U2NhAJOWJawlwN+sPVcMIBEgSen5zbEI?= =?us-ascii?Q?n0hiwN2Wi4TsNx9pkrhZETZldpKzOhnU/0L33kda4x9fWP+Kfgp1RdXOHkfk?= =?us-ascii?Q?L3mTIeeL8alagPAF4e7S61PjLvuytRzj8DVritfDbLn/wrlQlrup1d5oaj6Y?= =?us-ascii?Q?4S4KMIfXvEu5uiVUFpbUdSFCi1w9CnFF+6JbAkWk2+9sGneYx2K0htbB//5n?= =?us-ascii?Q?0CxQh/ithlCQOlBD9YqqJw2LUEj9VcATKm7SG4h73aDN8+cp7tQoxxA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0502MB3804; 6:i/S/4KsNS5HNCqtDhSA43oOFSfxAQZoAQynOGzfdhVVMSAlXQ2iH7CE31BLS9oAUye92tlFAFVbXGHN4AhZQnQ5z6RdmN+MK5Nsim09t0etJoauC/zEQ3zkDtexkeZER8VJd5gMf37gutiYrT7yar9JDhMledlNhHvLeQu1HyQ4D07ls/olZu0lo+vlHjRkFeSRtePbUqSlJM46n7aLwmTNEeOcNT5a9pINF4HA1v2Yh7QkUj62xnWp4KXdDIc9jW0JGUty1hqUrSTLrJzkI/8cXzepAAzQ4EhGyHh0FHe/cveLTIW15qfv9ffapa5onIhJfU5DgGcrYOFcvZIAJGtk0pSH89YJEsz42O+vmZmM=; 5:9FmG/1XdNtVh7VPtOvkSzBt4b0k2m+Ol3qjMlOj+5MzEVTlKr3RvuZFte0jMLHJzZ+3qZMXtNQrdmwSITSzphLh8Yux8fS46a1N8P6iB0GaWXu8TwxbLrge5kiJ/sS14RCbX22ov6+tCTrjNUSETeCZ8ugZYHa1/FfDRV7Sfegc=; 24:wRP/0IMRZqYo9easn+RFuZ/GM8CO7CNnqEpR19emXf1bpGon26cirCH2NH2BXUiT2y7SeH3LWDDMxzEmmV00CJ206dSgaxi10sVP09hsPfo=; 7:9Xw3MGI0O1oQeoBVSrruyC33sTfLb5Lq7XkCpzFO8i/phCtbpMfAksaIt5neeSM9TIvAuGy3sj4Cm5amHyKDhh+9lZSkLXcohbC+sHE1rg6QIAazgAwJTy1AU5O58qhAyZsKpGw0wBsfyypEh+1AQ17uyKO2gTXgs9j0LgA+QGsqILblrX5qc69Cs78NLgndSDu26cZOAkFClUtCBPpLPmD1fwTMyunP4S+GAjflhm+8BXAM9q0wysFCvs7+0bj/ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2018 21:12:38.7397 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b2f8c62-bd75-4e39-bf60-08d5604a89bd X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0502MB3804 Subject: [dpdk-dev] [PATCH v7 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: Sat, 20 Jan 2018 21:12: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, 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. V7: Fix API return value description. Swap checks in the new API as Konstantin suggested. Add comment in the API as Ferruh suggested. 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 | 219 +++++++++++++++++++++----------- 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, 336 insertions(+), 100 deletions(-) -- 1.8.3.1