netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Steve Glass <stevie.glass@gmail.com>
Cc: netdev@vger.kernel.org, kvm@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: vhost question
Date: Thu, 22 Mar 2012 09:52:24 +0000	[thread overview]
Message-ID: <CAJSP0QXKahPja7S68MC0vLZR7HNxG4hLPRYEFH536QbP1fSu7w@mail.gmail.com> (raw)
In-Reply-To: <4F6A84EF.9060105@gmail.com>

On Thu, Mar 22, 2012 at 1:48 AM, Steve Glass <stevie.glass@gmail.com> 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

  reply	other threads:[~2012-03-22  9:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22  1:48 vhost question Steve Glass
2012-03-22  9:52 ` Stefan Hajnoczi [this message]
     [not found]   ` <CADC0ay0ZRL79uMq72kAewOBTMCgMe1_1BLotdH9QnOwosJkTYQ@mail.gmail.com>
2012-03-25 16:18     ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJSP0QXKahPja7S68MC0vLZR7HNxG4hLPRYEFH536QbP1fSu7w@mail.gmail.com \
    --to=stefanha@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stevie.glass@gmail.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).