1. 17 1月, 2013 1 次提交
  2. 19 12月, 2012 5 次提交
  3. 07 9月, 2012 1 次提交
  4. 01 8月, 2012 9 次提交
  5. 23 7月, 2012 1 次提交
  6. 05 6月, 2012 4 次提交
  7. 16 3月, 2012 1 次提交
  8. 02 2月, 2012 1 次提交
    • C
      Add support for net bridge · a7c36ee4
      Corey Bryant 提交于
      The most common use of -net tap is to connect a tap device to a bridge.  This
      requires the use of a script and running qemu as root in order to allocate a
      tap device to pass to the script.
      
      This model is great for portability and flexibility but it's incredibly
      difficult to eliminate the need to run qemu as root.  The only really viable
      mechanism is to use tunctl to create a tap device, attach it to a bridge as
      root, and then hand that tap device to qemu.  The problem with this mechanism
      is that it requires administrator intervention whenever a user wants to create
      a guest.
      
      By essentially writing a helper that implements the most common qemu-ifup
      script that can be safely given cap_net_admin, we can dramatically simplify
      things for non-privileged users.  We still support existing -net tap options
      as a mechanism for advanced users and backwards compatibility.
      
      Currently, this is very Linux centric but there's really no reason why it
      couldn't be extended for other Unixes.
      
      A typical invocation would be similar to one of the following:
      
        qemu linux.img -net bridge -net nic,model=virtio
      
        qemu linux.img -net tap,helper="/usr/local/libexec/qemu-bridge-helper"
                       -net nic,model=virtio
      
        qemu linux.img -netdev bridge,id=hn0
                       -device virtio-net-pci,netdev=hn0,id=nic1
      
        qemu linux.img -netdev tap,helper="/usr/local/libexec/qemu-bridge-helper",id=hn0
                       -device virtio-net-pci,netdev=hn0,id=nic1
      
      The default bridge that we attach to is br0.  The thinking is that a distro
      could preconfigure such an interface to allow out-of-the-box bridged networking.
      
      Alternatively, if a user wants to use a different bridge, a typical invocation
      would be simliar to one of the following:
      
        qemu linux.img -net bridge,br=qemubr0 -net nic,model=virtio
      
        qemu linux.img -net tap,helper="/usr/local/libexec/qemu-bridge-helper --br=qemubr0"
                       -net nic,model=virtio
      
        qemu linux.img -netdev bridge,br=qemubr0,id=hn0
                       -device virtio-net-pci,netdev=hn0,id=nic1
      
        qemu linux.img -netdev tap,helper="/usr/local/libexec/qemu-bridge-helper --br=qemubr0",id=hn0
                       -device virtio-net-pci,netdev=hn0,id=nic1
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NRicha Marwaha <rmarwah@linux.vnet.ibm.com>
      Signed-off-by: NCorey Bryant <coreyb@linux.vnet.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a7c36ee4
  9. 14 1月, 2012 1 次提交
  10. 06 12月, 2011 1 次提交
  11. 04 9月, 2011 1 次提交
  12. 23 7月, 2011 2 次提交
    • J
      net: Consistently use qemu_macaddr_default_if_unset · 6eed1856
      Jan Kiszka 提交于
      Drop the open-coded MAC assignment from net_init_nic and replace it with
      standard qemu_macaddr_default_if_unset which is also used by qdev. That
      avoid creating colliding MACs when instantiating NICs via different
      mechanisms.
      
      This change requires to store the MAC as MACAddr in NICInfo, and the
      remaining nd_table users need to be updated.
      
      Based on suggestion by Peter Maydell.
      
      CC: Markus Armbruster <armbru@redhat.com>
      CC: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6eed1856
    • J
      net: Refactor net_client_types · 6f7b3b1b
      Jan Kiszka 提交于
      Position entries of net_client_types according to the corresponding
      values of NET_CLIENT_TYPE_*. The array size is now defined by
      NET_CLIENT_TYPE_MAX. This will allow to obtain entries based on type
      value in later patches.
      
      At this chance rename NET_CLIENT_TYPE_SLIRP to NET_CLIENT_TYPE_USER for
      the sake of consistency.
      
      CC: Markus Armbruster <armbru@redhat.com>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6f7b3b1b
  13. 22 6月, 2011 1 次提交
  14. 12 12月, 2010 1 次提交
  15. 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
  16. 14 6月, 2010 1 次提交
  17. 19 4月, 2010 2 次提交
  18. 10 4月, 2010 2 次提交
  19. 09 3月, 2010 1 次提交
  20. 20 2月, 2010 3 次提交