DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xia, Chenbo" <chenbo.xia@intel.com>
To: wangyunjian <wangyunjian@huawei.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Burakov, Anatoly" <anatoly.burakov@intel.com>,
	"jerry.lilijun@huawei.com" <jerry.lilijun@huawei.com>,
	"xudingke@huawei.com" <xudingke@huawei.com>,
	"David Marchand" <david.marchand@redhat.com>,
	"Wang, Xiao W" <xiao.w.wang@intel.com>,
	王志宏 <wangzhihong.wzh@bytedance.com>
Subject: Re: [dpdk-dev] [PATCH] vfio: change default per vfio_cfg map all dpdk	segments for DMA
Date: Tue, 6 Apr 2021 05:24:00 +0000	[thread overview]
Message-ID: <MN2PR11MB40636A4339BEB83F538BFD1E9C769@MN2PR11MB4063.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1589540514-26972-1-git-send-email-wangyunjian@huawei.com>

Hi, Yunjian

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of wangyunjian
> Sent: Friday, May 15, 2020 7:02 PM
> To: dev@dpdk.org
> Cc: Burakov, Anatoly <anatoly.burakov@intel.com>; jerry.lilijun@huawei.com;
> xudingke@huawei.com; Yunjian Wang <wangyunjian@huawei.com>
> Subject: [dpdk-dev] [PATCH] vfio: change default per vfio_cfg map all dpdk
> segments for DMA
> 
> From: Yunjian Wang <wangyunjian@huawei.com>
> 
> As all vfio_cfgs need to map all dpdk segments for DMA, but now only
> default_vfio_cfg map it. This patch changes rte_vfio_setup_device()
> as a default map, so that IOMMU progrming does notneed to map dpdk
> segments separately.
> 
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
>  lib/librte_eal/linux/eal_vfio.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/lib/librte_eal/linux/eal_vfio.c b/lib/librte_eal/linux/eal_vfio.c
> index d26e1649a..46160c328 100644
> --- a/lib/librte_eal/linux/eal_vfio.c
> +++ b/lib/librte_eal/linux/eal_vfio.c
> @@ -807,10 +807,7 @@ rte_vfio_setup_device(const char *sysfs_base, const char
> *dev_addr,
>  			 * after registering callback, to prevent races
>  			 */
>  			rte_mcfg_mem_read_lock();
> -			if (vfio_cfg == default_vfio_cfg)
> -				ret = t->dma_map_func(vfio_container_fd);
> -			else
> -				ret = 0;
> +			ret = t->dma_map_func(vfio_container_fd);

Anatoly is correct, this is intentional for ifc vdpa. For vdpa/ifc, we need another vfio container
for vdpa device and the dma map info comes from QEMU/virtio-user, so this container will not use dpdk
memsegs. Your patch will break current ifc vdpa driver.

Thanks,
Chenbo

>  			if (ret) {
>  				RTE_LOG(ERR, EAL,
>  					"  %s DMA remapping failed, error %i (%s)\n",
> --
> 2.23.0
> 


      parent reply	other threads:[~2021-04-06  5:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15 11:01 wangyunjian
2020-09-21 13:04 ` Burakov, Anatoly
2021-04-06  5:24 ` Xia, Chenbo [this message]

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=MN2PR11MB40636A4339BEB83F538BFD1E9C769@MN2PR11MB4063.namprd11.prod.outlook.com \
    --to=chenbo.xia@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerry.lilijun@huawei.com \
    --cc=wangyunjian@huawei.com \
    --cc=wangzhihong.wzh@bytedance.com \
    --cc=xiao.w.wang@intel.com \
    --cc=xudingke@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).