[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Networking Documentation
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] Networking Documentation |
Date: |
Mon, 11 May 2015 15:10:10 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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
pgp8rw6RsmPVc.pgp
Description: PGP signature