From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 326AAA00C4;
	Wed, 28 Sep 2022 14:52:24 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id C13F44113D;
	Wed, 28 Sep 2022 14:52:23 +0200 (CEST)
Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com
 [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id D687C4113C
 for <dev@dpdk.org>; Wed, 28 Sep 2022 14:52:22 +0200 (CEST)
Received: by mail-wr1-f48.google.com with SMTP id cc5so19651845wrb.6
 for <dev@dpdk.org>; Wed, 28 Sep 2022 05:52:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google;
 h=in-reply-to:content-disposition:mime-version:references:message-id
 :subject:cc:to:from:date:from:to:cc:subject:date;
 bh=56Kq0ThTIQ5i0CwH+AHB1lJA0zAampVjfWacMbIM8ng=;
 b=e747TwQyIZt6pnWWCSjD+qu8H2sQQwIe9mO1UOY+oXL/4PeOS5YnVrJUeyoXN8j6hK
 9CGP/13hkyA8pRlZwp9rUgVji8uR54enBIhfTy08Mlo9ydebBrG3MXgmjx1YYJeDmRay
 0G6Y6ncinbmanOPNorYITRL/WY4PoXOUZ4SbNrGXjScrzcdprLmOUZB5zS5uaqTiEGBq
 N60rJlJ1NlDtLESucYlvGXydn7rnUjsjPFo8wbTjPDGhuR6h5i8IGrSJ36laxbI7i79c
 re6AM+5WGbIchfJys5gbo3iTYfciUAWrodDh41f1pNoJR+oQaMwpmG8/mdsH7zsqMNBk
 Yz6A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=in-reply-to:content-disposition:mime-version:references:message-id
 :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date;
 bh=56Kq0ThTIQ5i0CwH+AHB1lJA0zAampVjfWacMbIM8ng=;
 b=QMHU48i/+Cei6+mHyhRQsc2UfjhZOk/00Cja8h0Q7QnKDtFuieLSY0QBcdVOdoB9ol
 dp+vVig+5pChCppsMqt6/t4ZKlKmxrzkrcvLuiunHdrIlNUHO19oBcwAbbpndl2pjXL/
 BFvC3spo7QnaLUQ/h7CqvLW5oaWVH2WKn5XCUdwIz0O2JWCQuVpPX4ch+dnD29RIZ0rj
 L6hpXq/M9gaax/32oCjw1FkxMqpQNjnAphmusRlyiJeZI2k0upCrlM0rZ0ByCVjsaCh9
 mioIZl4CLiYP68NWkUFv0WmVuXRl9oG38lWCrQJIivAUSzIySH337/px8F+y62lHyoU3
 OCzw==
X-Gm-Message-State: ACrzQf2zQ46pLSkRofvA/YmA5IoeBrG1+7H+0fwpbdd85dsCDWKh1kD8
 g618ixxV2ORKi6S6cRri6ldm9Q==
X-Google-Smtp-Source: AMsMyM7suKw5RhksDe2srS4V7PCfYURjBIrKo/y9SwrZccn4frtvSNpJnARU9Uf4hX1TxFr14jn18A==
X-Received: by 2002:a05:6000:1cc:b0:22a:e8c6:9f57 with SMTP id
 t12-20020a05600001cc00b0022ae8c69f57mr19741572wrx.527.1664369542473; 
 Wed, 28 Sep 2022 05:52:22 -0700 (PDT)
Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25])
 by smtp.gmail.com with ESMTPSA id
 r7-20020adfab47000000b0022ccc22ca95sm306203wrc.13.2022.09.28.05.52.21
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 28 Sep 2022 05:52:21 -0700 (PDT)
Date: Wed, 28 Sep 2022 14:52:20 +0200
From: Olivier Matz <olivier.matz@6wind.com>
To: Shijith Thotton <sthotton@marvell.com>
Cc: dev@dpdk.org, pbhagavatula@marvell.com, Honnappa.Nagarahalli@arm.com,
 bruce.richardson@intel.com, jerinj@marvell.com,
 mb@smartsharesystems.com, stephen@networkplumber.org,
 thomas@monjalon.net, david.marchand@redhat.com
Subject: Re: [PATCH v3 0/5] mbuf dynamic field expansion
Message-ID: <YzRDhLmvuLL0x6wn@platinum>
References: <20220907134340.3629224-1-sthotton@marvell.com>
 <cover.1663767715.git.sthotton@marvell.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <cover.1663767715.git.sthotton@marvell.com>
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

Hi Shijith,

On Wed, Sep 21, 2022 at 07:26:16PM +0530, Shijith Thotton wrote:
> This is a continuation of the discussions[1] to add mbuf physical address field to dynamic field.
> Previous version was to add PA field to dynamic field area based on the EAL IOVA mode option. It was
> deemed unsafe as some components could still use the PA field without checking IOVA mode and there
> are drivers which need PA to work. One suggestion was to make the IOVA mode check at compile time so
> that drivers which need PA can be disabled during build. This series adds this new meson build
> options. Second patch adds mbuf PA field to dynamic field on such builds. Last two patches enable
> Marvell cnxk PMDs and software PMDs in IOVA as VA build as they work without PA field.

Thank you for this patchset.

To be honnest, initially I was really reserved to remove the use of
buf_iova for some specific platforms.

But what made me change my mind is that the removal if buf_iova will
likely happen in the long-term future. It looks there is a consensus on
this. I think your patchset is a good way to prepare this transition.

What is missing, I think, is a good description of the problem you are
solving:

- more space for dynamic mbuf fields -> why? can you give more detail about
  this need?
- increase performance -> you previously said that it was not your point,
  but if we move the next field into the first cache line, I think this
  has to be highlighted. Out of curiosity, did you made measurements?

I'm sending separate comments as replies to the patches.

Olivier


> 
> 1. https://inbox.dpdk.org/dev/57d2ab7fff672716d37ba4078e2e3bb2db126607.1656605763.git.sthotton@marvell.com/.
> 
> v3:
>  * Cleared use of buf_iova from cnxk PMD.
> 
> v2:
>  * Used RTE_IOVA_AS_VA instread of rte_is_iova_as_va_build().
>  * Moved mbuf next pointer to first cacheline if RTE_IOVA_AS_VA = 1.
> 
> Shijith Thotton (5):
>   build: add meson option to configure IOVA mode as VA
>   mbuf: add second dynamic field member for VA only build
>   lib: move mbuf next pointer to first cache line
>   drivers: mark Marvell cnxk PMDs work with IOVA as VA
>   drivers: mark software PMDs work with IOVA as VA
> 
>  app/test-bbdev/test_bbdev_perf.c         |  2 +-
>  app/test-crypto-perf/cperf_test_common.c |  5 +--
>  app/test/test_bpf.c                      |  2 +-
>  app/test/test_dmadev.c                   | 33 ++++++--------
>  app/test/test_mbuf.c                     | 12 +++---
>  app/test/test_pcapng.c                   |  2 +-
>  config/arm/meson.build                   |  8 +++-
>  config/meson.build                       |  1 +
>  drivers/common/cnxk/meson.build          |  1 +
>  drivers/crypto/armv8/meson.build         |  1 +
>  drivers/crypto/cnxk/cn10k_ipsec_la_ops.h |  4 +-
>  drivers/crypto/cnxk/cn9k_ipsec_la_ops.h  |  2 +-
>  drivers/crypto/cnxk/meson.build          |  2 +
>  drivers/crypto/ipsec_mb/meson.build      |  1 +
>  drivers/crypto/null/meson.build          |  1 +
>  drivers/crypto/openssl/meson.build       |  1 +
>  drivers/dma/cnxk/meson.build             |  1 +
>  drivers/dma/skeleton/meson.build         |  1 +
>  drivers/event/cnxk/meson.build           |  1 +
>  drivers/event/dsw/meson.build            |  1 +
>  drivers/event/opdl/meson.build           |  1 +
>  drivers/event/skeleton/meson.build       |  1 +
>  drivers/event/sw/meson.build             |  1 +
>  drivers/mempool/bucket/meson.build       |  1 +
>  drivers/mempool/cnxk/meson.build         |  1 +
>  drivers/mempool/ring/meson.build         |  1 +
>  drivers/mempool/stack/meson.build        |  1 +
>  drivers/meson.build                      |  6 +++
>  drivers/net/af_packet/meson.build        |  1 +
>  drivers/net/af_xdp/meson.build           |  2 +
>  drivers/net/bonding/meson.build          |  1 +
>  drivers/net/cnxk/cn10k_tx.h              | 55 +++++++-----------------
>  drivers/net/cnxk/cn9k_tx.h               | 55 +++++++-----------------
>  drivers/net/cnxk/cnxk_ethdev.h           |  1 -
>  drivers/net/cnxk/meson.build             |  1 +
>  drivers/net/failsafe/meson.build         |  1 +
>  drivers/net/memif/meson.build            |  1 +
>  drivers/net/null/meson.build             |  1 +
>  drivers/net/pcap/meson.build             |  1 +
>  drivers/net/ring/meson.build             |  1 +
>  drivers/net/tap/meson.build              |  1 +
>  drivers/raw/cnxk_bphy/meson.build        |  1 +
>  drivers/raw/cnxk_gpio/meson.build        |  1 +
>  drivers/raw/skeleton/meson.build         |  1 +
>  lib/eal/linux/eal.c                      |  7 +++
>  lib/mbuf/rte_mbuf.c                      |  8 ++--
>  lib/mbuf/rte_mbuf.h                      | 17 +++++---
>  lib/mbuf/rte_mbuf_core.h                 | 55 ++++++++++++++++++------
>  lib/mbuf/rte_mbuf_dyn.c                  |  2 +
>  lib/meson.build                          |  3 ++
>  lib/vhost/vhost.h                        |  2 +-
>  lib/vhost/vhost_crypto.c                 | 54 +++++++++++++++++------
>  meson_options.txt                        |  2 +
>  53 files changed, 220 insertions(+), 150 deletions(-)
> 
> -- 
> 2.25.1
>