Displaying 9 results from an estimated 9 matches for "desc_id".
Did you mean:
desc_idx
2017 Jul 23
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...s?
>
>
> Implementation Reference:
>
> struct desc_iterator {
> unsigned int head;
> unsigned int tail;
> };
>
> add_first(*vq, *desc_iterator, *num_free, ..)
> {
> if (vq->vq.num_free < 1)
> return -ENOSPC;
> get_desc(&desc_id);
> desc[desc_id].flag &= ~_F_NEXT;
> desc_iterator->head = desc_id
> desc_iterator->tail = desc_iterator->head;
> *num_free = vq->vq.num_free;
> }
>
> add_next(vq, desc_iterator, *num_free,..)
> {
> get_desc(&desc_id);
> de...
2017 Jul 23
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...s?
>
>
> Implementation Reference:
>
> struct desc_iterator {
> unsigned int head;
> unsigned int tail;
> };
>
> add_first(*vq, *desc_iterator, *num_free, ..)
> {
> if (vq->vq.num_free < 1)
> return -ENOSPC;
> get_desc(&desc_id);
> desc[desc_id].flag &= ~_F_NEXT;
> desc_iterator->head = desc_id
> desc_iterator->tail = desc_iterator->head;
> *num_free = vq->vq.num_free;
> }
>
> add_next(vq, desc_iterator, *num_free,..)
> {
> get_desc(&desc_id);
> de...
2017 Jul 13
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...)) {
> > add_last(vq, ...)
> > kick
> > wait
> > }
>
> "!add_next(vq, ...)" means that the vq is full?
No - it means there's only 1 entry left for the last descriptor.
> If so, what would add_last()
> do then?
>
> > Using VIRTQUEUE_DESC_ID_INIT seems to avoid a branch in the driver, but
> > in fact it merely puts the branch in the virtio code.
> >
>
> Actually it wasn't intended to improve performance. It is used to indicate
> the "init" state
> of the chain. So, when virtqueue_add_chain_desc(,...
2017 Jul 13
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...)) {
> > add_last(vq, ...)
> > kick
> > wait
> > }
>
> "!add_next(vq, ...)" means that the vq is full?
No - it means there's only 1 entry left for the last descriptor.
> If so, what would add_last()
> do then?
>
> > Using VIRTQUEUE_DESC_ID_INIT seems to avoid a branch in the driver, but
> > in fact it merely puts the branch in the virtio code.
> >
>
> Actually it wasn't intended to improve performance. It is used to indicate
> the "init" state
> of the chain. So, when virtqueue_add_chain_desc(,...
2017 Jul 14
0
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...-- or, do you have a different thought about using the three APIs?
Implementation Reference:
struct desc_iterator {
unsigned int head;
unsigned int tail;
};
add_first(*vq, *desc_iterator, *num_free, ..)
{
if (vq->vq.num_free < 1)
return -ENOSPC;
get_desc(&desc_id);
desc[desc_id].flag &= ~_F_NEXT;
desc_iterator->head = desc_id
desc_iterator->tail = desc_iterator->head;
*num_free = vq->vq.num_free;
}
add_next(vq, desc_iterator, *num_free,..)
{
get_desc(&desc_id);
desc[desc_id].flag &= ~_F_NEXT;
desc[...
2017 Jul 26
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...unsigned int head;
> > > unsigned int tail;
> > > };
> > >
> > > add_first(*vq, *desc_iterator, *num_free, ..)
> > > {
> > > if (vq->vq.num_free < 1)
> > > return -ENOSPC;
> > > get_desc(&desc_id);
> > > desc[desc_id].flag &= ~_F_NEXT;
> > > desc_iterator->head = desc_id
> > > desc_iterator->tail = desc_iterator->head;
> > > *num_free = vq->vq.num_free;
> > > }
> > >
> > > add_next(vq, desc_i...
2017 Jul 26
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...unsigned int head;
> > > unsigned int tail;
> > > };
> > >
> > > add_first(*vq, *desc_iterator, *num_free, ..)
> > > {
> > > if (vq->vq.num_free < 1)
> > > return -ENOSPC;
> > > get_desc(&desc_id);
> > > desc[desc_id].flag &= ~_F_NEXT;
> > > desc_iterator->head = desc_id
> > > desc_iterator->tail = desc_iterator->head;
> > > *num_free = vq->vq.num_free;
> > > }
> > >
> > > add_next(vq, desc_i...
2017 Jul 26
0
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...gt;>
>> struct desc_iterator {
>> unsigned int head;
>> unsigned int tail;
>> };
>>
>> add_first(*vq, *desc_iterator, *num_free, ..)
>> {
>> if (vq->vq.num_free < 1)
>> return -ENOSPC;
>> get_desc(&desc_id);
>> desc[desc_id].flag &= ~_F_NEXT;
>> desc_iterator->head = desc_id
>> desc_iterator->tail = desc_iterator->head;
>> *num_free = vq->vq.num_free;
>> }
>>
>> add_next(vq, desc_iterator, *num_free,..)
>> {
>>...
2017 Jul 27
0
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...ead;
>>>> unsigned int tail;
>>>> };
>>>>
>>>> add_first(*vq, *desc_iterator, *num_free, ..)
>>>> {
>>>> if (vq->vq.num_free < 1)
>>>> return -ENOSPC;
>>>> get_desc(&desc_id);
>>>> desc[desc_id].flag &= ~_F_NEXT;
>>>> desc_iterator->head = desc_id
>>>> desc_iterator->tail = desc_iterator->head;
>>>> *num_free = vq->vq.num_free;
>>>> }
>>>>
>>>> ad...