qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: David Borman <dcentury@outlook.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Networking Documentation
Date: Mon, 11 May 2015 15:10:10 +0100	[thread overview]
Message-ID: <20150511141010.GF16270@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <BLU436-SMTP47C2C6C0E0A8DBCF19B6C7DADF0@phx.gbl>

[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]

On Thu, May 07, 2015 at 10:47:15AM +0200, David Borman wrote:
> I just want to introduce myseld. Iam David from Germany and hope i can ask
> some development specific questions and this is the right place.What is my
> best starting point getting familar with the networking code and is there
> any useful, technicall documentation out there?
> 
> Iam espacially interrested in how QEMU handles/routes the incoming
> networktraffic (from reaching physically the hosts ethernetc card, forwarded
> into quemu networking and delegation to one of the running Guests OS
> Instances.

That is largely not done in the QEMU codebase.  Many users rely on the
-netdev tap option and use the host kernel's network stack for bridging
or NAT.

There is a userspace NAT solution (hack?) in QEMU which parses TCP/UDP
packets and performs equivalent socket system calls.  This is useful
when running QEMU without permissions for the tun/tap device driver.
But it's not how most users do networking on production VMs.

Also, the vhost_net.ko driver on Linux bypasses QEMU and performs
virtio-net rx/tx in the host kernel.

So from that perspective, you may need to study the Linux source code
and poke at a live host where libvirt has set up networking for VMs to
understand how things work together.

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

      reply	other threads:[~2015-05-11 14:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07  8:47 [Qemu-devel] Networking Documentation David Borman
2015-05-11 14:10 ` 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=20150511141010.GF16270@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=dcentury@outlook.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).