1. 22 6月, 2011 3 次提交
  2. 16 4月, 2011 1 次提交
  3. 02 4月, 2011 2 次提交
  4. 07 3月, 2011 3 次提交
  5. 05 3月, 2011 1 次提交
    • V
      net: fix qemu_can_send_packet logic · 60c07d93
      Vincent Palatin 提交于
      If any of the clients is not ready to receive (ie it has a can_receive
      callback and can_receive() returns false), we don't want to start
      sending, else this client may miss/discard the packet.
      
      I got this behaviour with the following setup :
      the emulated machine is using an USB-ethernet adapter, it is connected
      to the network using SLIRP and I'm dumping the traffic in a .pcap file.
      As per the following command line :
      -net nic,model=usb,vlan=1 -net user,vlan=1 -net dump,vlan=1,file=/tmp/pkt.pcap
      Every time that two packets are coming in a row from the host, the
      usb-net code will receive the first one, then returns 0 to can_receive
      call since it has a 1 packet long queue. But as the dump code is always
      ready to receive, qemu_can_send_packet will return true and the next
      packet will discard the previous one in the usb-net code.
      Signed-off-by: NVincent Palatin <vpalatin@chromium.org>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      60c07d93
  6. 21 2月, 2011 1 次提交
  7. 09 12月, 2010 1 次提交
    • M
      net/sock: option to specify local address · 3a75e74c
      Mike Ryan 提交于
      Add an option to specify the host IP to send multicast packets from,
      when using a multicast socket for networking. The option takes an IP
      address and sets the IP_MULTICAST_IF socket option, which causes the
      packets to use that IP's interface as an egress.
      
      This is useful if the host machine has several interfaces with several
      virtual networks across disparate interfaces.
      Signed-off-by: NMike Ryan <mikeryan@ISI.EDU>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      3a75e74c
  8. 28 10月, 2010 1 次提交
  9. 07 10月, 2010 1 次提交
    • M
      net: delay freeing peer host device · a083a89d
      Michael S. Tsirkin 提交于
      With -netdev, virtio devices present offload
      features to guest, depending on the backend used.
      Thus, removing host netdev peer while guest is
      active leads to guest-visible inconsistency and/or crashes.
      
      As a solution, while guest (NIC) peer device exists,
      we prevent the host peer from being deleted.
      This patch does this by adding peer_deleted flag in nic state:
      if host device is going away while guest device
      is around, set this flag and keep a shell of
      the host device around for as long as guest device exists.
      
      The link is put down so all packets will get discarded.
      
      At the moment, management can detect that device deletion
      is delayed by doing info net. As a next step, we shall add
      commands that control hotplug/unplug without
      removing the device, and an event to report that
      guest has responded to the hotplug event.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NAlex Williamson <alex.williamson@redhat.com>
      a083a89d
  10. 23 8月, 2010 1 次提交
  11. 02 7月, 2010 1 次提交
  12. 01 7月, 2010 1 次提交
    • A
      net: Fix VM start with '-net none' · 03c71553
      Amit Shah 提交于
      Commit 50e32ea8 changed the behaviour
      for the return type of net_client_init() when a nic type with no init
      method was specified. 'none' is one such nic type. Instead of returning
      0, which gets interpreted as an index into the nd_table[] array, we
      switched to returning -1, which signifies an error as well.
      
      That broke VM start with '-net none'. Testing was only done with the
      monitor command 'pci_add', which doesn't fail.
      
      The correct fix would still be to return 0+ values from
      net_client_init() only when the return value can be used as an index to
      refer to an entry in nd_table[]. With the current code, callers can
      erroneously poke into nd_table[0] when -net nic is used, which can lead
      to badness.
      
      However, this commit just returns to the previous behaviour before the
      offending commit.
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      03c71553
  13. 15 6月, 2010 1 次提交
    • M
      Make netdev_del delete the netdev even when it's in use · 2ffcb18d
      Markus Armbruster 提交于
      To hot-unplug guest and host part of a network device, you do:
      
          device_del NIC-ID
          netdev_del NETDEV-ID
      
      For PCI devices, device_del merely tells ACPI to unplug the device.
      The device goes away for real only after the guest processed the ACPI
      unplug event.
      
      You have to wait until then (e.g. by polling info pci) before you can
      unplug the netdev.  Not good.
      
      Fix by removing the "in use" check from do_netdev_del().  Deleting a
      netdev while it's in use is safe; packets simply get routed to the bit
      bucket.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      2ffcb18d
  14. 09 6月, 2010 1 次提交
    • A
      net: Fix hotplug with pci_add · 50e32ea8
      Amit Shah 提交于
      The correct model type wasn't getting added when hotplugging nics with
      pci_add.
      
      Testcase: start VM with default nic type. In the qemu_monitor:
      
      (qemu) pci_add auto nic model=virtio
      
      This results in a nic hot-plug of the same nic type as the default.
      
      This was broken in 5294e2c7
      
      Also changes the behaviour where no .init is defined for a
      net_client_type. Previously, 0 was returned, which indicated the init
      was successful and that 0 was the index into the nd_tables[] array.
      Return -1, indicating unsuccessful init, in such a case.
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      50e32ea8
  15. 02 6月, 2010 1 次提交
  16. 19 4月, 2010 5 次提交
  17. 10 4月, 2010 2 次提交
  18. 02 4月, 2010 1 次提交
  19. 17 3月, 2010 1 次提交
    • M
      qemu-option: Move the implied first name into QemuOptsList · 8212c64f
      Markus Armbruster 提交于
      We sometimes permit omitting the first option name, for example
      -device foo is short for -device driver=foo.  The name to use
      ("driver" in the example) is passed as argument to qemu_opts_parse().
      For each QemuOptsList, we use at most one such name.
      
      Move the name into QemuOptsList, and pass whether to permit the
      abbreviation.  This ensures continued consistency, and simplifies the
      commit after next in this series.
      8212c64f
  20. 16 3月, 2010 1 次提交
    • M
      error: Replace qemu_error() by error_report() · 1ecda02b
      Markus Armbruster 提交于
      error_report() terminates the message with a newline.  Strip it it
      from its arguments.
      
      This fixes a few error messages lacking a newline:
      net_handle_fd_param()'s "No file descriptor named %s found", and
      tap_open()'s "vnet_hdr=1 requested, but no kernel support for
      IFF_VNET_HDR available" (all three versions).
      
      There's one place that passes arguments without newlines
      intentionally: load_vmstate().  Fix it up.
      1ecda02b
  21. 09 3月, 2010 2 次提交
  22. 22 2月, 2010 1 次提交
  23. 20 2月, 2010 7 次提交