OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-comment] [PATCH v3] Introduction of Virtio Network device notifications coalescing feature.


On Thu, May 26, 2022 at 10:48 PM Alvaro Karsz
<alvaro.karsz@solid-run.com> wrote:
>
> After some more thought, I'm not sure that the notifications
> coalescing feature can work if VIRTIO_F_EVENT_IDX is negotiated.
>
> Quoting Virtio Spec:
> > Note: For example, if used_event is 0, then a device using VIRTIO_F_EVENT_IDX would send a used buffer notification to the driver after the first buffer is used (and again after the 65536th buffer, etc).
>
> So, if the driver sets the event index to #X and doesn't change the
> value after receiving the notification, it is meaningless to use the
> interrupt coalescing parameters. since it will anyway receive a
> notification every 65536 packets (uint16_t overflow).

It's not a conflict since we can add more conditions when the device
needs to send a notification.

>
> I'm thinking of adding a constraint that the driver MUST NOT accept
> this feature if VIRTIO_F_EVENT_IDX is offered by the device.
> What do you think?

I think we need first understand what's the advantage of using packet
based interrupt coalescing over event index?

And if the answer is yes, is it worthwhile to make coalescing and
event index work in parallel?

The notification is sent when any of the following condition is met:

- If the idx field in the used ring (which determined where that
descriptor index was placed) was equal to used_event
- If we hit the coalescing limit

For the driver that want to use interrupt coalescing only, it can choose:

1) avoid negotiating event index

or

2) do not publish new used_event

Thanks

>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]