From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0057.outbound.protection.outlook.com [104.47.0.57]) by dpdk.org (Postfix) with ESMTP id D1A092BAE for ; Sun, 10 Dec 2017 06:35: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=+glvaY0u3dA7RpZj7BJ5WSiSy77mroX3LkdHJi418Lw=; b=mHC4MtQ8NLXfKzpwfVeVSZdvQNNeXG79Bb8CDHP6qDPp2Ko18xv7nGP171wyW0muJIhoqD/+9ENq/CdpGvk7J1uYvmBDYgEr/YIgYirTF9N80DiJCUYovVQaJJIDsQsj16AoTNBrvxmuXOhN7goG4iUNv1Ow27Jbm9w/tCiRQCI= Received: from VI1PR05MB3149.eurprd05.prod.outlook.com (10.170.237.142) by VI1PR05MB3151.eurprd05.prod.outlook.com (10.170.237.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Sun, 10 Dec 2017 05:35:46 +0000 Received: from VI1PR05MB3149.eurprd05.prod.outlook.com ([fe80::3905:ed70:f744:9dc6]) by VI1PR05MB3149.eurprd05.prod.outlook.com ([fe80::3905:ed70:f744:9dc6%13]) with mapi id 15.20.0260.008; Sun, 10 Dec 2017 05:35:46 +0000 From: Shahaf Shuler To: "dev@dpdk.org" Thread-Topic: Guidelines for moving PMDs to new ethdev offloads API Thread-Index: AdNxeEvrEWobBf7wRK+7k6Hu+c5TYw== Date: Sun, 10 Dec 2017 05:35:45 +0000 Message-ID: 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; VI1PR05MB3151; 6:Fo67iebF3kHRvDOS+PEEq8Os0sN/GYO44Ze30G1CtNMq3QIBuWKVPOrIb9Wey52fa6CtLGyqLC6OqsSKZBGOObwIm//ORGc6R4a3DWkRN2o0vTFVrrFYHBA/X7HhxUJu9qUWLV2MufVa95txCiku/ZlcXxSBlXnbJSBJ35+GxKdMI0t7Fbci3XmVhWrLgw8XQLnq7qfPnuz/EqzVKOP+XY1DkhOuZe+3QpJ116qUyw9pe4OG81D8IRW2nfzq+EVxcNEgDjCElLqf+1tRhz/AmK1WD59oziSoX37TcWAaDM+BzjJyughYinzuYu7TQWNc9bRXlnMr4+ejitnrf88EzYvOM3cVfPEUsvCy7IITZZM=; 5:DxbeNyxFEN1RGMDvXCZ63ErS6IsJ4XIeKF8Iz3MQ2klfybpb34/ZbVuJCaRvyspZQTlXpEswd+hV2y6DUNgHnsIU0N3ystUDQKUpTGtr9OQsiT3ao4ULwg4scwuarwWQHHrwjcM4gEQaFMHlCbTDk27LSzKprB8uvevLmKd+pG0=; 24:3UAO6W5DvaLaQV1QzM/qpag+ggrqKkjuUIctZMMAgC1Z9RRwXpDkrLS0yio1eV3puo2HrqlGDIspBpXGpul8UWjXKJFz84ZjWOW5nBwXQBM=; 7:HDUS+mzKlBEOVE+VI3I1Ph4eLnpgO74IYxTjKsVkKf9o3Hh++UibtCg0Z89VtIDnuyP91PjWP+czlW2UvGsnieQrX68zontmxuaHMxprHPz7+79lSo3UbsO3VpQBi4YvUq3I3FLIc/O75FQiaI0M6pyf+Jqwc3xNXPzdW+dYTgah6m1V1kQKUyyqnuZhuzyvTECZu1AQ9Ea6RY8324ZhscfMHncdutCI+3V/Z8PzhudrHQuE2xs1BwCG9IdpPhoO x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 1d5de4ee-2e22-4f72-5416-08d53f8fdcdc x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603307); SRVR:VI1PR05MB3151; x-ms-traffictypediagnostic: VI1PR05MB3151: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(192374486261705)(189930954265078)(45079756050767)(21748063052155); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3231022)(3002001)(6055026)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011); SRVR:VI1PR05MB3151; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:VI1PR05MB3151; x-forefront-prvs: 05177D47DC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(39860400002)(189003)(199004)(81156014)(8936002)(33656002)(5660300001)(2351001)(6916009)(1730700003)(3846002)(102836003)(6116002)(790700001)(8676002)(59450400001)(606006)(5640700003)(6506006)(106356001)(105586002)(81166006)(6436002)(66066001)(3660700001)(316002)(55016002)(966005)(74316002)(478600001)(575784001)(86362001)(7736002)(14454004)(45080400002)(3280700002)(99286004)(2501003)(5250100002)(25786009)(7696005)(9686003)(2900100001)(236005)(54896002)(6306002)(68736007)(97736004)(2906002)(53936002)(5630700001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3151; 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 MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d5de4ee-2e22-4f72-5416-08d53f8fdcdc X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Dec 2017 05:35:45.9687 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3151 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Guidelines for moving PMDs to new ethdev 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: Sun, 10 Dec 2017 05:35:48 -0000 In 17.11 the ethdev offloads API has changed: commit cba7f53b717d ("ethdev: introduce Tx queue offloads A= PI") commit ce17eddefc20 ("ethdev: introduce Rx queue offloads A= PI") The new API is documented in the programmer's guide: https://emea01.safelinks.protection.outlook.com/?url=3Dhttp= %3A%2F%2Fdpdk.org%2Fdoc%2Fguides%2Fprog_guide%2Fpoll_mode_drv.html%23hardwa= re-offload&data=3D02%7C01%7Cshahafs%40mellanox.com%7Cc365451c3f934b73db5e08= d53f6fe6fd%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636484672216209911&= sdata=3Dl0OkZ8m78BMsw%2F0d7bA8m80gVqlSL%2Bpcs9UplVSmlOA%3D&reserved=3D0 As announced in the deprecation notice, the old API is planned to be remove= d in 18.05: https://emea01.safelinks.protection.outlook.com/?url=3Dhttp= %3A%2F%2Fdpdk.org%2Fdoc%2Fguides%2Frel_notes%2Fdeprecation.html&data=3D02%7= C01%7Cshahafs%40mellanox.com%7Cc365451c3f934b73db5e08d53f6fe6fd%7Ca652971c7= d2e4d9ba6a4d149256f461b%7C0%7C0%7C636484672216209911&sdata=3D85wB%2BoU3um%2= BXegYiLAJIDYWIkvpb9WQtPSgA73zsLHI%3D&reserved=3D0 As agreed, all the PMDs must be converted to the new API by their maintaine= rs. This email will better explain the transition process. The main concepts in the new API are: - All offloads are disabled by default - Distinction between per port and per queue offloads. Per port offloads needs to be set also for each queue of th= e port. The transition period is using an API translation in rte_ethdev.c: - The old API is translated to allow using converted PMDs - The new API is translated to allow using not converted PM= Ds - The use of the new API is flagged to trigger the right tr= anslation * Device capabilities - rte_eth_dev_info_get() - Not changing: use DEV_RX/TX_OFFLOAD_* flags - Old API: per-port fields rte_eth_dev_info.rx/tx_offload_c= apa - New API: added per-queue rte_eth_dev_info.rx/tx_queue_off= load_capa * Rx offloads - Not changing: offload disabled by default - Old API: per-port rte_eth_conf.rxmode.[bit-fields] - New API: per-port rte_eth_conf.rxmode.offloads and per qu= eue rte_eth_rxconf.offloads using DEV_RX_OFFLOAD_* - Transition: rte_eth_conf.rxmode.ignore_offload_bitfield m= ust be set when using the new API (Done by application) - To be removed: rte_eth_conf.rxmode.[ header_split, hw_ip_checksum, hw_vlan_filte= r, hw_vlan_strip, hw_vlan_extend, jumbo_frame, hw_strip_crc, = enable_scatter, enable_lro, hw_timestamp, security] * Tx offloads - Old API: enabled by default per-queue rte_eth_txconf.txq_flags using ETH_TXQ= _FLAGS_NO* - New API: disabled by default per-port rte_eth_conf.txmode.offloads and per qu= eue rte_eth_txconf.offloads using DEV_TX_OFFLOAD_* - Transition: ETH_TXQ_FLAGS_IGNORE must be set when using t= he new API (Done by application) PMD should ignore port offloads not set on th= e device configuration when using old API - To be removed: rte_eth_txconf.txq_flags and ETH_TXQ_FLAGS= _NO* --Shahaf