Commit Graph

20 Commits

Author SHA1 Message Date
Jan Kiszka 43b26fc851 Drop unneeded pthread.h inclusions
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-09-21 10:49:16 +01:00
John Haxby 384087b2fe Introduce a new 'connected' xendev op called when Connected.
Rename the existing xendev 'connect' op to 'initialised' and introduce
a new 'connected' op.  This new op, if defined, is called when the
backend is connected.  Note that since there is no state transition this
may be called more than once.

Signed-off-by: John Haxby <john.haxby@oracle.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2011-09-09 13:13:16 +00:00
Anthony Liguori 7267c0947d Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-20 23:01:08 -05:00
Anthony PERARD 209cd7abe2 xen: Replace some tab-indents with spaces (clean-up).
And put braces for blocks with a single statement.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-05-08 10:09:59 +02:00
Mark McLoughlin 658788c560 net: convert xen to NICState
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03 09:41:34 -06:00
Mark McLoughlin 7200ac3c7c net: move net-checksum.c under net/
Also add a new net/checksum.h header

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-30 08:39:26 -05:00
Mark McLoughlin 70783b9c9b net: add receive_raw parameter to qemu_new_vlan_client()
Trivial patch to allow supplying a receive_raw function.

A future cleanup should combine this function pointer parameters into a
table.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:29:01 -05:00
Mark McLoughlin bb6e636443 net: add a client type code
This is so as to allow APIs which operate on specific client types
without having to add a function table entry which is only implemented
by a single client type.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:29:00 -05:00
Mark McLoughlin 283c7c63f5 net: allow NICs to be connected to netdevs
Introduce a 'peer' member to VLANClientState as an alternative
to a vlan. The idea being that packets are transfered directly
from peer clients rather than going through a vlan.

Patchworks-ID: 35516
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15 09:32:02 -05:00
Blue Swirl 8167ee8839 Update to a hopefully more future proof FSF address
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-16 20:47:01 +00:00
Jan Kiszka 1a60952027 net: Provide VLAN client lookup helper
Introduce qemu_find_vlan_client_by_name for VLANClientState lookup based
on VLAN ID and client name. This is useful for monitor commands.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 08:52:50 -05:00
Gerd Hoffmann 3e3cabcff9 xen nic: check tx queue after connect.
Needed for savevm/loadvm + migration: In that case the queue might
already have packets on (re-)connect.  The guest wouldn't notify us
because notifications are only sent when stuffing a packet into an
empty queue.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-13 16:18:59 +03:00
Mark McLoughlin 4f1c942b7f net: add return value to packet receive handler
This allows us to handle queue full conditions rather than dropping
the packet on the floor.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09 11:38:49 +01:00
Mark McLoughlin e3f5ec2b5e net: pass VLANClientState* as first arg to receive handlers
Give static type checking a chance to catch errors.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09 11:38:49 +01:00
Mark McLoughlin cda9046ba7 net: re-name vc->fd_read() to vc->receive()
VLANClientState's fd_read() handler doesn't read from file
descriptors, it adds a buffer to the client's receive queue.

Re-name the handlers to make things a little less confusing.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09 11:38:49 +01:00
Mark McLoughlin 463af5349a net: add fd_readv() handler to qemu_new_vlan_client() args
This, apparently, is the style we prefer - all VLANClientState
should be an argument to qemu_new_vlan_client().

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09 11:38:49 +01:00
Gerd Hoffmann 682aea0eaa xen nic: use XC_PAGE_SIZE instead of PAGE_SIZE.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-08 20:02:04 +03:00
Gerd Hoffmann 7105b05658 xen nic: use qemu_malloc
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-08 20:01:23 +03:00
Gerd Hoffmann 6379840fc8 xen: net backend doesn't need linux headers.
Drop them to make qemu build on OpenSolaris.

Cc: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-06 18:48:50 +03:00
aliguori e613b064a8 xen: add net backend driver. (Gerd Hoffmann)
This patch adds a network interface backend driver to qemu.  It is a pure
userspace implemention using the gntdev interface.  It uses "qnet" as
backend name in xenstore so it doesn't interfere with the netback
backend (aka "vnif").

The network backend is hooked into the corrosponding qemu vlan, i.e.
vif 0 is hooked into vlan 0.  To make the packages actually arrive
somewhere you additionally have to link the vlan to the outside world
using the usual qemu command line options such as "-net tap,...".

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7224 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-22 15:19:35 +00:00