History | View | Annotate | Download (5.6 kB)
qdev: add id= support for pci nics.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Don't leak VLANClientState on PCI hot remove
destroy_nic() requires that NICInfo::private by a PCIDevice pointer,but then goes on to require that the same pointer matchesVLANClientState::opaque.
That is no longer the case for virtio-net since qdev and wasn't...
net: Provide VLAN client lookup helper
Introduce qemu_find_vlan_client_by_name for VLANClientState lookup basedon 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>
slirp: Make hostfwd_add/remove multi-instance-aware
Extend the syntax of hostfwd_add/remove to optionally take a tuple ofVLAN ID and slirp stack name. If those are omitted, the commands willcontinue to work on the first registered slirp stack.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
slirp: Kill slirp_is_inited
Avoid the need for slirp_is_inited by refactoring the protectedslirp_select_* functions. This also avoids the clearing of all fd setson select errors.
slirp: Add info usernet for dumping connection states
Break out sockstats from the slirp statistics and present them under thenew info category "usernet". This patch also improves the current output/wrt proper reporting connection source and destination....
slirp: Rework monitor commands for host forwarding
Improve the monitor interface for adding and removing host forwardingrules by splitting it up in two commands and rename them to hostfwd_addand hostfwd_remove. Also split up the paths taken for legacy -redir...
slirp: Bind support for host forwarding rules
Extend the hostfwd rule format so that the user can specify on whichhost interface qemu should listen for incoming connections. If omitted,binding will takes place against all interfaces.
slirp: Move smb, redir, tftp and bootp parameters and -net channel
So far a couple of slirp-related parameters were expressed viastand-alone command line options. This it inconsistent and unintuitive.Moreover, it prevents both dynamically reconfigured (host_net_add/...
qemu/net: flag to control the number of vectors a nic has
Add an option to specify the number of MSI-X vectors for PCI NIC cards. Thiscan also be used to disable MSI-X, for compatibility with old qemu. Thisoption currently only affects virtio cards.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
net: add qemu_purge_queued_packets()
If net client sends packets asynchronously, it needs to purge its queuedpackets in cleanup() so as to prevent sent callbacks being invoked witha freed client.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: add packet length to NetPacketSent callback
virtio-net needs this - for the same purpose that it currently uses thereturn value from qemu_sendv_packet().
Support addr=... in option argument of -net nic
Make net_client_init() accept addr=, put the value into structNICinfo. Use it in pci_nic_init(), and remove arguments bus anddevfn.
Don't support addr= in third argument of monitor command pci_add,because that clashes with its first argument. Admittedly unelegant....
Make nic option rom loading less painful.
The code how it is today, is totally painful to read and keep.To begin with, the code is duplicated with the option rom loadingcode that linux_boot and vga are already using.
This patch introduces a "bootable" state in NICInfo structure,...
net: add qemu_send_packet_async()
Add a qemu_send_packet() variant which will queue up the packetif it cannot be sent when all client queues are full. It laterinvokes the supplied callback when the packet has been sent.
If qemu_send_packet_async() returns zero, the caller is expected...
net: Improve parameter error reporting
As host network devices can also be instantiated via the monitor, errorsshould then be reported to the related monitor instead of stderr. Thisrequires larger refactoring, so this patch starts small with introducing...
net: add fd_readv() handler to qemu_new_vlan_client() args
This, apparently, is the style we prefer - all VLANClientStateshould be an argument to qemu_new_vlan_client().
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
net: re-name vc->fd_read() to vc->receive()
VLANClientState's fd_read() handler doesn't read from filedescriptors, it adds a buffer to the client's receive queue.
Re-name the handlers to make things a little less confusing.
net: pass VLANClientState* as first arg to receive handlers
Give static type checking a chance to catch errors.
net: add return value to packet receive handler
This allows us to handle queue full conditions rather than droppingthe packet on the floor.
User Networking: Enable removal of redirections
Using the new host_net_redir command you can easily create redirectionson the fly while your VM is running.
While that's great, it's missing the removal of redirections, in case youwant to have a port closed again at a later point in time....
PCI network qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
slirp: Enhance host-guest redirection setup (Jan Kiszka)
Allow to establish a TCP/UDP connection redirection also via a monitorcommand 'host_net_redir'. Moreover, assume TCP as connection type ifthat parameter is omitted.
net: Untangle nested qemu_send_packet (Jan Kiszka)
Queue packets that are send during an ongoing packet delivery. Thisensures that packets will always arrive in their logical order at eachclient of a VLAN. Currently, slirp generates such immediate relies, and...
Introduce VLANClientState::cleanup() (Mark McLoughlin)
We're currently leaking memory and file descriptors on devicehot-unplug.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7150 c046a42c-6fe2-441c-8c8c-71466251a162
monitor: Rework API (Jan Kiszka)
Refactor the monitor API and prepare it for decoupled terminals:term_print functions are renamed to monitor_* and all monitor servicesgain a new parameter (mon) that will once refer to the monitor instancethe output is supposed to appear on. However, the argument remains...
qemu: PCI device, disk and host network hot-add / hot-remove (Marcelo Tosatti)
Add monitor command to hot-add PCI devices (nic and storage).
Syntax is:
pci_add pci_addr=[[<domain>:]<bus>:]<slot> nic|storage params
It returns the domain, bus and slot for the newly added device on success....
qemu: add net_client_uninit / qemu_find_vlan_client (Marcelo Tosatti)
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6600 c046a42c-6fe2-441c-8c8c-71466251a162
qemu: dynamic nic info index allocation (Marcelo Tosatti)
Dynamically allocate nic info index, so to reuse indexes when devices areremoved.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6595 c046a42c-6fe2-441c-8c8c-71466251a162
qemu: return PCIDevice on net device init and record devfn (Marcelo Tosatti)
Change the PCI network drivers init functions to return the PCIDev, toinform which slot has been hot-plugged.
Also record PCIDevice structure on NICInfo to locate for release on...
Add qemu_check_nic_model() and qemu_check_nic_model_list() (Mark McLoughlin)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6281 c046a42c-6fe2-441c-8c8c-71466251a162
Allow devices be notified of link status change (Mark McLoughlin)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6248 c046a42c-6fe2-441c-8c8c-71466251a162
Add 'set_link' monitor command (Mark McLoughlin)
Add a monitor command to setting a given network device's link statusto 'up' or 'down'.
Allows simulation of network cable disconnect.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Add a -net name=foo parameter (Mark McLoughlin)
Allow the user to supply a vlan client name on the command line.
This is probably only useful for management tools so that they canuse their own names rather than parsing the output of 'info network'.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>...
Add qemu_format_nic_info_str() (Mark McLoughlin)
Factor out a simple little function for formatting a NIC'sinfo_str and make all NICs use it.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6218 c046a42c-6fe2-441c-8c8c-71466251a162
Assign a name to each VLAN client (Mark McLoughlin)
Automatically assign a name to each vlan client based on its model,e.g. e1000.0, tap.3 or vde.1.
This name is intended to be used by the forthcoming 'set_link'monitor command.
Add a model string to VLANClientState (Mark McLoughlin)
Don't lose track of what type/model a vlan client is so that we cane.g. assign a global per-model id to clients.
The entire patch is basically a tedious excercise in making sure thetype/model string gets propagated down to qemu_new_vlan_client()....
consolidate definition for tap script and smb support
Since the introduction of net.c in r5581 there had been 2 places wherethe location of the TAP helper scripts and SMB daemon are defined.
The following patch move those definitions to net.h so they are accessible...
virtio-net support
This adds virtio-net support. This is based on the virtio-net driverthat exists in kvm-userspace. This also adds a new qemu_sendv_packetwhich virtio-net requires.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6073 c046a42c-6fe2-441c-8c8c-71466251a162
Move network redirection code out of vl.c and into net.c
Mostly code motion.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5581 c046a42c-6fe2-441c-8c8c-71466251a162
Add a "null" bluetooth HCI and a header file for bluetooth.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5342 c046a42c-6fe2-441c-8c8c-71466251a162
Add IP checksumming functions to qemu (Gerd Hoffmann)
This can be shared between the e1000, virtio-net, and xennet.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4971 c046a42c-6fe2-441c-8c8c-71466251a162
Remove the NIC from vlan on usb destroy.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4885 c046a42c-6fe2-441c-8c8c-71466251a162
Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162