DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
	dev@dpdk.org, david.marchand@redhat.com, thomas@monjalon.net,
	chenbo.xia@intel.com, aconole@redhat.com
Subject: Re: [PATCH v2 2/2] vhost: force vIOMMU enablement with VDUSE
Date: Thu, 13 Jul 2023 13:47:35 +0100	[thread overview]
Message-ID: <911b84f0-3bed-16c0-01c1-ad076f033110@redhat.com> (raw)
In-Reply-To: <20230713112905.233306-3-maxime.coquelin@redhat.com>

On 13/07/2023 12:29, Maxime Coquelin wrote:
> Unlike Vhost-user, VDUSE requires vIOMMU support.
> This patch ignores whether RTE_VHOST_USER_IOMMU_SUPPORT
> flag is passed at register time to avoid having application
> to pass it for having working VDUSE device creation.
> 
> Fixes: 0adb8eccc6a6 ("vhost: add VDUSE device creation and destruction")
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>   lib/vhost/socket.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
> index 57dfe3d2fe..79f2138f60 100644
> --- a/lib/vhost/socket.c
> +++ b/lib/vhost/socket.c
> @@ -932,7 +932,10 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
>   	vsocket->async_copy = flags & RTE_VHOST_USER_ASYNC_COPY;
>   	vsocket->net_compliant_ol_flags = flags & RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;
>   	vsocket->stats_enabled = flags & RTE_VHOST_USER_NET_STATS_ENABLE;
> -	vsocket->iommu_support = flags & RTE_VHOST_USER_IOMMU_SUPPORT;
> +	if (vsocket->is_vduse)
> +		vsocket->iommu_support = true;
> +	else
> +		vsocket->iommu_support = flags & RTE_VHOST_USER_IOMMU_SUPPORT;
>   
>   	if (vsocket->async_copy &&
>   		(flags & (RTE_VHOST_USER_IOMMU_SUPPORT |
                  ^^^ do you need to update this check ?

> @@ -986,7 +989,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
>   		vsocket->features &= ~seg_offload_features;
>   	}
>   
> -	if (!(flags & RTE_VHOST_USER_IOMMU_SUPPORT)) {
> +	if (!vsocket->iommu_support) {
>   		vsocket->supported_features &= ~(1ULL << VIRTIO_F_IOMMU_PLATFORM);
>   		vsocket->features &= ~(1ULL << VIRTIO_F_IOMMU_PLATFORM);
>   	}


  reply	other threads:[~2023-07-13 12:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13 11:29 [PATCH v2 0/2] vduse: TSO & vIOMMU fixes Maxime Coquelin
2023-07-13 11:29 ` [PATCH v2 1/2] vhost: fix net offload compliance Maxime Coquelin
2023-07-13 11:29 ` [PATCH v2 2/2] vhost: force vIOMMU enablement with VDUSE Maxime Coquelin
2023-07-13 12:47   ` Kevin Traynor [this message]
2023-07-13 13:42     ` Maxime Coquelin

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=911b84f0-3bed-16c0-01c1-ad076f033110@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=aconole@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=thomas@monjalon.net \
    /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).