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]
Date:   Wed, 9 Mar 2022 17:58:46 +0800
From:   Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
To:     Jason Wang <jasowang@...hat.com>
Cc:     Jeff Dike <jdike@...toit.com>, Richard Weinberger <richard@....at>,
        Anton Ivanov <anton.ivanov@...bridgegreys.com>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Hans de Goede <hdegoede@...hat.com>,
        Mark Gross <markgross@...nel.org>,
        Vadim Pasternak <vadimp@...dia.com>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Cornelia Huck <cohuck@...hat.com>,
        Halil Pasic <pasic@...ux.ibm.com>,
        Heiko Carstens <hca@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Jesper Dangaard Brouer <hawk@...nel.org>,
        John Fastabend <john.fastabend@...il.com>,
        Johannes Berg <johannes.berg@...el.com>,
        Vincent Whitchurch <vincent.whitchurch@...s.com>,
        linux-um@...ts.infradead.org, platform-driver-x86@...r.kernel.org,
        linux-remoteproc@...r.kernel.org, linux-s390@...r.kernel.org,
        kvm@...r.kernel.org, bpf@...r.kernel.org,
        virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org
Subject: Re: [PATCH v7 21/26] virtio: add helper virtio_find_vqs_ctx_size()

On Wed, 9 Mar 2022 17:04:12 +0800, Jason Wang <jasowang@...hat.com> wrote:
>
> 在 2022/3/8 下午8:35, Xuan Zhuo 写道:
> > Introduce helper virtio_find_vqs_ctx_size() to call find_vqs and specify
> > the maximum size of each vq ring.
> >
> > Signed-off-by: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
> > ---
> >   include/linux/virtio_config.h | 12 ++++++++++++
> >   1 file changed, 12 insertions(+)
> >
> > diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
> > index 5157524d8036..921d8610db0c 100644
> > --- a/include/linux/virtio_config.h
> > +++ b/include/linux/virtio_config.h
> > @@ -233,6 +233,18 @@ int virtio_find_vqs_ctx(struct virtio_device *vdev, unsigned nvqs,
> >   				      desc, NULL);
> >   }
> >
> > +static inline
> > +int virtio_find_vqs_ctx_size(struct virtio_device *vdev, u32 nvqs,
> > +				 struct virtqueue *vqs[],
> > +				 vq_callback_t *callbacks[],
> > +				 const char * const names[],
> > +				 const bool *ctx, struct irq_affinity *desc,
> > +				 u32 sizes[])
> > +{
> > +	return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, ctx,
> > +				      desc, sizes);
> > +}
>
>
> Do we need to convert all the open coded direct call to find_vqs() other
> than net?


Do you mean calling find_vqs without a helper? The kernel doesn't do that
anymore.

Thanks.


>
> Thanks
>
>
> > +
> >   /**
> >    * virtio_reset_vq - reset a queue individually
> >    * @vq: the virtqueue
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ