From: Stefan Hajnoczi <stefanha@gmail.com>
To: Chris Friesen <chris.friesen@windriver.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] high-level view of packet processing for virtio NIC?
Date: Mon, 29 Jul 2019 14:27:05 +0100 [thread overview]
Message-ID: <20190729132705.GC6771@stefanha-x1.localdomain> (raw)
In-Reply-To: <c6d83f1f-50e2-60e1-38d7-4e622ac71a8c@windriver.com>
[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]
On Tue, Jul 23, 2019 at 10:18:01AM -0600, Chris Friesen wrote:
> I'm looking for information on what the qemu architecture looks like for
> processing virtio network packets in a two-vCPU guest.
>
> It looks like there's an IO thread doing a decent fraction of the work,
> separate from the vCPU threads--is that correct? There's no disk involved
> in this case, purely network packet processing.
Most production x86 KVM guests use vhost_net.ko to perform virtio-net
rx/tx virtqueue processing in the host kernel. That means the QEMU code
isn't used and the code path is totally different.
Before spending too much time on this, check which code path you are
interested in.
If you are using QEMU's virtio-net without vhost then the main loop
thread processes rx/tx virtqueue kicks and packet rx/tx events. The
vcpu threads are not directly involved because the ioeventfd feature is
used to direct virtqueue kicks to the main loop thread instead of
blocking vcpu threads.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2019-07-29 13:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 16:18 [Qemu-devel] high-level view of packet processing for virtio NIC? Chris Friesen
2019-07-24 0:27 ` Dongli Zhang
2019-07-29 13:27 ` Stefan Hajnoczi [this message]
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=20190729132705.GC6771@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=chris.friesen@windriver.com \
--cc=qemu-devel@nongnu.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).