search for: virtqueue_desc_chain

Displaying 5 results from an estimated 5 matches for "virtqueue_desc_chain".

2017 Jul 12
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
On Wed, Jul 12, 2017 at 09:29:00PM +0800, Wei Wang wrote: > On 07/12/2017 09:06 PM, Michael S. Tsirkin wrote: > > On Wed, Jul 12, 2017 at 08:40:18PM +0800, Wei Wang wrote: > > > diff --git a/include/linux/virtio.h b/include/linux/virtio.h > > > index 28b0e96..9f27101 100644 > > > --- a/include/linux/virtio.h > > > +++ b/include/linux/virtio.h > >
2017 Jul 12
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
On Wed, Jul 12, 2017 at 09:29:00PM +0800, Wei Wang wrote: > On 07/12/2017 09:06 PM, Michael S. Tsirkin wrote: > > On Wed, Jul 12, 2017 at 08:40:18PM +0800, Wei Wang wrote: > > > diff --git a/include/linux/virtio.h b/include/linux/virtio.h > > > index 28b0e96..9f27101 100644 > > > --- a/include/linux/virtio.h > > > +++ b/include/linux/virtio.h > >
2017 Jul 13
0
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...virtqueue_add_chain_desc(..); virtqueue_add_chain(..,head_id); Would you see any issues here? > - some kind of iterator type would be nicer instead of > maintaining head/prev explicitly Why would we need to iterate the chain? I think it would be simpler to use a wrapper struct: struct virtqueue_desc_chain { unsigned int head; // head desc id of the chain unsigned int tail; // tail desc id of the chain } The new desc will be put to desc[tail].next, and we don't need to walk from the head desc[head].next when inserting a new desc to the chain, right? > > As for the use, it...
2017 Jul 13
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...type would be nicer instead of > > maintaining head/prev explicitly > > Why would we need to iterate the chain? In your patches prev/tail are iterators - they keep track of where you are in the chain. > I think it would be simpler to use > a wrapper struct: > > struct virtqueue_desc_chain { > unsigned int head; // head desc id of the chain > unsigned int tail; // tail desc id of the chain > } > > The new desc will be put to desc[tail].next, and we don't need to walk > from the head desc[head].next when inserting a new desc to the chain, right? &gt...
2017 Jul 13
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...type would be nicer instead of > > maintaining head/prev explicitly > > Why would we need to iterate the chain? In your patches prev/tail are iterators - they keep track of where you are in the chain. > I think it would be simpler to use > a wrapper struct: > > struct virtqueue_desc_chain { > unsigned int head; // head desc id of the chain > unsigned int tail; // tail desc id of the chain > } > > The new desc will be put to desc[tail].next, and we don't need to walk > from the head desc[head].next when inserting a new desc to the chain, right? &gt...