DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: bruce.richardson@intel.com,
	"Chengwen Feng" <fengchengwen@huawei.com>,
	"Ruifeng Wang" <Ruifeng.Wang@arm.com>,
	"Morten Brørup" <mb@smartsharesystems.com>
Cc: dev@dpdk.org, nd <nd@arm.com>,
	ferruh.yigit@amd.com, Dongdong Liu <liudongdong3@huawei.com>,
	Yisen Zhuang <yisen.zhuang@huawei.com>
Subject: Re: [PATCH] net/hns3: support disable IOVA as PA mode
Date: Mon, 20 Feb 2023 11:16:40 +0100	[thread overview]
Message-ID: <1759668.5KxKD5qtyk@thomas> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D87754@smartserver.smartshare.dk>

20/02/2023 10:43, Morten Brørup:
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > Sent: Monday, 20 February 2023 08.45
> > 
> > 16/02/2023 09:36, Ruifeng Wang:
> > > From: Chengwen Feng <fengchengwen@huawei.com>
> > > > Subject: [PATCH] net/hns3: support disable IOVA as PA mode
> > 
> > Could we change the title to "support IOVA as VA" ?
> 
> The underlying problem is the meson configuration option name for this feature [1]:
> 
> option('enable_iova_as_pa', type: 'boolean', value: true, description:
>        'Support for IOVA as physical address. Disabling removes the buf_iova field of mbuf.')
> 
> [1]: https://elixir.bootlin.com/dpdk/v22.11.1/source/meson_options.txt#L43
> 
> Formally, the patch provides the ability to set a boolean configuration value ("enable_iova_as_pa") to false, and thus the patch title is correct.
> 
> Nonetheless, I agree that the title suggested by Thomas is an improvement.
> 
> 
> Going back to the root cause, I think the configuration option should be an enum instead of a boolean, e.g. "iova_mode" with values "iova_pa" and "iova_va".

We can enable both and have it decided at runtime. So I think the boolean is OK.

> It's somewhat similar to CPU endian macros. We have macros defining both Big Endian and Little Endian, not just one macro defining Big Endian or not.
> 
> @Bruce, would it be hard for you to change the IOVA configuration option from a boolean to a two-value enum?
> 
> Or - also considering the resulting #define's - would it be too difficult to keep a sufficient level of backwards/API compatibility?




  reply	other threads:[~2023-02-20 10:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14  7:11 Chengwen Feng
2023-02-14 11:09 ` Dongdong Liu
2023-02-16  8:36 ` Ruifeng Wang
2023-02-20  7:44   ` Thomas Monjalon
2023-02-20  9:11     ` fengchengwen
2023-02-20  9:43     ` Morten Brørup
2023-02-20 10:16       ` Thomas Monjalon [this message]
2023-02-20 11:12         ` Morten Brørup
2023-02-20 11:52           ` Bruce Richardson
2023-02-20 12:04             ` Morten Brørup
2023-02-20 12:23               ` Bruce Richardson
2023-02-20 12:47                 ` Morten Brørup
2023-02-20 14:12                   ` Bruce Richardson
2023-02-20 15:07                     ` Morten Brørup
2023-02-20 15:30                       ` Thomas Monjalon
2023-02-20 15:35                         ` Bruce Richardson
2023-02-20 15:40                           ` Thomas Monjalon
2023-02-21  7:53                             ` Morten Brørup
2023-02-20  9:00 ` [PATCH v2] net/hns3: support IOVA as VA Chengwen Feng

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=1759668.5KxKD5qtyk@thomas \
    --to=thomas@monjalon.net \
    --cc=Ruifeng.Wang@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=ferruh.yigit@amd.com \
    --cc=liudongdong3@huawei.com \
    --cc=mb@smartsharesystems.com \
    --cc=nd@arm.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).