Linhaifeng
2015-Jun-03 06:32 UTC
virtio-net: why not always to set avail->flags to VRING_AVAIL_F_NO_INTERRUPT
Hi, I'm a newbie and have a question about vring_new_virtqueue function. Why we set avail->flags to VRING_AVAIL_F_NO_INTERRUPT when no callbacks? I think we should set avail->flags to VRING_AVAIL_F_NO_INTERRUPT even if no callbacks.
Rusty Russell
2015-Jun-04 01:13 UTC
virtio-net: why not always to set avail->flags to VRING_AVAIL_F_NO_INTERRUPT
Linhaifeng <haifeng.lin at huawei.com> writes:> Hi, > > I'm a newbie and have a question about vring_new_virtqueue function. > > Why we set avail->flags to VRING_AVAIL_F_NO_INTERRUPT when no callbacks? > I think we should set avail->flags to VRING_AVAIL_F_NO_INTERRUPT even if no callbacks.Hi Linhaifeng, Not sure I understand your question, but I'll try to answer. We don't set VRING_AVAIL_F_NO_INTERRUPT if there's a callback because we want that callback called. Otherwise callback will never be used. Cheers, Rusty.
Linhaifeng
2015-Jun-04 02:35 UTC
virtio-net: why not always to set avail->flags to VRING_AVAIL_F_NO_INTERRUPT
On 2015/6/4 9:13, Rusty Russell wrote:> Linhaifeng <haifeng.lin at huawei.com> writes: >> Hi, >> >> I'm a newbie and have a question about vring_new_virtqueue function. >> >> Why we set avail->flags to VRING_AVAIL_F_NO_INTERRUPT when no callbacks? >> I think we should set avail->flags to VRING_AVAIL_F_NO_INTERRUPT even if no callbacks. > > Hi Linhaifeng, > > Not sure I understand your question, but I'll try to answer. > > We don't set VRING_AVAIL_F_NO_INTERRUPT if there's a callback because we > want that callback called. Otherwise callback will never be used. > > Cheers, > Rusty. > >Hi Rusty, Thank you for your response. I mean should we set VRING_AVAIL_F_NO_INTERRUPT when virtqueue is initialized whether there is callback or not? As it would be set in function virtqueue_disable_cb and virtqueue_enable_cb_prepare later. Regards, Haifeng
Maybe Matching Threads
- virtio-net: why not always to set avail->flags to VRING_AVAIL_F_NO_INTERRUPT
- virtio-net: why not always to set avail->flags to VRING_AVAIL_F_NO_INTERRUPT
- virtio-net: why not always to set avail->flags to VRING_AVAIL_F_NO_INTERRUPT
- virtio-net: why not always to set avail->flags to VRING_AVAIL_F_NO_INTERRUPT
- [PATCH] virtio_ring: Shadow available ring flags & index