From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 71D11199B4 for ; Wed, 13 Sep 2017 11:10:23 +0200 (CEST) Received: from pure.maildistiller.com (dispatch1.mdlocal [10.7.20.164]) by dispatch1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTP id B8FE260060; Wed, 13 Sep 2017 09:10:22 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx2-us1.ppe-hosted.com (filterqueue.mdlocal [10.7.20.246]) by pure.maildistiller.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 3166E100057; Wed, 13 Sep 2017 09:10:22 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 96B6060070; Wed, 13 Sep 2017 09:10:21 +0000 (UTC) Received: from [192.168.38.17] (84.52.114.114) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Wed, 13 Sep 2017 10:10:16 +0100 To: Shahaf Shuler , CC: References: From: Andrew Rybchenko Message-ID: <4a000b69-b31e-b63b-205c-cb64d42c18ff@solarflare.com> Date: Wed, 13 Sep 2017 12:10:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Originating-IP: [84.52.114.114] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23326.003 X-TM-AS-Result: No--13.292900-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1505293822-HBQmmcH4T23M Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3 0/2] 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, 13 Sep 2017 09:10:23 -0000 On 09/13/2017 09:37 AM, Shahaf Shuler wrote: > 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. > With the new API, Tx and Rx offloads configuration is per queue. > 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. It should be updated since offloads are configured now per-port and per-queue. > The new API does not have an equivalent for the below Tx flags: > > * ETH_TXQ_FLAGS_NOREFCOUNT > * ETH_TXQ_FLAGS_NOMULTMEMP > > The reason is that those flags are not to manage offloads, rather some > guarantee from application on the way it uses mbufs, therefore could not be > present as part of DEV_TX_OFFLOADS_*. > Such flags are useful only for benchmarks, and therefore provide a non-realistic > performance for DPDK customers using simple benchmarks for evaluation. > Leveraging the work being done in this series to clean up those flags. It should be updated since now you care about these flags as well. > In order to provide a smooth transition between the APIs the following actions > were taken: > * The old offloads API is kept for the meanwhile. > * New capabilities were added for PMD to advertize it has moved to the new > offloads API. > * Helper function which copy from old to new API were added to ethdev, > enabling the PMD to support only one of the APIs. > > 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 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 commnet 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 (2): > ethdev: introduce Rx queue offloads API > ethdev: introduce Tx queue offloads API > > doc/guides/nics/features.rst | 66 +++++++---- > lib/librte_ether/rte_ethdev.c | 220 ++++++++++++++++++++++++++++++++++--- > lib/librte_ether/rte_ethdev.h | 89 ++++++++++++++- > 3 files changed, 335 insertions(+), 40 deletions(-) Many thanks for your work on this patch series.