Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1612655
| From | Cornelia Huck <cornelia.huck@de.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/6] virtio: allow extra context per descriptor |
| Date | 2017-03-30 09:30 +0200 |
| Message-ID | <tqCGR-2MS-13@gated-at.bofh.it> (permalink) |
| References | <tqsRb-3S4-7@gated-at.bofh.it> <tqsRb-3S4-9@gated-at.bofh.it> |
| Organization | IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 |
On Wed, 29 Mar 2017 23:48:53 +0300
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> Allow extra context per descriptor. To avoid slow down for data path,
> this disables use of indirect descriptors for this vq.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> drivers/virtio/virtio_ring.c | 70 ++++++++++++++++++++++++++++++++++++--------
> include/linux/virtio.h | 9 ++++++
> 2 files changed, 66 insertions(+), 13 deletions(-)
>
> /**
> + * virtqueue_add_inbuf_ctx - expose input buffers to other end
> + * @vq: the struct virtqueue we're talking about.
> + * @sg: scatterlist (must be well-formed and terminated!)
> + * @num: the number of entries in @sg writable by other side
> + * @data: the token identifying the buffer.
> + * @ctx: extra context for the token
I think that needs do that ctx != NULL collides with indirect
descriptors.
> + * @gfp: how to do memory allocations (if necessary).
> + *
> + * Caller must ensure we don't call this with other virtqueue operations
> + * at the same time (except where noted).
> + *
> + * Returns zero or a negative error (ie. ENOSPC, ENOMEM, EIO).
> + */
> +int virtqueue_add_inbuf_ctx(struct virtqueue *vq,
> + struct scatterlist *sg, unsigned int num,
> + void *data,
> + void *ctx,
> + gfp_t gfp)
> +{
> + return virtqueue_add(vq, &sg, num, 0, 1, data, ctx, gfp);
> +}
> +EXPORT_SYMBOL_GPL(virtqueue_add_inbuf_ctx);
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] virtio: support extra per-buffer context "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-29 23:00 +0200
[PATCH 3/6] virtio: allow extra context per descriptor "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-29 23:00 +0200
Re: [PATCH 3/6] virtio: allow extra context per descriptor Cornelia Huck <cornelia.huck@de.ibm.com> - 2017-03-30 09:30 +0200
Re: [PATCH 3/6] virtio: allow extra context per descriptor "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-30 16:40 +0200
[PATCH 2/6] virtio: add context flag to find vqs "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-29 23:00 +0200
Re: [PATCH 2/6] virtio: add context flag to find vqs Cornelia Huck <cornelia.huck@de.ibm.com> - 2017-03-30 09:20 +0200
Re: [PATCH 2/6] virtio: add context flag to find vqs "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-30 17:00 +0200
[PATCH 1/6] virtio: wrap find_vqs "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-29 23:00 +0200
RE: [PATCH 1/6] virtio: wrap find_vqs "Gonglei (Arei)" <arei.gonglei@huawei.com> - 2017-03-30 03:00 +0200
Re: [PATCH 1/6] virtio: wrap find_vqs Jason Wang <jasowang@redhat.com> - 2017-03-30 08:10 +0200
Re: [PATCH 1/6] virtio: wrap find_vqs "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-30 16:40 +0200
Re: [PATCH 1/6] virtio: wrap find_vqs Jason Wang <jasowang@redhat.com> - 2017-03-31 06:10 +0200
Re: [PATCH 1/6] virtio: wrap find_vqs "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-31 18:30 +0200
Re: [PATCH 1/6] virtio: wrap find_vqs Cornelia Huck <cornelia.huck@de.ibm.com> - 2017-03-30 09:20 +0200
Re: [PATCH 1/6] virtio: wrap find_vqs Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-04-01 18:20 +0200
[PATCH 5/6] virtio_net: rework mergeable buffer handling "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-29 23:00 +0200
[PATCH 4/6] virtio_net: allow specifying context for rx "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-29 23:00 +0200
Re: [PATCH 4/6] virtio_net: allow specifying context for rx Cornelia Huck <cornelia.huck@de.ibm.com> - 2017-03-30 09:30 +0200
Re: [PATCH 4/6] virtio_net: allow specifying context for rx "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-30 16:40 +0200
Re: [PATCH 4/6] virtio_net: allow specifying context for rx Cornelia Huck <cornelia.huck@de.ibm.com> - 2017-03-30 16:50 +0200
csiph-web