From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0051.outbound.protection.outlook.com [104.47.2.51]) by dpdk.org (Postfix) with ESMTP id 39FB07CE5 for ; Tue, 19 Sep 2017 09:34:03 +0200 (CEST) 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=ExGMmuO8U8zY76dU1yUCol7DFvUjU3u56H8L89UYJHE=; b=sYpbvnQXw+AC4vL+ZxSDFfQRHaxRD8JeEpbedzVeXUNyL0OXUO+3Y/FhuivaWay2R7xMGcb808flmLTdcfYQ4NcUDmUnbrrkolNSVRdw1WvrMEAtcsbf6KSlVMQWsqh1ry/m00VqG7nL2SS8gKyWzPrXDgCJpmT5/M6tYqIE+2k= Received: from VI1PR05MB3149.eurprd05.prod.outlook.com (10.170.237.142) by VI1PR05MB1422.eurprd05.prod.outlook.com (10.162.124.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Tue, 19 Sep 2017 07:33:54 +0000 Received: from VI1PR05MB3149.eurprd05.prod.outlook.com ([fe80::3c3c:8f27:30a1:cd59]) by VI1PR05MB3149.eurprd05.prod.outlook.com ([fe80::3c3c:8f27:30a1:cd59%13]) with mapi id 15.20.0056.016; Tue, 19 Sep 2017 07:33:54 +0000 From: Shahaf Shuler To: Thomas Monjalon , Ferruh Yigit CC: Bruce Richardson , "Ananyev, Konstantin" , "stephen@networkplumber.org" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 4/4] ethdev: add helpers to move to the new offloads API Thread-Index: AQHTJYU1V12CwMiH90ScwHe7u4qjjKKkxkyAgAElSgCAAAYVAIAAJeMwgABVZwCAAOkvQIAARTuAgAr+v4CAABd4MIAAHrKAgAAEEwCAAAbOgIAAjCsAgACtPACABnMXgIAABwaAgAACNACAAAHFAIAABe6AgAABaoCAACcSEIAADS2AgAA0D6CAADdMgIAAnLGQ Date: Tue, 19 Sep 2017 07:33:54 +0000 Message-ID: References: <20170918144432.GA17244@bricha3-MOBL3.ger.corp.intel.com> <17308371.d9TKsa5cRG@xps> In-Reply-To: <17308371.d9TKsa5cRG@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [31.154.10.107] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB1422; 6:u9zt1DUWcwSoEzH//jtq8nxzx8LXxazSPJm9P/z4eTUgHL1ZOKpM2YHxvKLqaGOhARfP2HuDQ8oa9bJfN7O1eMXbwoA2psjHVYIkes1md3sIfQrK0KtHjqTN1UGjBh6UASS5u8b6OdmgtUdDNxXlP/2MkGsXck3ZuT1Y9/gPOvcqNPfqEEN7/RPI02EFIw6p9NQPL2jFwNBZc0RjaYSmkZKXheBI/rrPiZ9k5tHawYGiw2tUblkg41j4Mk1X+DSvtlSt77SvXr5s5lZMJR5luflF7dJxsikyTE/HU6S2Kkj0Ba09jWUE0Tl0m7jihG9HKzR3KhLT0LZHnOgxK4sPtA==; 5:iBGEz6Usf4/XvRKHsrqkPZY7YlAfBjt4haBJ8Uy42HqZWOYepvPJJC+kZH4IzdGhVMulMjr/SdwVnv9yUgA3DWHiFxVA/D00BsxT4k2kU6fZl3eiLsULzjZNhfzoq5fTbGucPb68YbPecMpFMaikqg==; 24:GvsxtCEVTiDWvrqdoHyERu9tY6q98vfD8SMXBWCsopb7TdFTVsqKdjeVoW/ZnVhEw9Ebl2dU945h0/Ak+mVXPeHV8HGVx4+ZmV6ybt4AbNQ=; 7:R0dCesfqHmFfbwSmhZhEu2qMwu72hGF4i0AcvcC1Ze0B/qajalLW4qPnIOc/nyiMbEnPkeYk1iOap34dNGJhE7s08x64Ugpp17zngho4tzyqEzsZbi8PS7eB2AO6S9r6e48BiKlBqH7eJj0tK3FRYkteJdmuWxido9uYfKT6wzThUOCki8BdaN6MTztZIe0teS5VFa96V4P1AsJcIPCtl5IZACya8IxoHA1YE9A7z+M= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-office365-filtering-correlation-id: 5501d212-f10d-4190-ca9d-08d4ff30c844 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:VI1PR05MB1422; x-ms-traffictypediagnostic: VI1PR05MB1422: x-exchange-antispam-report-test: UriScan:(278428928389397)(211171220733660); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR05MB1422; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR05MB1422; x-forefront-prvs: 04359FAD81 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(376002)(346002)(51444003)(199003)(377454003)(189002)(101416001)(2906002)(8936002)(8676002)(81156014)(81166006)(93886005)(74316002)(76176999)(54356999)(106356001)(105586002)(3280700002)(66066001)(50986999)(33656002)(5660300001)(2950100002)(7736002)(7696004)(97736004)(6506006)(305945005)(6436002)(229853002)(3660700001)(68736007)(5250100002)(53936002)(99286003)(189998001)(54906002)(55016002)(25786009)(9686003)(316002)(14454004)(6246003)(102836003)(3846002)(6116002)(2900100001)(86362001)(478600001)(110136005)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1422; H:VI1PR05MB3149.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) 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-originalarrivaltime: 19 Sep 2017 07:33:54.8297 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1422 Subject: Re: [dpdk-dev] [PATCH 4/4] ethdev: add helpers to move to the new offloads API 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 Sep 2017 07:34:03 -0000 Tuesday, September 19, 2017 12:09 AM, Thomas Monjalon: > > > > It would be simpler, however am not sure invalid port is the only error= to > consider. Another possible error can be the PMD is not supporting this > function. > > On that case returning 0 is not good enough. The application cannot kno= w > why the offload is not set, is it because it is set wrong or the PMD just= don't > support this API (which leads me to my next point). >=20 > We can skip error reporting on "get" functions and rely on "set" function= s to > return error if offload API is not supported or for other miscellaneous e= rrors. It will complex the set function then.=20 Instead of using the return value to understand all offloads were set, the = application will need to provide another pointer for the function to unders= tand which offloads were actually set.=20 I understand this is nice to use the return value of the get without the ne= ed of temporary variable, it will save some lines in the code. But I think that good error reporting to make the application crystal clear= why the offloads on get are 0 wins.=20 > > I can commit for mlx5 and mlx4 PMDs. I know other PMD maintainers plan > to convert their PMDs as well. If we take this approach we must make sure > they all move. >=20 > We can try to get an agreement from more vendors at Dublin summit. > If not, we can wait more than one release cycle for late support. Yes we can discuss on it in Dublin. Still I want to emphasize my concern: There is no point in moving PMD to the new API if there is no application t= o use it . Besides of user applications this refers also to testpmd and oth= er examples on dpdk tree (which I plan to convert on 18.02). =20 PMD maintainers may object to this conversion if their PMD still uses the o= ld offloads APIs. So can we have guarantee from Thomas/Ferruh that this series, as long it is= technically OK, will be accepted? Will we force all that object to change = their PMDs? If not, I think this is bad approach to put the API floating around ethdev = with no PMD to implement it. >=20 > > There is another possible API (API3): > > 1. keep the per-port, per-queue configuration. > > 2. add the get function for better error reporting and visibility for > application. > > 3. keep the current on the flight vlan offloading configuration as an > exception. In case there will be a need to configure more offloads on the > flight we can move to API2. > > > > With API1 I am obviously OK. > > I agree API2 is more generic. > > API3 is a nice compromise, if we don't want to force all PMD to convert= . >=20 > The question is: do we want to choose a compromise while breaking this > API? Maybe compromise is not the right word. We are striving for the generic API2 which has all the full functionality a= nd generalize API1 by supporting on the fly configuration as well. Maybe for user applications there is no such use-case. How many application= decides on the flight to suddenly change the crc strip or the scatter sett= ing ?=20 Moreover, how many PMDs will actually support such on the flight configurat= ion? How easy will it be for application to work with the API for PMD which don'= t support on the flight configuration? They will need to try, and if fail s= top the port and try again - in that sense there no much benefit for API2.= =20 Currently we have only the vlan offloads which can be set on the flight and= maybe it is more than enough, I don't know, am not familiar with enough ap= plication to be sure.=20 API3 propose to wait with this approach till we will have a proper use case= from users.=20