From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40078.outbound.protection.outlook.com [40.107.4.78]) by dpdk.org (Postfix) with ESMTP id AA3001E34 for ; Mon, 18 Sep 2017 20:18:05 +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=LgH0yK+ogVhxOQm+6zs06LGB1wBQ4gTrL/PPzYU0QUU=; b=jzCHr4J0oIwt0IM7vWwWq5CZV5F/S5EUE46UNqS7nGDgY/ikLmhSvfvMUPp9FSveUGg9x7aJxqmRFjOWag6R8gZaSGY1y+T4StdruT1YQnUntPTO1EWeIh4rFicWVrcdVpAn2uvkpTFysnbEo+NcKgxPoJPX5lESToPt7TxPRk0= Received: from VI1PR05MB3149.eurprd05.prod.outlook.com (10.170.237.142) by VI1PR05MB3135.eurprd05.prod.outlook.com (10.170.237.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Mon, 18 Sep 2017 18:18:01 +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.010; Mon, 18 Sep 2017 18:18:01 +0000 From: Shahaf Shuler To: Bruce Richardson CC: Thomas Monjalon , "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+v4CAABd4MIAAHrKAgAAEEwCAAAbOgIAAjCsAgACtPACABnMXgIAABwaAgAACNACAAAHFAIAABe6AgAABaoCAACcSEIAADS2AgAA0D6A= Date: Mon, 18 Sep 2017 18:18:01 +0000 Message-ID: References: <20170918110456.GB15516@bricha3-MOBL3.ger.corp.intel.com> <2601191342CEEE43887BDE71AB9772584F24BFE7@irsmsx105.ger.corp.intel.com> <32037584.9VqYmpDC01@xps> <20170918113733.GA14460@bricha3-MOBL3.ger.corp.intel.com> <20170918144432.GA17244@bricha3-MOBL3.ger.corp.intel.com> In-Reply-To: <20170918144432.GA17244@bricha3-MOBL3.ger.corp.intel.com> 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; VI1PR05MB3135; 6:4iriyoFz9qYBElUjxxETG6xPRUxw0HGQ6ePNbtZh0pkdpPVJemGPLZLVVYKAdWAHdk6qqSlYAds7dKXXNnw1tDr4+uipjeIrhdwmf+tZGLD+4C0BD3Jc/BI79Umqil0zSxig0iEcVexsiegW2BJ609weffgtWxvF92fCvBW+eoJUpnV/LgErJjj4rXx/KvVRj0dc7OZIwZPK183Joe0HOKcdETBXnQmqlnx/7I+PujsYsJjScBvbJRxBRWjY0ZzLTZrOzWRc59LJxLOQVjX6uODVOZlYQGjnGKMaaZSbTC4R4XpYXTXFK3QXGjOYCUQHE6s4H6b8a2M4AqTHFYavkQ==; 5:RjGgQWdA6kwBUCJuUfQqtIv8LuYZpMrwUBjCHIvp7HXRs4O0UxGbeClbvIaETRYsIoye7YcZBCAXd5OayRBECuHFDVhZZD+vQO6521Z5aPzRIw1tFIspY2Mt1DENxx/X1f3Fc3IreRwa8e28aPtiNg==; 24:RR4+2v9Lmw17z6WMz3LFllzUroP+RuysQhWZXzNoBxXhJmJJNIn4BqHj32A4vELbwT0gMNwanvZSj4yw+Q0hX3W7/DbIrg/6ubT2pus+7lM=; 7:0Kp6+qvpXZBHjFRU1eZulWxIylsieT126404jw/AHY92x6ac8oOcoTw9kxV5hgXD5/l8T5cZWSy7qd4Hm2hUoCXSkFWX4RGmbIQlIE8mfOAip3/ZDSmF655ssK+E3EDxfBKglrJ5wPJc84jwtW1NT6L3nj16c/7pTKCTS6aV42/qewLco1HA/ZsbuApXva922ei4EJC71+xDwB4flc6E8DxB/d0T3hNSm8hcvxX67KY= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-office365-filtering-correlation-id: d4fef838-7568-4cc8-478b-08d4fec198d1 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:VI1PR05MB3135; x-ms-traffictypediagnostic: VI1PR05MB3135: x-exchange-antispam-report-test: UriScan:(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)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123558100)(20161123564025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR05MB3135; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR05MB3135; x-forefront-prvs: 04347F8039 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(6009001)(39860400002)(346002)(376002)(189002)(377454003)(199003)(52314003)(24454002)(6116002)(3846002)(102836003)(74316002)(105586002)(93886005)(3280700002)(97736004)(2900100001)(305945005)(68736007)(6506006)(316002)(6436002)(33656002)(106356001)(189998001)(5660300001)(25786009)(4326008)(101416001)(14454004)(8936002)(66066001)(54906002)(8676002)(55016002)(99286003)(6916009)(7696004)(54356999)(50986999)(2950100002)(76176999)(9686003)(229853002)(2906002)(7736002)(3660700001)(81156014)(86362001)(478600001)(81166006)(53936002)(6246003)(5250100002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3135; H:VI1PR05MB3149.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) 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: 18 Sep 2017 18:18:01.0515 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3135 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: Mon, 18 Sep 2017 18:18:08 -0000 Monday, September 18, 2017 5:45 PM, Bruce Richardson: >=20 > On Mon, Sep 18, 2017 at 02:27:25PM +0000, Shahaf Shuler wrote: > > Monday, September 18, 2017 2:38 PM, Bruce Richardson > > > On Mon, Sep 18, 2017 at 01:32:29PM +0200, Thomas Monjalon wrote: > > > > 18/09/2017 13:11, Ananyev, Konstantin: > > > > > From: Richardson, Bruce > > > > > > > > > > > > > > I think we all in favor to have a separate API here. > > > > > > > Though from the discussion we had at latest TB, I am not > > > > > > > sure it is doable in 17.11 timeframe. > > > > > > > > > > > > Ok, so does that imply no change in this release, and that the > > > > > > existing set is to be ignored? > > > > > > > > > > No, my understanding the current plan is to go forward with > > > > > Shahaf patches, and then apply another one (new set/get API) on t= op > of them. > > > > > > > > Yes, it is what we agreed (hope to see it in minutes). > > > > If someone can do these new patches in 17.11 timeframe, it's great! > > > > Bruce, do you want to make it a try? > > > > > > If I have the chance, I can try, but given how short time is and > > > that userspace is on next week, I very much doubt I'll even get it st= arted. > > > > I wasn't aware to the techboard decision on the extra patchset needed. > > I think it will be wrong to introduce an API on 17.11 and change it aga= in on > 18.02. > > I will do my best to make everything ready for 17.11 so we can have one > solid API on top of which all PMDs and application will be converted. > Considering some Holidays and the DPDK summit I won't have much time to > work on it. > > > > The plan is as follows: > > 1. complete the last comment on the current series and integrate it. > > 2. send a new patchset to convert to the API suggested above. > > > > Aggregating the different suggestions I come up with the below. if this= is > agreed, then I will move with the implementation. > > (I thought it is good to return error values for the get function). >=20 > I'd rather you didn't. :-) The only realistic error I would consider is a= n invalid > port id, and I think returning 0 - no offloads - is fine in those cases. = The user > will pretty quickly discover it's an invalid port id anyway, so I prefer = a get > function to just return the value as a return value and be done with it! 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 func= tion. On that case returning 0 is not good enough. The application cannot know wh= y 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 Declare: API1 =3D The API being worked so far. AP2 =3D The suggested API being discussed here. API1 was designed for easy adoption from both PMDs and application. Applic= ation can use either old/new API on top of PMD which support one of them th= anks to the convert function. There was no hard demand to force all of the = PMDs to support it at once.=20 With API2 this model breaks. Application which moved to the new offloads AP= I cannot work with PMD which supports the old one. If I aggregate the pros for API2: >>From Bruce: >* allows some settings to be set before start, and others afterwards, > with an appropriate return value if dynamic config not supported. >* we can get fine grained error reporting from these - the set calls can > all return the mask indicating what offloads could not be applied - > zero means all ok, 1 means a problem with that setting. This may be > easier for the app to use than feature discovery in some cases. For that functionality I think the get function are enough (application set= offload and then check which of them is actually set). The set function are more for the on the fly configuration.=20 >* for those PMDs which support configuration at a per-queue level, it > can allow the user to specify the per-port settings as a default, and > then override that value at the queue level, if you just want one queue > different from the rest. This can be done with API1 as well. =20 >>From Thomas: > make the on the flight vlan offloads configuration more generic. The cons: 1. hard requirement from the PMDs to support the new API.=20 I can commit for mlx5 and mlx4 PMDs. I know other PMD maintainers plan to c= onvert their PMDs as well. If we take this approach we must make sure they = all move. 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 appli= cation. 3. keep the current on the flight vlan offloading configuration as an excep= tion. 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.=20 API3 is a nice compromise, if we don't want to force all PMD to convert.=20 --Shahaf