- 30 10月, 2012 5 次提交
-
-
由 Michael S. Tsirkin 提交于
We know offset is 0, assert that. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
Now that we know host hdr length, we don't need to duplicate the logic in receive_hdr: caller can figure out the offset itself. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
Avoid magling iov manually: use safe iov operations for processing packets incoming to guest. This also removes the requirement for virtio header to fit the first s/g entry exactly. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
Avoid tweaking iovec during receive. This removes the need to copy the vector. Note: we currently have an evil cast in work_around_broken_dhclient and unfortunately this patch does not fix it - just pushes the evil cast to another place. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
Tracking these in device state instead of re-calculating on each packet. No functional changes. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 18 10月, 2012 1 次提交
-
-
由 Juan Quintela 提交于
qemu_fseek() is known to be wrong. Would be removed on the next commit. This code should never been used (value has been MAC_TABLE_ENTRIES since 2009). Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 08 10月, 2012 1 次提交
-
-
由 Amos Kong 提交于
nc.link_down could not be migrated, this patch updates link_down in virtio_post_load() to keep it coincident with real link status. Signed-off-by: NAmos Kong <akong@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@gmail.com>
-
- 28 9月, 2012 1 次提交
-
-
由 Michael S. Tsirkin 提交于
There is no out sg for TX, so used buf length for tx should always be 0. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 14 9月, 2012 1 次提交
-
-
由 Paolo Bonzini 提交于
virtio-net has code to flush the queue and notify the iothread whenever new receive buffers are added by the guest. That is fine, and indeed we need to do the same in all other drivers. However, notifying the iothread should be work for the network subsystem. And since we are at it we can add a little smartness: if some of the queued packets already could not be delivered, there is no need to notify the iothread. Reported-by: NLuigi Rizzo <rizzo@iet.unipi.it> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Cc: Jan Kiszka <jan.kiszka@siemens.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NAmos Kong <akong@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 01 8月, 2012 2 次提交
-
-
由 Stefan Hajnoczi 提交于
Another step in moving the vlan feature out of net core. Users only deal with NetClientState and therefore qemu_del_vlan_client() should be named qemu_del_net_client(). Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
-
由 Stefan Hajnoczi 提交于
The vlan feature is no longer part of net core. Rename VLANClientState to NetClientState because net clients are not explicitly associated with a vlan at all, instead they have a peer net client to which they are connected. This patch is a mechanical search-and-replace except for a few whitespace fixups where changing VLANClientState to NetClientState misaligned whitespace. Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
-
- 23 7月, 2012 1 次提交
-
-
由 Laszlo Ersek 提交于
NET_CLIENT_TYPE_ -> NET_CLIENT_OPTIONS_KIND_ Signed-off-by: NLaszlo Ersek <lersek@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 08 6月, 2012 1 次提交
-
-
由 Michael Tokarev 提交于
Reorder arguments to be more natural, readable and consistent with other iov_* functions, and change argument names, from: iov_from_buf(iov, iov_cnt, buf, iov_off, size) to iov_from_buf(iov, iov_cnt, offset, buf, bytes) The result becomes natural English: copy data to this `iov' vector with `iov_cnt' elements starting at byte offset `offset' from memory buffer `buf', processing `bytes' bytes max. (Try to read the original prototype this way). Also change iov_clear() to more general iov_memset() (it uses memset() internally anyway). While at it, add comments to the header file describing what the routines actually does. The patch only renames argumens in the header, but keeps old names in the implementation. The next patch will touch actual code to match. Now, it might look wrong to pay so much attention to so small things. But we've so many badly designed interfaces already so the whole thing becomes rather confusing or error prone. One example of this is previous commit and small discussion which emerged from it, with an outcome that the utility functions like these aren't well-understdandable, leading to strange usage cases. That's why I paid quite some attention to this set of functions and a few others in subsequent patches. Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 22 5月, 2012 1 次提交
-
-
由 Orit Wassermann 提交于
Otherwise we crash on error. Signed-off-by: NUlrich Obergfell <uobergfe@redhat.com> Signed-off-by: NOrit Wassermann <owasserm@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 28 1月, 2012 2 次提交
-
-
由 Anthony Liguori 提交于
We already have a QOM interface for this so let's use it. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
Right now, DeviceInfo acts as the class for qdev. In order to switch to a proper ObjectClass derivative, we need to ween all of the callers off of interacting directly with the info pointer. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 21 8月, 2011 1 次提交
-
-
由 Anthony Liguori 提交于
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 28 7月, 2011 1 次提交
-
-
由 Amit Shah 提交于
virtio_cleanup() will be changed by the following patch to remove the VirtIONet struct that gets allocated via virtio_common_init(). Ensure we don't dereference the structure after calling the cleanup function. Signed-off-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 18 7月, 2011 1 次提交
-
-
由 Hannes Reinecke 提交于
iov_to_buf() has an 'offset' parameter, iov_from_buf() hasn't. This patch adds the missing parameter to iov_from_buf(). It also renames the 'offset' parameter to 'iov_off' to emphasize it's the offset into the iovec and not the buffer. Signed-off-by: NHannes Reinecke <hare@suse.de> Acked-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 21 3月, 2011 1 次提交
-
-
由 Paolo Bonzini 提交于
This was done with: sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \ $(git grep -l 'qemu_get_clock\>' ) sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \ $(git grep -l 'qemu_new_timer\>' ) after checking that get_clock and new_timer never occur twice on the same line. There were no missed occurrences; however, even if there had been, they would have been caught by the compiler. There was exactly one false positive in qemu_run_timers: - current_time = qemu_get_clock (clock); + current_time = qemu_get_clock_ns (clock); which is of course not in this patch. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 04 3月, 2011 1 次提交
-
-
由 Stefan Hajnoczi 提交于
A pointer to a size_t variable was passed as the void * pointer to lduw_p() in virtio_net_receive(). Instead of acting on the 16-bit value this caused failure on big-endian hosts. Avoid this issue in the future by using stw_p() instead. In general we should use ld*_p() for loading from target memory and st*_p() for storing to target memory anyway, not the other way around. Also tighten up a correct use of lduw_p() when stw_p() should be used instead in virtio_net_get_config(). Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
- 21 2月, 2011 1 次提交
-
-
由 Michael S. Tsirkin 提交于
qemu makes it possible to disable link at tap which is not communicated to the guest but causes all packets to be dropped. When vhost-net is enabled, vhost needs to be aware of both the virtio link_down and the peer link_down. we switch to userspace emulation when either is down. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reported-by: Npradeep <psuriset@linux.vnet.ibm.com> Acked-by: NAlex Williamson <alex.williamson@redhat.com> Acked-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
- 02 2月, 2011 1 次提交
-
-
由 mst@redhat.com 提交于
When MSI is off, each interrupt needs to be bounced through the io thread when it's set/cleared, so vhost-net causes more context switches and higher CPU utilization than userspace virtio which handles networking in the same thread. We'll need to fix this by adding level irq support in kvm irqfd, for now disable vhost-net in these configurations. Added a vhostforce flag to force vhost-net back on. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 29 1月, 2011 1 次提交
-
-
由 Aurelien Jarno 提交于
virtio-net used to work on cross-endianness configurations, but doesn't anymore with recent guest kernels, as the new features don't handle endianness correctly. This patch fixes wrong conversion, and add missing ones to make virtio-net working. Tested on the following configurations: - i386 guest on x86_64 host - ppc guest on x86_64 host - i386 guest on mips host - ppc guest on mips host Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
- 10 1月, 2011 1 次提交
-
-
由 Michael S. Tsirkin 提交于
Move tracking vmstate change from virtio-net to virtio.c as it is going to be used by virito-blk and virtio-pci for the ioeventfd support. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 12 12月, 2010 1 次提交
-
-
由 Gleb Natapov 提交于
If bootindex is specified on command line a string that describes device in firmware readable way is added into sorted list. Later this list will be passed into firmware to control boot order. Signed-off-by: NGleb Natapov <gleb@redhat.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 09 12月, 2010 2 次提交
-
-
由 Michael S. Tsirkin 提交于
Avoid sending out packets, and modifying memory, when VM is stopped. Add assert statements to verify this does not happen. Avoid scheduling bh when vhost-net is started. Stop bh when driver disabled bus mastering (we must not access memory after this). Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Tested-by: NJason Wang <jasowang@redhat.com>
-
由 Michael S. Tsirkin 提交于
DMA into memory while VM is stopped makes it hard to debug migration (consequitive saves result in different files). Fixing this completely is a large effort, this patch does this for virtio-net. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Tested-by: NJason Wang <jasowang@redhat.com>
-
- 21 11月, 2010 1 次提交
-
-
由 Stefan Hajnoczi 提交于
Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 07 10月, 2010 1 次提交
-
-
由 Michael S. Tsirkin 提交于
Move all of vhost-net start/stop logic to a single routine, and call it from everywhere. Additionally, start/stop vhost-net on link up/down: we should not transmit anything if user asked us to put the link down. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NAlex Williamson <alex.williamson@redhat.com>
-
- 08 9月, 2010 4 次提交
-
-
由 Alex Williamson 提交于
Based on a patch from Mark McLoughlin, this patch introduces a new bottom half packet transmitter that avoids the latency imposed by the tx_timer approach. Rather than scheduling a timer when a TX packet comes in, schedule a bottom half to be run from the iothread. The bottom half handler first attempts to flush the queue with notification disabled (this is where we could race with a guest without txburst). If we flush a full burst, reschedule immediately. If we send short of a full burst, try to re-enable notification. To avoid a race with TXs that may have occurred, we must then flush again. If we find some packets to send, the guest it probably active, so we can reschedule again. tx_timer and tx_bh are mutually exclusive, so we can re-use the tx_waiting flag to indicate one or the other needs to be setup. This allows us to seamlessly migrate between timer and bh TX handling. The bottom half handler becomes the new default and we add a new tx= option to virtio-net-pci. Usage: -device virtio-net-pci,tx=timer # select timer mitigation vs "bh" Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Alex Williamson 提交于
De-couple this from the timer since we might want to use different backends to send the packet. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Alex Williamson 提交于
If virtio_net_flush_tx() is called with notification disabled, we can race with the guest, processing packets at the same rate as they get produced. The trouble is that this means we have no guaranteed exit condition from the function and can spend minutes in there. Currently flush_tx is only called with notification on, which seems to limit us to one pass through the queue per call. An upcoming patch changes this. Also add an option to set this value on the command line as different workloads may wish to use different values. We can't necessarily support any random value, so this is a developer option: x-txburst= Usage: -device virtio-net-pci,x-txburst=64 # 64 packets per tx flush One pass through the queue (256) seems to be a good default value for this, balancing latency with throughput. We use a signed int for x-txburst because 2^31 packets in a burst would take many, many minutes to process and it allows us to easily return a negative value value from virtio_net_flush_tx() to indicate a back-off or error condition. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Alex Williamson 提交于
Add an option to make the TX mitigation timer adjustable as a device option. The 150us hard coded default used currently is reasonable, but may not be suitable for all workloads, this gives us a way to adjust it using a single binary. We can't support any random option though, so use the "x-" prefix to indicate this is a developer option. Usage: -device virtio-net-pci,x-txtimer=500000,... # .5ms timeout Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 12 7月, 2010 1 次提交
-
-
由 Michael S. Tsirkin 提交于
We were requesting too much when checking buffer length: size already includes host header length. Further, we should not exit if we get a packet that is too long, since this might not be under control of the guest. Just drop the packet. Red Hat bz 591494 Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 06 7月, 2010 2 次提交
-
-
由 Alex Williamson 提交于
Stuff a pointer to the DeviceState into the VirtIONet structure so that we can easily remove the vmstate entry later. Also, let vmstate track the instance number (it should always be zero internally since the device path should now be unique). Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Alex Williamson 提交于
When available, we'd like to be able to access the DeviceState when registering a savevm. For buses with a get_dev_path() function, this will allow us to create more unique savevm id strings. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 07 6月, 2010 1 次提交
-
-
由 Michael S. Tsirkin 提交于
virtio net attempts to peek into virtio queue to determine that we have enough space for the complete packet to fit. However, it fails to account for space consumed by virtio net header when it does this, under stress this results in a failure with the message 'truncating packet'. redhat bz 591494. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 02 6月, 2010 1 次提交
-
-
由 Michael S. Tsirkin 提交于
vhost net currently keeps running after vmstop, which causes trouble as qemy does not check for dirty pages anymore. The fix is to simply keep vm and vhost running/stopped status in sync. Tested-by: NDavid L Stevens <dlstevens@us.ibm.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 12 5月, 2010 1 次提交
-
-
由 Michael S. Tsirkin 提交于
virtio-net has return with value in a void function. No idea why does it compile with gcc, but this isn't standard C. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-