aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-06-13Fix a warning: uint_fast8_t is not 8 bits on OpenBSD/Sparc64Blue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-13Avoid a gcc 3 format warningBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-13Avoid gcc 4.4 warning about uninitialized fieldBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-13Fix signedness problemsBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-13xen nic: check tx queue after connect.Gerd Hoffmann
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-13include inttypes.h in xen.hGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-13xen: adapt to qemu_machine changesGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-13xen_disk: move sanity check to the correct placeGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-13Win32: Don't remove const attribute in type casts.Stefan Weil
Type casts removing the const attribute are bad because they hide the fact that the argument remains const. They also result in a compiler warning (at least with MS-C). Signed-off-by: Stefan Weil <weil@mail.berlios.de>
2009-06-13Fix mingw32 build warningsBlue Swirl
Work around buffer and ioctlsocket argument type signedness problems Suppress a prototype which is unused on mingw32 Expand a macro to avoid warnings from some GCC versions Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-12Enable -Werror by default for git builds on Linux hostsAnthony Liguori
Additional hosts can be added to the white list as they are confirmed to build with --enable-werror. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-12CRIS: Prettify sizes for the internal disasm.Edgar E. Iglesias
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-06-12ETRAX: DMA fixes for 64bit hosts.Edgar E. Iglesias
Mainly to remove warnings. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-06-11ETRAX: Correct PIC creation for the bare FS board.Edgar E. Iglesias
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-06-11qdev: move name+size into DeviceInfo (v2)Gerd Hoffmann
Rationale: move device information from code to data structures. v2: Adapt the drivers missed in the first version. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-11Fix stellaris ethernetPaul Brook
Revert bogus part of e3f5ec2b (pass VLANClientState* as first arg to receive handlers) Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-06-11Fix xilinx_ethlite breakage by 4f1c942b7fJan Kiszka
Namely the new xilinx_ethlite used by mircoblaze. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2009-06-10Fix build breakage when using VDE introduced by 4f1c942Anthony Liguori
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-10Merge branch 'net-queue'Anthony Liguori
* net-queue: (28 commits) virtio-net: Increase filter and control limits virtio-net: Add new RX filter controls virtio-net: MAC filter optimization virtio-net: Fix MAC filter overflow handling virtio-net: reorganize receive_filter() virtio-net: Use a byte to store RX mode flags virtio-net: Add version_id 7 placeholder for vnet header support virtio-net: implement rx packet queueing net: make use of async packet sending API in tap client net: add qemu_send_packet_async() net: split out packet queueing and flushing into separate functions net: return status from qemu_deliver_packet() net: add return value to packet receive handler net: pass VLANClientState* as first arg to receive handlers net: re-name vc->fd_read() to vc->receive() net: add fd_readv() handler to qemu_new_vlan_client() args net: only read from tapfd when we can send net: vlan clients with no fd_can_read() can always receive net: move the tap buffer into TAPState net: factor tap_read_packet() out of tap_send() ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-10Fix "defined but not used" warningLuiz Capitulino
The function qemu_calculate_timeout() is only used when CONFIG_IOTHREAD is not defined. When CONFIG_IOTHREAD is defined, we have the following warning: vl.c:4389: warning: ‘qemu_calculate_timeout’ defined but not used This change fixes that by moving the #ifdef/#endif from main_loop() into qemu_calculate_timeout(). This encapsulates the logic and allow us to use qemu_calculate_timeout() when CONFIG_IOTHREAD is defined or not (suggested by Glauber Costa). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2009-06-10monitor: Introduce get_command_name()Luiz Capitulino
Move code to extract command name into a function of its own, this clearifies the code and let us remove two variables from monitor_handle_command(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2009-06-10monitor: Remove unused variableLuiz Capitulino
The local pointer 'q' is not used by monitor_handle_command(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2009-06-10monitor: Remove uneeded 'return' statementLuiz Capitulino
The 'return' statement at the of monitor_handle_command() is not needed and can be removed. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2009-06-10monitor: Remove uneeded gotoLuiz Capitulino
The 'found' goto in monitor_handle_command() can be dropped if we check for 'cmd->name' after looking up for the command to execute. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2009-06-09Use snprintf to avoid OpenBSD warningBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-09Fix Sparse warningBlue Swirl
Fix this warning: ./qemu-options.h:198:1: error: expected preprocessor identifier Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-09Clean up generated qemu-img-cmds.hBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-09Fix Sparse warningBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-09microblaze-dis.c does not need to be executableBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-09Fix warningBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-09Remove unused and misnamed field and variableBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-09Update irqs on reset and device loadBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-09Register reset functions for e1000 and rtl8139Blue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-09virtio-net: Increase filter and control limitsAlex Williamson
Increase the size of the perfect filter table and control queue depth. This should give us more headroom in the MAC filter and is known to be needed by at least one guest user. Increasing the control queue depth allows a guest to feed several commands back to back if they so desire rather than using the send and wait approach Linux uses. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: Add new RX filter controlsAlex Williamson
Add a few new RX modes to better control the receive_filter. These are all fairly obvious features that hardware could provide. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: MAC filter optimizationAlex Williamson
The MAC filter table is received from the guest as two separate buffers, one with unicast entries, the other with multicast entries. If we track the index dividing the two sets, we can avoid searching the part of the table with the wrong type of entries. We could store this index as part of the save image, but its trivially easy to discover it on load. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: Fix MAC filter overflow handlingAlex Williamson
Overloading the promisc and allmulti flags for indicating filter table overflow makes it difficult to track the actual requested operating mode. Split these out into separate flags. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: reorganize receive_filter()Alex Williamson
Reorganize receive_filter to better handle the split between unicast and multicast filtering. This allows us to skip the broadcast check on unicast packets and leads to more opportunities for optimization. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: Use a byte to store RX mode flagsAlex Williamson
There's no need to save 4 bytes for promisc and allmulti. Use one byte each just to avoid the overhead of a bitmap. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: Add version_id 7 placeholder for vnet header supportAlex Williamson
Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: implement rx packet queueingMark McLoughlin
If we don't have room to receive a packet, we return zero from virtio_net_receive() and call qemu_flush_queued_packets() as soon as space becomes available. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09net: make use of async packet sending API in tap clientMark McLoughlin
If a packet is queued by qemu_send_packet(), remove I/O handler for the tap fd until we get notification that the packet has been sent. A not insignificant side effect of this is we can now drain the tap send queue in one go without fear of packets being dropped. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09net: add qemu_send_packet_async()Mark McLoughlin
Add a qemu_send_packet() variant which will queue up the packet if it cannot be sent when all client queues are full. It later invokes the supplied callback when the packet has been sent. If qemu_send_packet_async() returns zero, the caller is expected to not send any more packets until the queued packet has been sent. Packets are queued iff a receive() handler returns zero (indicating queue full) and the caller has provided a sent notification callback (indicating it will stop and start its own queue). We need the packet sending API to support queueing because: - a sending client should process all available packets in one go (e.g. virtio-net emptying its tx ring) - a receiving client may not be able to handle the packet (e.g. -EAGAIN from write() to tapfd) - the sending client could detect this condition in advance (e.g. by select() for writable on tapfd) - that's too much overhead (e.g. a select() call per packet) - therefore the sending client must handle the condition by dropping the packet or queueing it - dropping packets is poor form; we should queue. However, we don't want queueing to be completely transparent. We want the sending client to stop sending packets as soon as a packet is queued. This allows the sending client to be throttled by the receiver. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09net: split out packet queueing and flushing into separate functionsMark McLoughlin
We'll be doing more packet queueing in later commits. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09net: return status from qemu_deliver_packet()Mark McLoughlin
Will allow qemu_send_packet() handle queue full condition. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09net: add return value to packet receive handlerMark McLoughlin
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-09net: pass VLANClientState* as first arg to receive handlersMark McLoughlin
Give static type checking a chance to catch errors. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09net: re-name vc->fd_read() to vc->receive()Mark McLoughlin
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-09net: add fd_readv() handler to qemu_new_vlan_client() argsMark McLoughlin
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-09net: only read from tapfd when we can sendMark McLoughlin
Reduce the number of packets dropped under heavy network traffic by only reading a packet from the tapfd when a client can actually handle it. Signed-off-by: Mark McLoughlin <markmc@redhat.com>