From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30041.outbound.protection.outlook.com [40.107.3.41]) by dpdk.org (Postfix) with ESMTP id 59CDD322C for ; Mon, 22 Jan 2018 17:38: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=8HdVScMy4PdlcIfVDuF7fAEv53ayCZVSjkgZjWYdg34=; b=lFtBZKpEArl42PyIYVT0CXdWDgRbdy6R7YrblJJWiC4fholjz1ph9ejOQjZ3PPIADfEz5xTPhd0K5rALcU1vm1PfJPeVRqq8euY0RYUwMtzosuJJnD6X2dc4Y52yxL8eqEX5OWO2tOetxHDEmNZVYsOlUr4eq/tpbedi0gmCOX8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by HE1PR0502MB3802.eurprd05.prod.outlook.com (2603:10a6:7:86::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Mon, 22 Jan 2018 16:38:39 +0000 From: Matan Azrad To: Thomas Monjalon , Gaetan Rivet , Jingjing Wu Cc: dev@dpdk.org, Neil Horman , Bruce Richardson , Konstantin Ananyev Date: Mon, 22 Jan 2018 16:38:16 +0000 Message-Id: <1516639103-27166-1-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1516483468-9048-1-git-send-email-matan@mellanox.com> References: <1516483468-9048-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: HE1PR0102CA0058.eurprd01.prod.exchangelabs.com (2603:10a6:7:7d::35) To HE1PR0502MB3802.eurprd05.prod.outlook.com (2603:10a6:7:86::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ed11a5d0-d7c1-407b-2296-08d561b69832 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(2017052603307)(7153060)(7193020); SRVR:HE1PR0502MB3802; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0502MB3802; 3:sP5+IP0jhW5QDSg23ADnhjOslboLkY4fcsOCi0itTtDdM3q7YDkwurAFPoePIYc/REc02fZdk5SqIZs7lr13z4nREeDCsRh7F1hz6XYdoEAFyfsLF7dPRKGNIXLH0OsthWznZ58vnMiIk0q6cZDtR+mnOFKFRfvS1MMyC0oQtZTkHZXv4zDiitlIr2QBeVhcFs5mvpCG7wv/dZN4tloyHfx+nLW8RF1HpJz0Bb/a5lJJ/eroQzEDAuSTWdjvogfB; 25:a67+28hmJYdY4oLvJ+ZZueyFlwfQ+Li23fTf7GI2M6Mns3s9DZEaLSmpRHAda1fG9cdq2lioc7y1Say9c6GKoHZhB3LyBP1KZtYA1WzrCUx1wa/vSdpBJM9aomutejxky3RolJz/9ViGjrxm6wHTTjQGh7mGWRl3e2bO3RdiNoqoHfP3ShFMDwbjIrpiH966iME+uQRQbgNZiRRDQJhJdm8lZTuZknSOQJeBw1haxkbj+z54aOe6UvC9cwY+UybkL05SEoJcObUUkf9rxDxpdVlaIOHeNRt/VonfOxenrV2Sx6abeuNx6+HMmCkTTICZXpBQmXf0N/6k+WUAtSCoBA==; 31:lFl/IzsminFXd27YjV9dV2uOGXXegRyc1Hr0CZENuMmUq2250Nuiyg3CmyOZIMDrMi0p89IiE1xMftPQEHxnpTrzbzXI3WFenJ97Jgi0kZEb+fKFa5ewXbGDIxf+pwdBIji6A5vw2/ZtuJV5GQvzhm+2jvUXKNTXw0mh/9KAeQ5xJjNmf/JsLJZxyE452+NFSmyxS1CaQ1AQvM1h803vSFUAblPyLrxH9wsWrMhh0Rw= X-MS-TrafficTypeDiagnostic: HE1PR0502MB3802: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; HE1PR0502MB3802; 20:OTCCLqYA9CJ6p3J4ULQgZV4XPd/v41jEGnxEHSKdFP0JStJvFdhnqnJe9UFciFvQSnbJwkC6PYKx/YGYKfGAo14rHO04K16Gs2xaT/E5R2fKLhtr6K8ii0mNXPEYDjsYi63s0Et2lAsmRipFoO8sQLVEyZoWP/oA1h2F0cBR9kJmei76KTB8YJa8bcDaetbAAdl4OEMaJpmlCYuBUiKBGKOv17ZLZDwM3IxX/y6SupsPZSzBP+Lyir7IeAPw6v+A0XsrPQlhMJ4TGNjwADKtcKsN/OfwCjnSWH0WpdHaZtTbJ7f7EaOeSJAevknc2URamzSLNHtfuS7PGTvs9xoVnOaU2hx97V6kn9JaFW80fZjRl02XKhhzoHzTOJeQ5I2aqWOe3mgHrBxRs2zF1MLBcpg8lEQzcn2FP6Ykf10TErhW5bbeNGr8NCRhlSjEhI828txnU7uCXfnXYO/9CLfu7FnZJj4Jr0/vR2XZqr0QYFJrGaNq9w2Qlgfn+VepNPGa; 4:9uDqNjD8v9fbnngAF7NXx/2RP2LJkYmhvImt0Nx/UvmC8ODf+htAVcn1DgfCenM/ma+pmWm7MZMO1wV0gujq/0xjlYQCqtNZ3ae+H/McR0QBVb47+GxgxjuaNTxXFMqQT1tSjT4Wvz33pus3+kq/4pr+voDYDchPj3zCyp6YOR5P1j4vRBW7+VTTOZssCSQtCCOKxS7B9WS6zFzpvNMpRV0iSkw8z8di8ZAw/Mobsh9f7q9tzjYCXScSm85RP8qhpNhdUXfgdly+C5d0opa+Z2m4xXgcVVJLBnEHX2PoOC5mgEWTZAHUMQi3q/fAvWrT X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(60795455431006); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231023)(2400081)(944501161)(3002001)(10201501046)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(6072148)(201708071742011); SRVR:HE1PR0502MB3802; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR0502MB3802; X-Forefront-PRVS: 0560A2214D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39380400002)(366004)(396003)(376002)(39860400002)(199004)(189003)(5660300001)(53936002)(47776003)(8936002)(50226002)(2906002)(68736007)(4720700003)(55016002)(6666003)(2950100002)(69596002)(478600001)(76176011)(7696005)(316002)(52116002)(386003)(16586007)(36756003)(51416003)(59450400001)(6116002)(3846002)(16526018)(8676002)(81166006)(81156014)(66066001)(110136005)(48376002)(26005)(54906003)(86362001)(25786009)(106356001)(105586002)(50466002)(305945005)(4326008)(7736002)(97736004)(21086003)(33026002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0502MB3802; 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; HE1PR0502MB3802; 23:XG1Cu3hSniC1k+UUBKK09EKpFKWw2F3x3wanPX4?= =?us-ascii?Q?IxFBrfaMZMQYpXfoObyl83UiB9wmxNIjXX596gNGfrFymLMIxr18+8TihYbg?= =?us-ascii?Q?oKXItuxGszbMIHjD1AWuCQ9xURmNBZbv+03Bp0WgF1Uh9ZBgzQ9FoBryOU/A?= =?us-ascii?Q?uNlGU54hqxEjnYqNZUlRV8v8cHDnNEo3Hhf+CfNdFLiIN7vceKxzyj9gjWBs?= =?us-ascii?Q?9IzzysVAGYEPyZi/dp7ogc9nZn+Bk+jFt4uRtLyCFHbMp8JZNpwe05x0srlL?= =?us-ascii?Q?4hTBI6sXrdNsdofeqcqV9a7H7ya0TGtZnO2SAZwF7h3tiZUrv3oR+YOwMqb5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-Microsoft-Exchange-Diagnostics: 1; HE1PR0502MB3802; 6:CHgUUzU6K2PCCTe2St7YgePT8srDFvBkUS+Sh44rGPVckppuj0Q/Ipss4jvRvC8LG9eFP1Ba2kRND94Kiil474lA7upTns3rJY3JhyruNHAOSN01B4Eh7q3LT/COJkJtXjKSoF4Jg5e40GCEfDijlNs/fMXEaiJgGptRJHfGCn29sDovVzx1wMzSmM00HRea/F0T0yo43vSZTZIdq6DrXjHETxqKyrPUa1/NZ818gJYTcHc3VkLMgC8QQ5C4kLWov/HWUB+2AKj9lcXOL1xg5DKAdfuxtg/MXA3ficqiUr9aBNG3zisDlzGFQrGC/rxoRuzMXsdcbyHr8xE8/mFohOsA2q+CSmmID0VkD0LOWJc=; 5:pnUDNTuvb8ipPK+/mDqylzEuZ5mWLvZu7nHNfEgZACefOhXtnNh8s9NdgYTGHQnVAL4O2JSMiJREi/h19og40uU/7qoQ07FEG9knE1U+L4woBCVPPAI+b5zmDXScV/evgN15BXZaeFqDfWWEannLg30LasY1NI0lRYMzTCsebvE=; 24:ilCt8Cv6zlAW1zZPlCuZOhCtOa14zYeHeGKUXIJvMJfBJx7HWbWlGi1t7j4xTLNr9sp9lzHB9MZVhVQRSqMOBYaDs/soR7ODop53PoUKHRM=; 7:sTMA15AJjs9HeuupWdDp08B6XHCnTotGa53zZ1F7nQaNWUvSTe+3ejAhjPbhJliOH97S3gYE/7tt3hlWtXL7rhXu4MeY3a0VQfuoxpiV1W0OFRM4pDKnjVwgXCWUJAkvkvvsLpfv3FGm91fdn7aExv8jzkMlfM+frL79xPFBirWxLUWZVMO2eP2NMMapwdG306c8BcNVU5bIPMwxJc6vvzZaRi84wKI8grtwj1/V18hd/9uSaWtuRT5QcNp3fbuh SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2018 16:38:39.6595 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ed11a5d0-d7c1-407b-2296-08d561b69832 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0502MB3802 Subject: [dpdk-dev] [PATCH v5 0/7] Port ownership and synchronization 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: Mon, 22 Jan 2018 16:38:44 -0000 Add ownership mechanism to DPDK Ethernet devices to avoid multiple management of a device by different DPDK entities. The port ownership mechanism is a good point to redefine the synchronization rules in ethdev: 1. The port allocation and port release synchronization will be managed by ethdev. 2. The port usage synchronization will be managed by the port owner. 3. The port ownership synchronization will be managed by ethdev. 4. DPDK entity which want to use a port safely must take ownership before. V2: Synchronize ethdev port creation. Synchronize port ownership mechanism. Rename owner remove API to rte_eth_dev_owner_unset. Remove "ethdev: free a port by a dedicated API" patch - passed to another series. Add "ethdev: fix port data reset timing" patch. Cahnge owner get API to return int value and to pass copy of the owner structure. Adjust testpmd to the improved owner get API. Adjust documentations. V3: Change RTE_ETH_FOREACH_DEV iterator to skip owned ports(Gaetan suggestion). Prevent goto in set\unset APIs by adding internal API - this also adds reuse of code(Konstantin suggestion). Group all the shared processes variables in one struct to allow easy allocation of it(Konstantin suggestion). Take owner name truncation as warning and not as error(Konstantin suggestion). Mark the new APIs as EXPERIMENTAL. Rebase on top of master_net_mlx. Rebase on top of "[PATCH v6 0/6] Fail-safe\ethdev: fix removal handling lack" series. Rebase on top of "[PATCH v5 0/8] Introduce virtual driver for Hyper-V/Azure platforms" . Add "ethdev: fix used portid allocation" patch suggested y Konstantin. v4: Share => shared in ethdev patches(Thomas suggestion). Rephase some code comments(Thomas suggestion). Fix compilation issue caused by wrong rebase with "fix used portid allocation" patch. Add assert check for the correct port state to above fix patch. V5: Use defferent print message type as Ferruh suggested. Fix the name parameter description in set\unset APIs(Ferruh suggestion). Rebase on top of 18.02-rc1. Fix issue: ownership API must check that the shared data was allocated before using the shared ownership lock(relevant when no port was created). Matan Azrad (7): ethdev: fix port data reset timing ethdev: fix used portid allocation ethdev: add port ownership ethdev: synchronize port allocation net/failsafe: free an eth port by a dedicated API net/failsafe: use ownership mechanism to own ports app/testpmd: adjust ethdev port ownership app/test-pmd/cmdline.c | 89 +++++------ app/test-pmd/cmdline_flow.c | 2 +- app/test-pmd/config.c | 37 ++--- app/test-pmd/parameters.c | 4 +- app/test-pmd/testpmd.c | 63 +++++--- app/test-pmd/testpmd.h | 3 + doc/guides/prog_guide/poll_mode_drv.rst | 14 +- drivers/net/failsafe/failsafe.c | 7 + drivers/net/failsafe/failsafe_eal.c | 16 ++ drivers/net/failsafe/failsafe_ether.c | 2 +- drivers/net/failsafe/failsafe_private.h | 2 + lib/librte_ether/rte_ethdev.c | 267 +++++++++++++++++++++++++++----- lib/librte_ether/rte_ethdev.h | 115 +++++++++++++- lib/librte_ether/rte_ethdev_core.h | 2 + lib/librte_ether/rte_ethdev_version.map | 6 + 15 files changed, 486 insertions(+), 143 deletions(-) -- 1.8.3.1