From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0077.outbound.protection.outlook.com [104.47.1.77]) by dpdk.org (Postfix) with ESMTP id 634C01B1D3 for ; Mon, 29 Jan 2018 12:21:47 +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=TJy7N97wz/qdXWAHgJAeLAC7hJWq3wT14ekMyzOFAMk=; b=J8DX6/zXM9E+sAZGGmVvi69qbTgHo8PLV4fxPZNtiidSS5PElCn1hA8OKLKF/3jHmlzFsbAof7Jh4zMteDwmVYq6cbnRItLa8nB+OtizSiD1NeeCq8Uw+GT5R+kYqxl6Yg8iTwWb1jwamzx6/f8YwLJNhUmaBXfGXn5YrqW6cVc= Received: from AM4PR0501MB2657.eurprd05.prod.outlook.com (10.172.215.19) by AM4PR0501MB2210.eurprd05.prod.outlook.com (10.165.82.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 11:21:45 +0000 Received: from AM4PR0501MB2657.eurprd05.prod.outlook.com ([fe80::50a5:cd88:b3d8:763e]) by AM4PR0501MB2657.eurprd05.prod.outlook.com ([fe80::50a5:cd88:b3d8:763e%17]) with mapi id 15.20.0444.016; Mon, 29 Jan 2018 11:21:45 +0000 From: Matan Azrad To: Matan Azrad , Thomas Monjalon , Gaetan Rivet , Konstantin Ananyev CC: "dev@dpdk.org" , Neil Horman , "Bruce Richardson" , Jingjing Wu Thread-Topic: [dpdk-dev] [PATCH v5 0/7] Port ownership and synchronization Thread-Index: AQHTk599Q5rzYZgD7EeQb0MT5xsNb6OKvYmg Date: Mon, 29 Jan 2018 11:21:45 +0000 Message-ID: References: <1516483468-9048-1-git-send-email-matan@mellanox.com> <1516639103-27166-1-git-send-email-matan@mellanox.com> In-Reply-To: <1516639103-27166-1-git-send-email-matan@mellanox.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR0501MB2210; 6:/yldfJn846GqHlb7y+FtK1jVw5dYEMnSkV30aLyrLJ7TiQ9lIJaZLS0nGGKyG3me+B2cbBud2V+jMM2cmTsEglVujdndCB0ajWwwJn7JTOLgyRNHUirJwGxsCBioHLhGIvkm8PrtdAuDC6cikznA/uHcwRAfwESkYzwmoXYHvYJG4ZI2Gw9AQ+K79q5mwpxPFGrrCdF+bq34clO3MjhFsQjoGxg24aP1FlnM+tufgOKMBQl4pt/tcL0LjAXylqd9fKq3kBNPtcyHfxzX7YLZ35CvgWMxcMuQNoIqEtLE9a6fiDwnQlNY6j4SiWQLjMRl+NPddAmGcEQm6hCNAJ/WAWF5AfyfVxWxElbWju9u3kSogRhl73xYuNu7asS7TGkq; 5:O71SGRF9173wiGrSMo0ilv9HmxBJsTFzwIIRnD3LNDUjBcKfAiFc775+yVYyoOEaPr8ikXgC6kC3sUfPMlHn4FsYB30OcHUtft8diHLzm6LHwKOQmbzZSLk/yjkm8b8VQLM7CJJmC0OLKqEbUnBIkl8mls/aqYpDRpBrdGhreG4=; 24:DbKsrCKKacKyKF7LO63tswH4WC+KDraORj7p6/Vag7KA5jPUpB5GIY7fSP7sEFOSzjC60U/hgntjEOa6ZXMm0JB9nwP8I+hbSxS0zVlfrmk=; 7:QbRkNh/G0p3LbvE7MSvjv+o9Z43NJAe/1nNg1GmxEhvKwkUhX2+Q210vxrJWXuyP06EAaxWlfaJegWTXrKfbpRnLVyIm4E52QgcWEU9GnnQGPeNJXnKJ5+7QA6xQRZULXGxnfevd65XTX2IqTYio+o9DZ1NjtfOj4qu5TuMdOGvdAYkmbDLWiHZYf4P1Np1bneFQlaypdNGqky7nsLL8mS/THK64SLfQwrw1piLPa8q4fsO3W7D76xfOPqOwJQcu x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: ed58b703-781e-48c6-8e09-08d5670a7b48 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020); SRVR:AM4PR0501MB2210; x-ms-traffictypediagnostic: AM4PR0501MB2210: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr 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)(3002001)(93006095)(93001095)(3231101)(944501161)(10201501046)(6055026)(6041288)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:AM4PR0501MB2210; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0501MB2210; x-forefront-prvs: 0567A15835 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(366004)(39380400002)(346002)(376002)(199004)(189003)(53754006)(9686003)(4326008)(33656002)(2950100002)(55016002)(97736004)(26005)(5660300001)(25786009)(105586002)(8936002)(305945005)(2906002)(102836004)(81166006)(81156014)(8676002)(74316002)(2900100001)(6436002)(6116002)(3660700001)(53936002)(7736002)(106356001)(6246003)(3846002)(6506007)(59450400001)(76176011)(7696005)(54906003)(110136005)(316002)(99286004)(86362001)(3280700002)(478600001)(68736007)(66066001)(14454004)(5250100002)(229853002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR0501MB2210; H:AM4PR0501MB2657.eurprd05.prod.outlook.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-antispam-message-info: fofdofityF6XOeRlTNP3xcKsTKASHukJFzUtsKZ2TnP2/VWMY56tdVFAjxcsKjonHtRLUZtbrigFm/ZQfnnArQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed58b703-781e-48c6-8e09-08d5670a7b48 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jan 2018 11:21:45.7854 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0501MB2210 Subject: Re: [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, 29 Jan 2018 11:21:47 -0000 Hi all Since there is not agreement for testpmd to be ownership aware by using the= new ownership mechanism, I think we can drop testpmd patch for now(app/testpmd: adjust ethdev port o= wnership). Maybe we can add example application to use this API in future. Thanks! From: Matan Azrad > 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: >=20 > 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. >=20 >=20 > 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. >=20 > 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 re= use of > code(Konstantin suggestion). > Group all the shared processes variables in one struct to allow easy allo= cation > 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 l= ack" > series. > Rebase on top of "[PATCH v5 0/8] Introduce virtual driver for Hyper-V/Azu= re > platforms" . > Add "ethdev: fix used portid allocation" patch suggested y Konstantin. >=20 > v4: > Share =3D> shared in ethdev patches(Thomas suggestion). > Rephase some code comments(Thomas suggestion). > Fix compilation issue caused by wrong rebase with "fix used portid alloca= tion" > patch. > Add assert check for the correct port state to above fix patch. >=20 > 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)= . >=20 > 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 >=20 > 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(-) >=20 > -- > 1.8.3.1