On Thu, Mar 22, 2012 at 1:48 AM, Steve Glass <stevie.glass@xxxxxxxxx> wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > Just some further information concerning my earlier question > concerning vhost and virtio. > > I'm using virtio to implement an emulated mac80211 device in the > guest. A simple network simulation will be used to control delivery of > frames between guests and for this I am using the vhost approach. > > A simple first-cut attempt at the tx and rx kick handlers are given > below. When the guest transmits frames the vhost's TX kick handler is > executed and copies the buffers onto a queue for the intended > recipient(s). When the vhost's RX kick handler is run it copies the > buffer from the queue and notifies the client that the buffers have > been used. > > The problem is that if there are no frames in the queue when the guest > rx kick handler runs then it has to exit and I have to arrange that it > runs again. That's done in the current prototype by having the guests > poll using a timer - which is ugly and inefficient. Can I get the > vhost tx kick handler to wake the appropriate vhost rx kick handler? > How can I achieve this? Can you queue a tx->rx kick on the vhost work queue with vhost_work_queue()? Stefan -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html