linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eli Cohen <elic@nvidia.com>
To: Jason Wang <jasowang@redhat.com>
Cc: <mst@redhat.com>, <virtualization@lists.linux-foundation.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/7] vp_vdpa: switch to use vp_modern_map_vq_notify()
Date: Wed, 21 Apr 2021 10:45:17 +0300	[thread overview]
Message-ID: <20210421074517.GD97533@mtl-vdi-166.wap.labs.mlnx> (raw)
In-Reply-To: <20210415073147.19331-4-jasowang@redhat.com>

On Thu, Apr 15, 2021 at 03:31:43AM -0400, Jason Wang wrote:
> This patch switches to use vp_vdpa to use vp_modern_map_notify().
> 
> Signed-off-by: Jason Wang <jasowang@redhat.com>

Reviewed-by: Eli Cohen <elic@nvidia.com>

> ---
>  drivers/vdpa/virtio_pci/vp_vdpa.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/vdpa/virtio_pci/vp_vdpa.c b/drivers/vdpa/virtio_pci/vp_vdpa.c
> index 1321a2fcd088..2afc90645660 100644
> --- a/drivers/vdpa/virtio_pci/vp_vdpa.c
> +++ b/drivers/vdpa/virtio_pci/vp_vdpa.c
> @@ -369,7 +369,6 @@ static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  	struct virtio_pci_modern_device *mdev;
>  	struct device *dev = &pdev->dev;
>  	struct vp_vdpa *vp_vdpa;
> -	u16 notify_off;
>  	int ret, i;
>  
>  	ret = pcim_enable_device(pdev);
> @@ -415,10 +414,12 @@ static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  	}
>  
>  	for (i = 0; i < vp_vdpa->queues; i++) {
> -		notify_off = vp_modern_get_queue_notify_off(mdev, i);
>  		vp_vdpa->vring[i].irq = VIRTIO_MSI_NO_VECTOR;
> -		vp_vdpa->vring[i].notify = mdev->notify_base +
> -			notify_off * mdev->notify_offset_multiplier;
> +		vp_vdpa->vring[i].notify = vp_modern_map_vq_notify(mdev, i);
> +		if (!vp_vdpa->vring[i].notify) {
> +			dev_warn(&pdev->dev, "Fail to map vq notify %d\n", i);
> +			goto err;
> +		}
>  	}
>  	vp_vdpa->config_irq = VIRTIO_MSI_NO_VECTOR;
>  
> -- 
> 2.18.1
> 

  reply	other threads:[~2021-04-21  7:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15  7:31 [PATCH 0/7] Doorbell mapping support for virito-pci vDPA Jason Wang
2021-04-15  7:31 ` [PATCH 1/7] virtio_pci_modern: introduce helper to map vq notify area Jason Wang
2021-04-21  7:44   ` Eli Cohen
2021-04-15  7:31 ` [PATCH 2/7] virtio-pci library: switch to use vp_modern_map_vq_notify() Jason Wang
2021-04-21  7:44   ` Eli Cohen
2021-04-15  7:31 ` [PATCH 3/7] vp_vdpa: " Jason Wang
2021-04-21  7:45   ` Eli Cohen [this message]
2021-04-15  7:31 ` [PATCH 4/7] virtio_pci_modern: hide vp_modern_get_queue_notify_off() Jason Wang
2021-04-21  7:45   ` Eli Cohen
2021-04-15  7:31 ` [PATCH 5/7] virito_pci libray: hide vp_modern_map_capability() Jason Wang
2021-04-21  7:46   ` Eli Cohen
2021-04-15  7:31 ` [PATCH 6/7] virtio-pci library: report resource address Jason Wang
2021-04-15  7:31 ` [PATCH 7/7] vp_vdpa: report doorbell address Jason Wang
2021-04-21  7:46   ` Eli Cohen

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=20210421074517.GD97533@mtl-vdi-166.wap.labs.mlnx \
    --to=elic@nvidia.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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).