lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACLfguUmEEdJzPTsR9h-N=rVa4ktT8s6=aBsJ_MdRRy24LRyMg@mail.gmail.com>
Date:   Wed, 27 Apr 2022 09:58:41 +0800
From:   Cindy Lu <lulu@...hat.com>
To:     Jason Wang <jasowang@...hat.com>
Cc:     mst <mst@...hat.com>,
        virtualization <virtualization@...ts.linux-foundation.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] vdpa/vp_vdpa : add vdpa tool support in vp_vdpa

On Tue, Apr 26, 2022 at 2:05 PM Jason Wang <jasowang@...hat.com> wrote:
>
> On Mon, Apr 25, 2022 at 2:27 PM Cindy Lu <lulu@...hat.com> wrote:
> >
> > this patch is to add the support for vdpa tool in vp_vdpa
> > here is the example steps
> >
> > modprobe vp_vdpa
> > modprobe vhost_vdpa
> > echo 0000:00:06.0>/sys/bus/pci/drivers/virtio-pci/unbind
> > echo 1af4 1041 > /sys/bus/pci/drivers/vp-vdpa/new_id
> >
> > vdpa dev add name vdpa1 mgmtdev pci/0000:00:06.0
> >
> > Signed-off-by: Cindy Lu <lulu@...hat.com>
> > ---
> >  drivers/vdpa/virtio_pci/vp_vdpa.c | 138 +++++++++++++++++++++++-------
> >  1 file changed, 106 insertions(+), 32 deletions(-)
> >
> > diff --git a/drivers/vdpa/virtio_pci/vp_vdpa.c b/drivers/vdpa/virtio_pci/vp_vdpa.c
> > index cce101e6a940..873402977543 100644
> > --- a/drivers/vdpa/virtio_pci/vp_vdpa.c
> > +++ b/drivers/vdpa/virtio_pci/vp_vdpa.c
> > @@ -32,7 +32,8 @@ struct vp_vring {
> >
> >  struct vp_vdpa {
> >         struct vdpa_device vdpa;
> > -       struct virtio_pci_modern_device mdev;
> > +       /* this is an pointer point to the mdev in vp_vdpa_mgmtdev*/
> > +       struct virtio_pci_modern_device *mdev;
>
> The code can explain itself, so the comment is redundant.
>
sure wll remove this.
> >         struct vp_vring *vring;
> >         struct vdpa_callback config_cb;
> >         char msix_name[VP_VDPA_NAME_SIZE];
> > @@ -41,6 +42,12 @@ struct vp_vdpa {
> >         int vectors;
> >  };
> >
> > +struct vp_vdpa_mgmtdev {
> > +       struct vdpa_mgmt_dev mgtdev;
> > +       struct virtio_pci_modern_device mdev;
>
> I think coupling it with mgmt device is probably not good, any reason
> we can't allocate it independently?
>
yes I also think it make code confused,  but we need to init  it in
static int vp_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id)
and then  pass it to
static int vp_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
   const struct vdpa_dev_set_config *add_config)
the only struct we can use is struct vdpa_mgmt_dev *v_mdev,  not sure
if we have
some better choice ?

> Thanks
>
> > +       struct vp_vdpa *vp_vdpa;
> > +};
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ