1. 27 10月, 2015 3 次提交
  2. 21 10月, 2015 1 次提交
  3. 12 10月, 2015 5 次提交
  4. 21 7月, 2015 1 次提交
  5. 24 6月, 2015 5 次提交
  6. 23 6月, 2015 6 次提交
  7. 17 6月, 2015 1 次提交
  8. 09 6月, 2015 2 次提交
  9. 27 5月, 2015 4 次提交
    • S
      net/net: Record usage status of mac address · 2bc22a58
      Shannon Zhao 提交于
      Currently QEMU dynamically generates mac address for the NIC which
      doesn't specify the mac address. But when we hotplug a NIC without
      specifying mac address, the mac address will increase for the same NIC
      along with hotplug and hot-unplug, and at last it will overflow. And if
      we codeplug one NIC with mac address e.g. "52:54:00:12:34:56", then
      hotplug one NIC without specifying mac address and the mac address of
      the hotplugged NIC is duplicate of "52:54:00:12:34:56".
      
      This patch add a mac_table to record the usage status and free the mac
      address when the NIC is unrealized.
      Signed-off-by: NShannon Zhao <zhaoshenglong@huawei.com>
      Signed-off-by: NShannon Zhao <shannon.zhao@linaro.org>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      2bc22a58
    • M
      net: Improve -net nic error reporting · 66308868
      Markus Armbruster 提交于
      When -net nic fails, it first reports a specific error, then a generic
      one, like this:
      
          $ qemu-system-x86_64 -net nic,netdev=nonexistent
          qemu-system-x86_64: -net nic,netdev=nonexistent: netdev 'nonexistent' not found
          qemu-system-x86_64: -net nic,netdev=nonexistent: Device 'nic' could not be initialized
      
      Convert net_init_nic() to Error to get rid of the unwanted second
      error message.
      
      While there, tidy up an Overcapitalized Error Message.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1431691143-1015-4-git-send-email-armbru@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      66308868
    • M
      net: Permit incremental conversion of init functions to Error · a30ecde6
      Markus Armbruster 提交于
      Error reporting for netdev_add is broken: the net_client_init_fun[]
      report the actual errors with (at best) error_report(), and their
      caller net_client_init1() makes up a generic error on top.
      
      For command line and HMP, this produces an mildly ugly error cascade.
      
      In QMP, the actual errors go to stderr, and the generic error becomes
      the command's error reply.
      
      To fix this, we need to convert the net_client_init_fun[] to Error.
      
      To permit fixing them one by one, add an Error ** parameter to the
      net_client_init_fun[].  If the call fails without returning an Error,
      make up the same generic Error as before.  But if it returns one, use
      that instead.  Since none of them does so far, no functional change.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1431691143-1015-3-git-send-email-armbru@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      a30ecde6
    • M
      net: Improve error message for -net hubport a bit · ca7eb184
      Markus Armbruster 提交于
      Type "hubport" is valid only with -netdev.  Unfortunately, that's
      detected late and the error message doesn't explain why:
      
          $ qemu-system-i386 -net hubport,id=foo,hubid=0
          qemu-system-i386: -net hubport,id=foo,hubid=0: Device 'hubport' could not be initialized
      
      Improve the error message to "Parameter 'type' expects a net type".
      
      Not fixed: -net hubport without the parameters required by -netdev
      hubport still asks for those parameters:
      
          $ qemu-system-i386 -net hubport
          qemu-system-i386: -net hubport: Parameter 'hubid' is missing
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1431691143-1015-2-git-send-email-armbru@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ca7eb184
  10. 11 5月, 2015 1 次提交
  11. 13 3月, 2015 1 次提交
  12. 26 2月, 2015 2 次提交
  13. 18 2月, 2015 3 次提交
    • M
      hmp: Name HMP info handler functions hmp_info_SUBCOMMAND() · 1ce6be24
      Markus Armbruster 提交于
      Some are called do_info_SUBCOMMAND() (old ones, usually), some
      hmp_info_SUBCOMMAND(), some SUBCOMMAND_info(), sometimes SUBCOMMAND
      pointlessly differs in spelling.
      
      Normalize to hmp_info_SUBCOMMAND(), where SUBCOMMAND is exactly the
      subcommand name with '-' replaced by '_'.
      
      Exceptions:
      
      * sun4m_irq_info(), sun4m_pic_info() renamed to sun4m_hmp_info_irq(),
        sun4m_hmp_info_pic().
      
      * lm32_irq_info(), lm32_pic_info() renamed to lm32_hmp_info_irq(),
        lm32_hmp_info_pic().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      1ce6be24
    • M
      hmp: Name HMP command handler functions hmp_COMMAND() · 3e5a50d6
      Markus Armbruster 提交于
      Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(),
      and sometimes COMMAND pointlessly differs in spelling.
      
      Normalize to hmp_COMMAND(), where COMMAND is exactly the command name
      with '-' replaced by '_'.
      
      Exceptions:
      
      * do_device_add() and client_migrate_info() *not* renamed to
        hmp_device_add(), hmp_client_migrate_info(), because they're also
        QMP handlers.  They still need to be converted to QAPI.
      
      * do_memory_dump(), do_physical_memory_dump(), do_ioport_read(),
        do_ioport_write() renamed do hmp_* instead of hmp_x(), hmp_xp(),
        hmp_i(), hmp_o(), because those names are too cryptic for my taste.
      
      * do_info_help() renamed to hmp_info_help() instead of hmp_info(),
        because it only covers help.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      3e5a50d6
    • M
      net: Avoid qerror_report_err() outside QMP command handlers · 12d0cc2d
      Markus Armbruster 提交于
      qerror_report_err() is a transitional interface to help with
      converting existing monitor commands to QMP.  It should not be used
      elsewhere.  Replace by error_report_err() in HMP command handler
      hmp_host_net_add() and initial startup helpers net_init_client(),
      net_init_netdev().  Keep it in QMP command handler qmp_netdev_add().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      12d0cc2d
  14. 06 2月, 2015 1 次提交
  15. 05 9月, 2014 1 次提交
  16. 04 9月, 2014 1 次提交
    • Z
      net: Forbid dealing with packets when VM is not running · e1d64c08
      zhanghailiang 提交于
      For all NICs(except virtio-net) emulated by qemu,
      Such as e1000, rtl8139, pcnet and ne2k_pci,
      Qemu can still receive packets when VM is not running.
      
      If this happened in *migration's* last PAUSE VM stage, but
      before the end of the migration, the new receiving packets will possibly dirty
      parts of RAM which has been cached in *iovec*(will be sent asynchronously) and
      dirty parts of new RAM which will be missed.
      This will lead serious network fault in VM.
      
      To avoid this, we forbid receiving packets in generic net code when
      VM is not running.
      
      Bug reproduction steps:
      (1) Start a VM which configured at least one NIC
      (2) In VM, open several Terminal and do *Ping IP -i 0.1*
      (3) Migrate the VM repeatedly between two Hosts
      And the *PING* command in VM will very likely fail with message:
      'Destination HOST Unreachable', the NIC in VM will stay unavailable unless you
      run 'service network restart'
      Signed-off-by: Nzhanghailiang <zhang.zhanghailiang@huawei.com>
      Reviewed-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      e1d64c08
  17. 02 7月, 2014 1 次提交
  18. 27 6月, 2014 1 次提交