From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0056.outbound.protection.outlook.com [104.47.2.56]) by dpdk.org (Postfix) with ESMTP id 9B47B1B608 for ; Wed, 4 Oct 2017 10:18:14 +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=hxOZKV039snWKmKI9OKXD01INLuOa0U0lVbOGqY9AUI=; b=Cby6KVdB3efN8R4W+o9tiRq4CjXrvN5tVIhQVMFUT9aY7opb6bRTxYkez54o1eynpID0MSCd9xtq1MwRRwJQfbRrLtNNqeH/ia/Cm97X0M6XEzA+CB2ZE3jYPNocfzWojPkbQ4ICQwPEZvtnT2jDTU4t46eds2qW+Hl0OdfYYTM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by VI1PR05MB3149.eurprd05.prod.outlook.com (2603:10a6:802:1b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 4 Oct 2017 08:18:11 +0000 From: Shahaf Shuler To: konstantin.ananyev@intel.com, thomas@monjalon.net, arybchenko@solarflare.com, jerin.jacob@caviumnetworks.com, ferruh.yigit@intel.com Cc: dev@dpdk.org Date: Wed, 4 Oct 2017 11:17:57 +0300 Message-Id: X-Mailer: git-send-email 2.12.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: VI1PR08CA0212.eurprd08.prod.outlook.com (2603:10a6:802:15::21) To VI1PR05MB3149.eurprd05.prod.outlook.com (2603:10a6:802:1b::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6450dd7d-5fec-4d27-874b-08d50b007491 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:VI1PR05MB3149; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3149; 3:+p8Ib+tnMto5BQLHpf36qoyh2aC7Zn6mMliwc6/wCgpEXyMKCOuMgjmPgfj0hxImqp+mLDpg4jbAIv63AATeXPL9sj5Eezg9yZtGXcp4ERMCewcF1zocThgbpPGDcxbD4E/s9zmlcs/oOJ+euiVZkJYm2vW9xqKud7qY5xnvIpniXJ4Dyyojmg+GXBdLCSwcXvqfOxytSnWw2HBk8cX+xY9R/hgnFK5iXViP51qoi/x5bxT0EWQbsWaz+Bp4/Qbb; 25:Xb/EvOODnGSCwbI7/9gxYriIdtdwsx0VqjbjxBHdRCp3hn542uFV0461vRn7UxJ1kitJRt5bt2E0JEnKCtjZjrMumMRR4LmV7VvX2ta/d0++SVQqNYxgMDnb6wRLxuDFWkKENc0kHpZtwu6WnWGKP4pqC5zGiOxvYWfgHxRVNZrWkvaCXRv9dBdfQphUc9tbR1oeiTcZ4yqUF80QEomK9bbvzFHczgO5+W31obpLm8CsM3vSGiTUppkqTdlDMmCPCegMRNiSgqDt2CspOU4vrXpC4iRoFlcYd5P+5MGq2aMtVSPSWHnYFTPeZgDJKaFvn8ISe0yx88H1m76KqTaoQA==; 31:/m5eq/lY7tWyVDV73zNll3/Ke4SH7gHsZZvEcJZXv5T3F7zYOtR9vlq2J9wydIF4QneqYKAt9b5gqG1OSqvs4o5ccBZwILUokG96YzEVGR9AK4Fw8oWZyc5+MOBwG9MmUiP3nO7vOwA7zrVNgXCi6ybuFqSUTAHcuM2I685p9Ajt1OWfGnRfIsZC31rlR+GAg9rEHMT5ayBswFyioO1Il5q6VReqXBV0HL3PwmjJ6RA= X-MS-TrafficTypeDiagnostic: VI1PR05MB3149: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3149; 20:NgbnyJaOe0uoEi3PF6wKTk/Y2H4rPOIuPDiISXMDwZLfkMzXVLS5eoDvShDqbH30NARPUcWkWujrlVIQujUIrl2v7mW0lhc8R0QtR4PJQm2UAfDj8GLG4/r4MgdLXFJL0MvIn6hWSgnv+wNPm/mSWBZLwGilWxseo3DiW3tTO7235mIUik+4akFh2PtJuGYc1+N3yxiJ0gEaBVZw3RUu1yHwrXRoGRDs2nFe2E8z9oQSs0gNOLDRDF6FBYTP+BWOOH6fE6rP7q0jUSrx9IgC3eo0HL4y3C9YYNC5IU21BsehBeC8dBoTn707iX7bqAWFsva/INumnNVhTxT6BxOwe5NZairRoP/37T4W+eniV/Fex243OjYLGnxmrIa0FbYyTiHn6J3II4IrVssHeEFVR/hjLfyw9VCH10sO4XONzhqtWteDpBBT70D7iRkuYtSWuBeSi9aCq1ZplTGv32MNkfgxYtuc6bGm7xj8RypeBfrGU7K81TGFl8y1OJMRjaIf; 4:/LMkvqszNMRR4BrYjcHKWAeE2EcHfNjSBvGmnf1w4TOulKKjWVPgQ+9T5GV+2ID3Hss7Lh/eFv1X+NjGW58DNSOALdEbobHIs9P+ULcz+KI4NM0WNromOmsGAiCF7Mc5amLH78gjcXXk6hqeqmuPXYmJjPgH+5aoVTkW/96o92xVBSUnbtu/vScYEn7LyCIpEJxxA0cuHbEQOUvzrq+vyGfEYrHCDfleKw4FJv5BpZRcfSAFvlzNnhHAmgifugIoGbi5SsIYL+8t1fl5SsqWRpqqPBb2+iBkoi/TQps/yZo= X-Exchange-Antispam-Report-Test: UriScan:(17755550239193); 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)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123555025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR05MB3149; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR05MB3149; X-Forefront-PRVS: 0450A714CB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(346002)(376002)(189002)(199003)(55016002)(105586002)(189998001)(21086003)(305945005)(8676002)(16586007)(106356001)(66066001)(25786009)(47776003)(33646002)(81166006)(53376002)(8936002)(81156014)(16526018)(316002)(7736002)(86362001)(4326008)(6306002)(53936002)(3846002)(50226002)(2950100002)(966005)(50466002)(97736004)(33026002)(6116002)(68736007)(48376002)(69596002)(5003940100001)(5660300001)(36756003)(478600001)(6666003)(76176999)(50986999)(101416001)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3149; H:mellanox.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-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR05MB3149; 23:Z54gxPwae5DOeXZ6oEMxB6iY+LiF4dX6NkEh+0XVN?= =?us-ascii?Q?8aBWzCTlAYx/Mrw/JjCzXHEX9LqcXDPsSrKlP1AVdYgHy+X4ECcaH/8PffLV?= =?us-ascii?Q?/tO4ootMGlGjgVgD2MzaA07PboOGTJtvDTKe1In/asY2jAnYfT7Rnwny8WHc?= =?us-ascii?Q?uaiRnMXmbdlgEolafh07L6dpNo2cwdG6dqKrTdNpZP8me7ahWkxhoYNN+f67?= =?us-ascii?Q?CDXWlq8QmWkIWyRt34wsI6Sef+nRLs2WUKJdvv9tWocE33FXvCS/zlt1ptyM?= =?us-ascii?Q?PZjCn8H4lB+2RtCyr1214B6/9BS/AV4U9aj7itIfEcY0b72vT1NmAGHYWadI?= =?us-ascii?Q?/3TiqM/+pxObxJEbHu+uuXZ/qd2VQE0vpPlo7XTiuxguz8pqVI+mYJcnwKV5?= =?us-ascii?Q?eAAO/GR2i9mGQBYW5YZhr+c5oIaeDuvKWwNzbIYD8EF2p83boS7pNr6KhNqi?= =?us-ascii?Q?4Bajzk+Ji8strpoi/Tr2solQ7bTfojXqtgaLexfSR+r8tWdaj7LbiQIBueAa?= =?us-ascii?Q?zOeIenely26ILDzgWw5uSS9GrTtQ2m35ot7DHx2vDT0I5ZHp/3Pj8LZgNiX9?= =?us-ascii?Q?BQD9Q5ilLzMhXkfYxJKsV++hHk1vtPdEQOBVqfUPftRG1PSEZHehluAmkAcg?= =?us-ascii?Q?+uni4+dVnKU3PAFgrOD/PfXui1GZ19qCR/Uf87GRMExltavbS+pd3f2Yx4H+?= =?us-ascii?Q?p2gK68oInpKScIY31pahshH7thej+aktiuYx3dI826WbIALFN4H0rAEKL9y0?= =?us-ascii?Q?erc5wjfvCoEcJ0k4yulYd7lDmSx+h9wWrVVUBYB5bOjix2/LfSgdLjP/+Tt0?= =?us-ascii?Q?ubDofCBsspG89sNQQTRoPT1jY0kKLmNQwZtkM2cD5NaQZjt8TWEcEIVbh8Gu?= =?us-ascii?Q?L1Z9EQsf+vAGEqY+84uGIuZkHsl4IE4jFNWzBC6HMy0tS6sRtFv/AdVettsO?= =?us-ascii?Q?Qj+j1pqabbUAA751ecSYdB0KhrRsMD9NI7fRkzui9OVZJ8iFQOHlkAMIMLOA?= =?us-ascii?Q?Z40Tf70RmRhxAalNDb5FGmIfYFOX7YiVsxGl5S4adX2XMbDg3FPX2tFerJi4?= =?us-ascii?Q?iiPO5yhhnZnIWjwjkuyX/AxcKjQHETYCZwM/rTP91uAm4gqtDrMNFtM1azVA?= =?us-ascii?Q?uSYfkFCn9FdBCx+9OdJ7WKS/htDT80e9Ox+GKj8mx+baOG/o8R8/w=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3149; 6:kqsZwqAolIy05ggcyor/KAY99DDkF3XkDo/MeqJAX541RndvAr/IUb9VIxkbTMI/u/l6OLODO2UWKULbzsZppIeH89FzxLq/Fugz1ywTlxlcvZKMkjv6NTghzRd/1aRNIcdZ7UrhB7d5l09i4iIaYObmwd8QlR5X7jLOdd3X1lvDwgUhFLjZIQSI8Sy8Zy0fa8UQ/hEaNQLefPL+S8ASVqaTyVGb1nbpA5cXv8xppRQmqLG8vOJrEBAGM0mcCfhzCrsxxhTDvq8hzDgJqNqpSQEDMh2o3ZpU7zh8Rk1KqhMmC4to1JfsgZrcZbojltbLBzN1PjyPqC1yuX8J/0N15g==; 5:Y26Z5O/yCdMuZGc9NCXzATee0f61xPUolzHcSWVCWEYEyJgxZGaCQODhVX4awgq+WyCYEogsDrcGBIFLtB2gHBfclPxtCo6ZMJamK8fgdbzGn4msNvMga1scizavkwMR1nfYWAbXvJZM3JGhWatlrw==; 24:dhH4GN2XDfWwb6OXpx7n4sLW9eYOM6TERj/Y7WKF5zzbqD/9fXzMca7WQkC0f/Fc2pAF1laI5OJuZmf4tVOmkpSJO2q0RtbpoUumXl4T/48=; 7:ytmR/i9a7wIhUvbqxSmehxlGud2X7Q7VwNzKGqQq/G+dMsnTiJbjMkdKsOULTxlXQ9ltnUI5MY/lYPeXX2vcf8wg/yGdxfRJQx8QpSEcVi7ncSMV69hAGDOn+1TyoiXUilO8ztBPmOc2HTcS6HMXPAhV3fxahmByogoKSz6dKmulhawY5Pchb4dDqdWCG65oyRuwKKN7mP8eb9ju8Oo1Pv/yTBATaI9kZ5UcjxSzNRY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 08:18:11.8892 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3149 Subject: [dpdk-dev] [PATCH v6 0/4] ethdev 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: Wed, 04 Oct 2017 08:18:15 -0000 Tx offloads configuration is per queue. Tx offloads are enabled by default, and can be disabled using ETH_TXQ_FLAGS_NO* flags. This behaviour is not consistent with the Rx side where the Rx offloads configuration is per port. Rx offloads are disabled by default and enabled according to bit field in rte_eth_rxmode structure. Moreover, considering more Tx and Rx offloads will be added over time, the cost of managing them all inside the PMD will be tremendous, as the PMD will need to check the matching for the entire offload set for each mbuf it handles. In addition, on the current approach each Rx offload added breaks the ABI compatibility as it requires to add entries to existing bit-fields. The series address above issues by defining a new offloads API. In the new API, offloads are divided into per-port and per-queue offloads, with a corresponding capability for each. The offloads are disabled by default. Each offload can be enabled or disabled using the existing DEV_TX_OFFLOADS_* or DEV_RX_OFFLOADS_* flags. Such API will enable to easily add or remove offloads, without breaking the ABI compatibility. In order to provide a smooth transition between the APIs the following actions were taken: * The old offloads API is kept for the meanwhile. * Helper function which copy from old to new API were added to ethdev, enabling the PMD to support only one of the APIs. * Helper function which copy from new to old API were also added, to enable application to use the new API with PMD which still supports the old one. Per discussion made on the RFC of this series [1], the integration plan which was decided is to do the transition in two phases: * ethdev API will move on 17.11. * Apps and examples will move on 18.02. This to enable PMD maintainers sufficient time to adopt the new API. [1] http://dpdk.org/ml/archives/dev/2017-August/072643.html on v6: - Move mbuf fast free Tx offload to a seperate patch. on v5: - Fix documentation. - Fix comments on port offloads configuration. on v4: - Added another patch for documentation. - Fixed ETH_TXQ_FLAGS_IGNORE flag override. - Clarify the description of DEV_TX_OFFLOAD_MBUF_FAST_FREE offload. on v3: - Introduce the DEV_TX_OFFLOAD_MBUF_FAST_FREE to act as an equivalent for the no refcnt and single mempool flags. - Fix features documentation. - Fix comment style. on v2: - Taking new approach of dividing offloads into per-queue and per-port one. - Postpone the Tx/Rx public struct renaming to 18.02 - Squash the helper functions into the Rx/Tx offloads intro patches. Shahaf Shuler (4): ethdev: introduce Rx queue offloads API ethdev: introduce Tx queue offloads API ethdev: add mbuf fast free Tx offload doc: add details on ethdev offloads API doc/guides/nics/features.rst | 66 +++++--- doc/guides/nics/features/default.ini | 1 + doc/guides/prog_guide/poll_mode_drv.rst | 20 +++ lib/librte_ether/rte_ethdev.c | 223 +++++++++++++++++++++++++-- lib/librte_ether/rte_ethdev.h | 89 ++++++++++- 5 files changed, 359 insertions(+), 40 deletions(-) Series-reviewed-by: Andrew Rybchenko -- 2.12.0