From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0048.outbound.protection.outlook.com [104.47.2.48]) by dpdk.org (Postfix) with ESMTP id 568FA1B04C for ; Mon, 8 Jan 2018 13:30:21 +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=RbCAHWLbzpWEqtbiaHV/dfsNpIlIHGHdktpIGIpYu68=; b=k2Bi5QDIkzznKcDJXAFQbYJw5qFkkg+c/OlbaWRLtMz35VvIDCFMM7VoPZBorX52dHE5eAoc08dKcBgS2TJ0SEUSyZzHX/au+vR0G/aCw7Z51UvQM5wX7Kq/u9BGQVllvxyXQfL9IBUITPfwsMUhDaRdFBfY0W9+bZPc5rArFS4= Received: from AM6PR0502MB3797.eurprd05.prod.outlook.com (52.133.21.26) by AM6PR0502MB3798.eurprd05.prod.outlook.com (52.133.21.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Mon, 8 Jan 2018 12:30:19 +0000 Received: from AM6PR0502MB3797.eurprd05.prod.outlook.com ([fe80::b4b4:7de8:cf70:aa3a]) by AM6PR0502MB3797.eurprd05.prod.outlook.com ([fe80::b4b4:7de8:cf70:aa3a%13]) with mapi id 15.20.0386.006; Mon, 8 Jan 2018 12:30:19 +0000 From: Matan Azrad To: =?iso-8859-1?Q?Ga=EBtan_Rivet?= CC: Thomas Monjalon , Jingjing Wu , "dev@dpdk.org" , Neil Horman , Bruce Richardson , Konstantin Ananyev Thread-Topic: [PATCH v2 6/6] app/testpmd: adjust ethdev port ownership Thread-Index: AQHTiHVt5VPixrMnKUK3vfdVuXmfmKNp4uPQ Date: Mon, 8 Jan 2018 12:30:19 +0000 Message-ID: References: <1511870281-15282-1-git-send-email-matan@mellanox.com> <1515318351-4756-1-git-send-email-matan@mellanox.com> <1515318351-4756-7-git-send-email-matan@mellanox.com> <20180108113946.hcgxvulamjsiepre@bidouze.vm.6wind.com> In-Reply-To: <20180108113946.hcgxvulamjsiepre@bidouze.vm.6wind.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; AM6PR0502MB3798; 7:4Yb8VDwSKLyzigqdGgryOO2pyTyv2ezdAXVjn5LKEXCd45rWxaOWAKPPufM/6637HXpmbVvJPHsPl5YSLh1ds3zMXJkmsAOETDLREcF9zIahJaPXUA7+U0moVBER129csuvRIoZwumi/j4rw86fj4ipx2MRht79CQtZaMSYx7XQZPXdVOJRaCiPsomFkFONyDJ3YsGdJyTx+EN4GAqCBgxW/0ispxO9JbTO8KXeUbDhHHNEOPvdQfZWpsDHR3bOA x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f07864e2-51bc-436a-0daf-08d5569394b2 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020); SRVR:AM6PR0502MB3798; x-ms-traffictypediagnostic: AM6PR0502MB3798: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(60795455431006)(278428928389397); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3231023)(944501075)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011); SRVR:AM6PR0502MB3798; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM6PR0502MB3798; x-forefront-prvs: 054642504A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39380400002)(396003)(376002)(346002)(39860400002)(366004)(189003)(199004)(24454002)(99286004)(81156014)(3280700002)(102836004)(5250100002)(54906003)(81166006)(105586002)(76176011)(106356001)(6246003)(6436002)(33656002)(25786009)(7696005)(14454004)(86362001)(97736004)(3660700001)(55016002)(8676002)(2900100001)(305945005)(8936002)(478600001)(53936002)(316002)(2950100002)(5660300001)(6916009)(66066001)(7736002)(93886005)(6116002)(68736007)(6506007)(9686003)(4326008)(2906002)(3846002)(229853002)(74316002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0502MB3798; H:AM6PR0502MB3797.eurprd05.prod.outlook.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-antispam-message-info: aZpmop2kacvrPF5s658/7rsT/r/Vzwsq9pUmRW8qDJbmwKDf3WJaQW/0QZZGXhZ1UOmwqWjClQcjHDlmduaqyg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: f07864e2-51bc-436a-0daf-08d5569394b2 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2018 12:30:19.6421 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0502MB3798 Subject: Re: [dpdk-dev] [PATCH v2 6/6] app/testpmd: adjust ethdev port ownership 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, 08 Jan 2018 12:30:21 -0000 From: Ga=EBtan Rivet, Monday, January 8, 2018 1:40 PM > Hi Matan, >=20 > On Sun, Jan 07, 2018 at 09:45:51AM +0000, Matan Azrad wrote: > > Testpmd should not use ethdev ports which are managed by other DPDK > > entities. > > > > Set Testpmd ownership to each port which is not used by other entity > > and prevent any usage of ethdev ports which are not owned by Testpmd. > > >=20 > This patch should not be necessary. >=20 > Ideally, your API evolution should not impact the default case. As such, = the > default iterator RTE_ETH_FOREACH_DEV should still be used in testpmd. >=20 Why? We want to adjust testpmd to the port ownership. > RTE_ETH_FOREACH_DEV should call RTE_ETH_FOREACH_DEV_OWNED_BY, > with the default owner (meaning that it would thus iterate on the > application-owned set of device). >=20 It will break the API (we already talked about it). There is not any default owner: Any DPDK entity includes applications must to allocate an owner ID and use = it to own the ports they wants to use. The application can include more than 1 owner depends on the user needs. Each DPDK entity which can synchronize all its port usage can be a valid DP= DK entity for the ownership mechanism. > This new API should avoid breaking the current code as much as possible. >=20 Yes, but there is a real big problem in testpmd regarding ownership issue -= it must be changed. The previous testpmd thought any port is for it in many places in the code. Please see a lot of discussions about port ownership in the previous versio= n. > -- > Ga=EBtan Rivet > 6WIND