DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, "David Marchand" <david.marchand@redhat.com>,
	"Qi Zhang" <qi.z.zhang@intel.com>,
	"Morten Brørup" <mb@smartsharesystems.com>,
	"Shijith Thotton" <sthotton@marvell.com>,
	"Olivier Matz" <olivier.matz@6wind.com>,
	"Ruifeng Wang" <ruifeng.wang@arm.com>,
	"Nithin Dabilpuram" <ndabilpuram@marvell.com>,
	"Kiran Kumar K" <kirankumark@marvell.com>,
	"Sunil Kumar Kori" <skori@marvell.com>,
	"Satha Rao" <skoteshwar@marvell.com>,
	"Jingjing Wu" <jingjing.wu@intel.com>,
	"Beilei Xing" <beilei.xing@intel.com>,
	"Ankur Dwivedi" <adwivedi@marvell.com>,
	"Anoob Joseph" <anoobj@marvell.com>,
	"Tejasree Kondoj" <ktejasree@marvell.com>,
	"Kai Ji" <kai.ji@intel.com>,
	"Pablo de Lara" <pablo.de.lara.guarch@intel.com>,
	"Radha Mohan Chintakuntla" <radhac@marvell.com>,
	"Veerasenareddy Burru" <vburru@marvell.com>,
	"Chengwen Feng" <fengchengwen@huawei.com>,
	"Kevin Laatz" <kevin.laatz@intel.com>,
	"Pavan Nikhilesh" <pbhagavatula@marvell.com>,
	"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>,
	"Liang Ma" <liangma@liangbit.com>,
	"Peter Mccarthy" <peter.mccarthy@intel.com>,
	"Jerin Jacob" <jerinj@marvell.com>,
	"Harry van Haaren" <harry.van.haaren@intel.com>,
	"Artem V. Andreev" <artem.andreev@oktetlabs.ru>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
	"Ashwin Sekhar T K" <asekhar@marvell.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	"Ciara Loftus" <ciara.loftus@intel.com>,
	"Chas Williams" <chas3@att.com>,
	"Min Hu (Connor)" <humin29@huawei.com>,
	"Gaetan Rivet" <grive@u256.net>,
	"Dongdong Liu" <liudongdong3@huawei.com>,
	"Yisen Zhuang" <yisen.zhuang@huawei.com>,
	"Konstantin Ananyev" <konstantin.v.ananyev@yandex.ru>,
	"Qiming Yang" <qiming.yang@intel.com>,
	"Jakub Grajciar" <jgrajcia@cisco.com>,
	"Tetsuya Mukawa" <mtetsuyah@gmail.com>,
	"Jakub Palider" <jpalider@marvell.com>,
	"Tomasz Duszynski" <tduszynski@marvell.com>,
	"Sachin Saxena" <sachin.saxena@nxp.com>,
	"Hemant Agrawal" <hemant.agrawal@nxp.com>
Subject: Re: [PATCH v2 1/2] build: clarify configuration without IOVA field in mbuf
Date: Mon, 6 Mar 2023 16:39:07 +0000	[thread overview]
Message-ID: <ZAYXKw9V1jJ3/0N7@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20230306161328.3802696-2-thomas@monjalon.net>

On Mon, Mar 06, 2023 at 05:13:27PM +0100, Thomas Monjalon wrote:
> The impact of the option "enable_iova_as_pa" is explained for users.
> 
> Also the code flag "RTE_IOVA_AS_PA" is renamed as "RTE_IOVA_IN_MBUF"
> in order to be more accurate (IOVA mode is decided at runtime),
> and more readable in the code.
> 
> Similarly the drivers are using the variable "require_iova_in_mbuf"
> instead of "pmd_supports_disable_iova_as_pa" with an opposite meaning.
> By default, it is assumed that drivers require the IOVA field in mbuf.
> The drivers which support removing this field have to declare themselves.
> 
> If the option "enable_iova_as_pa" is disabled, the unsupported drivers
> will be listed with the new reason text "requires IOVA in mbuf".
> 
> Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---

Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>

Couple of comments inline below.

>  app/test/test_mbuf.c                   |  2 +-
<snip>

> @@ -127,9 +127,9 @@ foreach subpath:subdirs
>              # pull in driver directory which should update all the local variables
>              subdir(drv_path)
>  
> -            if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 and not pmd_supports_disable_iova_as_pa and not always_enable.contains(drv_path)
> +            if not get_option('enable_iova_as_pa') and require_iova_in_mbuf and not always_enable.contains(drv_path)

I don't particularly like the always_enable check at the end. If a driver
is set to always-enable and it doesn't support the configured mode, we
should throw an error immediately IMHO, rather than silently continuing to
build the driver.

>                  build = false
> -                reason = 'driver does not support disabling IOVA as PA mode'
> +                reason = 'requires IOVA in mbuf'
>              endif

I think the reason given is more accurate, but for those users not familiar
with the internals of DPDK builds it could be confusing. I think the
message needs to reference the 'enable_iova_as_pa' option. How about?

	reason = 'requires IOVA in mbuf (set enable_iova_as_pa option)'

/Bruce

  parent reply	other threads:[~2023-03-06 16:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-19 11:55 [PATCH] drivers: skip build of sub-libs not supporting IOVA mode Thomas Monjalon
2023-03-02 13:52 ` Zhang, Qi Z
2023-03-02 13:57   ` Thomas Monjalon
2023-03-02 14:16     ` Zhang, Qi Z
2023-03-03 14:23       ` Thomas Monjalon
2023-03-02 14:26 ` Morten Brørup
2023-03-02 16:01 ` [EXT] " Shijith Thotton
2023-03-06 16:13 ` [PATCH v2 0/2] refactor diasbling IOVA as PA Thomas Monjalon
2023-03-06 16:13   ` [PATCH v2 1/2] build: clarify configuration without IOVA field in mbuf Thomas Monjalon
2023-03-06 16:35     ` Morten Brørup
2023-03-06 16:39     ` Bruce Richardson [this message]
2023-03-06 19:49       ` Thomas Monjalon
2023-03-09  1:43     ` fengchengwen
2023-03-09  7:29       ` Thomas Monjalon
2023-03-09 11:23         ` fengchengwen
2023-03-09 12:12           ` Thomas Monjalon
2023-03-09 13:10             ` Bruce Richardson
2023-03-13 15:51               ` Thomas Monjalon
2023-03-06 16:13   ` [PATCH v2 2/2] drivers: skip build of sub-libs not supporting IOVA mode Thomas Monjalon
2023-03-14 14:29 ` [PATCH v3 0/5] refactor disabling IOVA as PA Thomas Monjalon
2023-03-14 14:29   ` [PATCH v3 1/5] build: clarify configuration without IOVA field in mbuf Thomas Monjalon
2023-03-15  1:56     ` fengchengwen
2023-03-16 11:00       ` Thomas Monjalon
2023-03-14 14:29   ` [PATCH v3 2/5] net/hns3: support IOVA forced as VA Thomas Monjalon
2023-03-14 14:29   ` [PATCH v3 3/5] dma/hisilicon: " Thomas Monjalon
2023-03-14 14:29   ` [PATCH v3 4/5] compress/octeontx: " Thomas Monjalon
2023-03-14 14:29   ` [PATCH v3 5/5] drivers: skip build of sub-libs not supporting IOVA mode Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZAYXKw9V1jJ3/0N7@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=adwivedi@marvell.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=anoobj@marvell.com \
    --cc=artem.andreev@oktetlabs.ru \
    --cc=asekhar@marvell.com \
    --cc=beilei.xing@intel.com \
    --cc=chas3@att.com \
    --cc=ciara.loftus@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=grive@u256.net \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=humin29@huawei.com \
    --cc=jerinj@marvell.com \
    --cc=jgrajcia@cisco.com \
    --cc=jingjing.wu@intel.com \
    --cc=jpalider@marvell.com \
    --cc=kai.ji@intel.com \
    --cc=kevin.laatz@intel.com \
    --cc=kirankumark@marvell.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=ktejasree@marvell.com \
    --cc=liangma@liangbit.com \
    --cc=linville@tuxdriver.com \
    --cc=liudongdong3@huawei.com \
    --cc=mattias.ronnblom@ericsson.com \
    --cc=mb@smartsharesystems.com \
    --cc=mtetsuyah@gmail.com \
    --cc=ndabilpuram@marvell.com \
    --cc=olivier.matz@6wind.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=pbhagavatula@marvell.com \
    --cc=peter.mccarthy@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=radhac@marvell.com \
    --cc=ruifeng.wang@arm.com \
    --cc=sachin.saxena@nxp.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    --cc=sthotton@marvell.com \
    --cc=tduszynski@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=vburru@marvell.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).