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] [day] [month] [year] [list]
Date:   Mon, 24 Oct 2022 11:09:49 +0000
From:   Angus Chen <angus.chen@...uarmicro.com>
To:     Jason Wang <jasowang@...hat.com>, "mst@...hat.com" <mst@...hat.com>
CC:     "virtualization@...ts.linux-foundation.org" 
        <virtualization@...ts.linux-foundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "lingshan.zhu@...el.com" <lingshan.zhu@...el.com>
Subject: RE: [PATCH v2] vDPA: rename get_vq_num_max to get_vq_size_max

Hi mst.

> -----Original Message-----
> From: Jason Wang <jasowang@...hat.com>
> Sent: Monday, October 24, 2022 10:17 AM
> To: Angus Chen <angus.chen@...uarmicro.com>
> Cc: mst@...hat.com; virtualization@...ts.linux-foundation.org;
> linux-kernel@...r.kernel.org; lingshan.zhu@...el.com
> Subject: Re: [PATCH v2] vDPA: rename get_vq_num_max to get_vq_size_max
> 
> On Mon, Oct 24, 2022 at 10:16 AM Angus Chen <angus.chen@...uarmicro.com>
> wrote:
> >
> > Hi Jason
> >
> > > -----Original Message-----
> > > From: Jason Wang <jasowang@...hat.com>
> > > Sent: Monday, October 24, 2022 10:01 AM
> > > To: Angus Chen <angus.chen@...uarmicro.com>
> > > Cc: mst@...hat.com; virtualization@...ts.linux-foundation.org;
> > > linux-kernel@...r.kernel.org; lingshan.zhu@...el.com
> > > Subject: Re: [PATCH v2] vDPA: rename get_vq_num_max to
> get_vq_size_max
> > >
> > > On Mon, Oct 24, 2022 at 9:56 AM Angus Chen
> <angus.chen@...uarmicro.com>
> > > wrote:
> > > >
> > > > The get_vq_num_max of vdpa_config_ops is mean get the max size of
> vq,not
> > > > the max number of vq,it is kind of confused,rename it.
> > > > And get_vq_num_min rename to get_vq_size_min,
> > > > set_vq_num rename to set_vq_size,
> > > > rename implement of this ops also.
> > > >
> > > > Signed-off-by: Angus Chen <angus.chen@...uarmicro.com>
> > > > ---
> > >
> > > Not a native sparker. But num_max came from virtqueue structure:
> > >
> > > /*
> > >  ...
> > >  * @num_max: the maximum number of elements supported by the
> device.
> > >  ...
> > >  */
> > >
> > > struct virtqueue {
> > >         ...
> > >         unsigned int num_max;
> > I noticed this alsoļ¼Œand I always confused by the definition. Take
> virtio_pci_common_cfg for example:
> >
> > /* Fields in VIRTIO_PCI_CAP_COMMON_CFG: */
> > struct virtio_pci_common_cfg {
> >         ...
> >     __le16 num_queues;      /* read-only */
> >
> > It just a suggestion.
> > Thank you.
> 
> Let's hear from the others then decide.
Ok, I noticed some examples others like:

ifcvf_vdpa_set_vq_num(struct vdpa_device *vdpa_dev, u16 qid, u32 num)
{
   ...
   vf->vring[qid].size = num;--------it use the 'size' to store the depth of vqueue.
   ...
}

Or
vdpa_dev_fill(struct vdpa_device *vdev, struct sk_buff *msg, u32 portid, u32 seq, int flags, struct netlink_ext_ack *extack)
{
...
    max_vq_size = vdev->config->get_vq_num_max(vdev);
    if (vdev->config->get_vq_num_min)
          min_vq_size = vdev->config->get_vq_num_min(vdev);
...
   It use the vq_size to store num also.
}

However, some function use max_num to store the return value of get_vq_num_max  like vdpa_dev_probe().
What is your opinion about it? Mst .

Thanks.
> 
> Thanks
> 
> > >         ...
> > > };
> > >
> > > Thanks
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ