diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-02-04 23:49:59 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-02-04 23:50:00 +1100 |
commit | 426e3e0af5d2473e67d4256fc1340b7faebd1cc7 (patch) | |
tree | 29912e63889e45307f41ef08116ecd895b17e21c /Documentation | |
parent | 3309daaad724dd08eb598bf9c12b7bb9daddd706 (diff) | |
download | linux-426e3e0af5d2473e67d4256fc1340b7faebd1cc7.tar.bz2 |
virtio: clarify NO_NOTIFY flag usage
The other side (host) can set the NO_NOTIFY flag as an optimization,
to say "no need to kick me when you add things". Make it clear that
this is advisory only; especially that we should always notify when
the ring is full.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/lguest/lguest.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 4df1804169dc..8ff2d8bc690a 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c @@ -923,10 +923,10 @@ static void handle_output(int fd, unsigned long addr) /* Check each virtqueue. */ for (i = devices.dev; i; i = i->next) { for (vq = i->vq; vq; vq = vq->next) { - if (vq->config.pfn == addr/getpagesize() - && vq->handle_output) { + if (vq->config.pfn == addr/getpagesize()) { verbose("Output to %s\n", vq->dev->name); - vq->handle_output(fd, vq); + if (vq->handle_output) + vq->handle_output(fd, vq); return; } } @@ -1068,7 +1068,8 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, * virtqueue. */ vq->handle_output = handle_output; - /* Set the "Don't Notify Me" flag if we don't have a handler */ + /* As an optimization, set the advisory "Don't Notify Me" flag if we + * don't have a handler */ if (!handle_output) vq->vring.used->flags = VRING_USED_F_NO_NOTIFY; } |