[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] net devices

From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] net devices
Date: Wed, 25 Feb 2015 13:26:57 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Feb 25, 2015 at 09:54:40AM +0200, Vasile Catalin-B50542 wrote:
> I'm looking through the qemu sources and I'm trying to understand how net
> devices work.
> What is considered a net_client inside qemu sources?
> I'm asking about this because I came upon two functions which (because of
> their name) sound like
> they should be doing the same thing. The functions' name are:
> 1. qemu_new_nic()
> 2. qemu_new_net_client()
> More specifically I'm looking through the virtio-net vhost-net sources.

NetClientState is the concept send/receive packet abstraction.  Both
netdevs (tap, socket, ...) and NICs need to use NetClientState to
transmit packets.

A NICState has one or more NetClientStates (for multi-queue NICs).
These NetClientStates have a NetClientOptionsKind of
NET_CLIENT_OPTIONS_KIND_NIC to distinguish them from the -netdevs like
tap, socket, etc.

Emulated NICs use qemu_new_nic() while netdevs use

NICs and netdev vary slightly in their removal behavior, so you'll see
code that checks the NetClientState type to see whether it is


Attachment: pgpQ1WyxLsIdm.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]