From: "Michael S. Tsirkin" <mst@redhat.com>
To: Eugenio Perez Martin <eperezma@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>,
qemu-devel@nongnu.org, Liuxiangdong <liuxiangdong5@huawei.com>,
Gautam Dawar <gdawar@xilinx.com>,
alvaro.karsz@solid-run.com,
"Gonglei (Arei)" <arei.gonglei@huawei.com>,
Lei Yang <leiyang@redhat.com>,
si-wei.liu@oracle.com, Eli Cohen <eli@mellanox.com>,
Shannon Nelson <snelson@pensando.io>,
Laurent Vivier <lvivier@redhat.com>,
Stefano Garzarella <sgarzare@redhat.com>,
Parav Pandit <parav@mellanox.com>,
Zhu Lingshan <lingshan.zhu@intel.com>, Cindy Lu <lulu@redhat.com>,
longpeng2@huawei.com, Harpreet Singh Anand <hanand@xilinx.com>
Subject: Re: [PATCH for 8.1 v2 2/6] vdpa: add vhost_vdpa_reset_status_fd
Date: Fri, 21 Apr 2023 03:45:40 -0400 [thread overview]
Message-ID: <20230421034518-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAJaqyWduKd3Vccwo-sR==DZC8ncbv39jxPwfRQ35O7JHZ5Czcg@mail.gmail.com>
On Tue, Mar 28, 2023 at 09:37:16AM +0200, Eugenio Perez Martin wrote:
> > > diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
> > > index bbabea18f3..7a2053b8d9 100644
> > > --- a/hw/virtio/vhost-vdpa.c
> > > +++ b/hw/virtio/vhost-vdpa.c
> > > @@ -335,38 +335,45 @@ static const MemoryListener vhost_vdpa_memory_listener = {
> > > .region_del = vhost_vdpa_listener_region_del,
> > > };
> > >
> > > -static int vhost_vdpa_call(struct vhost_dev *dev, unsigned long int request,
> > > - void *arg)
> > > +static int vhost_vdpa_dev_fd(const struct vhost_dev *dev)
> > > {
> > > struct vhost_vdpa *v = dev->opaque;
> > > - int fd = v->device_fd;
> > > - int ret;
> > >
> > > assert(dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_VDPA);
> > > + return v->device_fd;
> > > +}
> > > +
> > > +static int vhost_vdpa_call_fd(int fd, unsigned long int request, void *arg)
> > > +{
> > > + int ret = ioctl(fd, request, arg);
> > >
> > > - ret = ioctl(fd, request, arg);
> > > return ret < 0 ? -errno : ret;
> > > }
> > >
> > > -static int vhost_vdpa_add_status(struct vhost_dev *dev, uint8_t status)
> > > +static int vhost_vdpa_call(struct vhost_dev *dev, unsigned long int request,
> > > + void *arg)
> > > +{
> > > + return vhost_vdpa_call_fd(vhost_vdpa_dev_fd(dev), request, arg);
> > > +}
> > > +
> > > +static int vhost_vdpa_add_status_fd(int fd, uint8_t status)
> > > {
> > > uint8_t s;
> > > int ret;
> > >
> > > - trace_vhost_vdpa_add_status(dev, status);
> > > - ret = vhost_vdpa_call(dev, VHOST_VDPA_GET_STATUS, &s);
> >
> > We can stick a vhost_vdpa_call() function that calls
> > vhost_vdpa_call_fd() then we can avoid a lot of changes?
> >
>
> I don't follow this. vhost_vdpa_call already calls vhost_vdpa_call_fd.
>
> Thanks!
Jason were you going to reply?
next prev parent reply other threads:[~2023-04-21 7:46 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 19:53 [PATCH for 8.1 v2 0/6] Move ASID test to vhost-vdpa net initialization Eugenio Pérez
2023-03-23 19:53 ` [PATCH for 8.1 v2 1/6] vdpa: Remove status in reset tracing Eugenio Pérez
2023-03-27 9:33 ` Stefano Garzarella
2023-03-28 6:45 ` Jason Wang
2023-03-23 19:54 ` [PATCH for 8.1 v2 2/6] vdpa: add vhost_vdpa_reset_status_fd Eugenio Pérez
2023-03-27 9:34 ` Stefano Garzarella
2023-03-28 6:53 ` Jason Wang
2023-03-28 7:37 ` Eugenio Perez Martin
2023-04-21 7:45 ` Michael S. Tsirkin [this message]
2023-03-23 19:54 ` [PATCH for 8.1 v2 3/6] vdpa: add vhost_vdpa_set_dev_features_fd Eugenio Pérez
2023-03-30 6:15 ` Jason Wang
2023-03-23 19:54 ` [PATCH for 8.1 v2 4/6] vdpa: return errno in vhost_vdpa_get_vring_group error Eugenio Pérez
2023-03-27 9:34 ` Stefano Garzarella
2023-03-30 6:15 ` Jason Wang
2023-03-23 19:54 ` [PATCH for 8.1 v2 5/6] vdpa: move CVQ isolation check to net_init_vhost_vdpa Eugenio Pérez
2023-03-27 9:36 ` Stefano Garzarella
2023-03-30 6:20 ` Jason Wang
2023-03-30 6:23 ` Jason Wang
2023-03-30 10:42 ` Eugenio Perez Martin
2023-03-31 8:00 ` Jason Wang
2023-03-31 10:11 ` Eugenio Perez Martin
2023-04-03 5:32 ` Jason Wang
2023-04-03 17:21 ` Eugenio Perez Martin
2023-03-23 19:54 ` [PATCH for 8.1 v2 6/6] vdpa: Cache cvq group in VhostVDPAState Eugenio Pérez
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=20230421034518-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=alvaro.karsz@solid-run.com \
--cc=arei.gonglei@huawei.com \
--cc=eli@mellanox.com \
--cc=eperezma@redhat.com \
--cc=gdawar@xilinx.com \
--cc=hanand@xilinx.com \
--cc=jasowang@redhat.com \
--cc=leiyang@redhat.com \
--cc=lingshan.zhu@intel.com \
--cc=liuxiangdong5@huawei.com \
--cc=longpeng2@huawei.com \
--cc=lulu@redhat.com \
--cc=lvivier@redhat.com \
--cc=parav@mellanox.com \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
--cc=si-wei.liu@oracle.com \
--cc=snelson@pensando.io \
/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).