From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Rybchenko Subject: Re: [PATCH v4 0/3] ethdev new offloads API Date: Mon, 18 Sep 2017 10:51:32 +0300 Message-ID: <482facf0-ecd1-7449-72d2-5874e185dc42@solarflare.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: To: Shahaf Shuler , , , 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 D8032F04 for ; Mon, 18 Sep 2017 09:51:44 +0200 (CEST) In-Reply-To: Content-Language: en-GB List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 09/17/2017 09:54 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. > 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. As I understand there is an API to copy from a new to old API as well, allowing applications to use the new API and work fine with PMD which supports an old API only. > 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 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 (3): > ethdev: introduce Rx queue offloads API > ethdev: introduce Tx queue offloads API > doc: add details on ethdev offloads API > > doc/guides/nics/features.rst | 66 +++++--- > doc/guides/prog_guide/poll_mode_drv.rst | 17 ++ > lib/librte_ether/rte_ethdev.c | 223 +++++++++++++++++++++++++-- > lib/librte_ether/rte_ethdev.h | 89 ++++++++++- > 4 files changed, 355 insertions(+), 40 deletions(-) Series-reviewed-by: Andrew Rybchenko