1. 07 10月, 2009 8 次提交
  2. 05 10月, 2009 3 次提交
    • M
      Fix pci_add nic not to exit on bad model · 07caea31
      Markus Armbruster 提交于
      Monitor command "pci_add ADDR nic model=MODEL" uses pci_nic_init() to
      create the NIC.  When MODEL is unknown or "?", this prints to stderr
      and terminates the program.
      
      Change pci_nic_init() not to treat "?" specially, and to return NULL
      on failure.  Switch uses during startup to new convenience wrapper
      pci_nic_init_nofail(), which behaves just like pci_nic_init() used to
      do.
      
      Bonus bug fix: we now check for qdev_init() failing there.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      07caea31
    • M
      Make it obvious that pci_nic_init() can't fail · 9ee05825
      Markus Armbruster 提交于
      Before this patch, pci_nic_init() returns NULL when it can't find the
      model in pci_nic_models[].  Except this can't happen, because
      qemu_check_nic_model_list() just searched for model in
      pci_nic_models[], and terminated the program on failure.
      
      Repeating the search here is pointless.  Instead, change
      qemu_check_nic_model_list() to return the model's array index.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      9ee05825
    • G
      Correctly free nd structure · a9796703
      Glauber Costa 提交于
      When we "free" a NICInfo structure, we can leak pointers, since we don't do
      much more than setting used = 0.
      
      We free() the model parameter, but we don't set it to NULL. This means that
      a new user of this structure will see garbage in there. It was not noticed
      before because reusing a NICInfo is not that common, but it can be, for
      users of device pci hotplug.
      
      A user hit it, described at https://bugzilla.redhat.com/show_bug.cgi?id=524022
      
      This patch memset's the whole structure, guaranteeing that anyone reusing it
      will see a fresh NICinfo. Also, we free some other strings that are currently
      leaking.
      
      This codebase is quite old, so this patch should feed all stable trees.
      Signed-off-by: NGlauber Costa <glommer@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a9796703
  3. 01 10月, 2009 1 次提交
  4. 12 9月, 2009 1 次提交
    • B
      Fix sys-queue.h conflict for good · 72cf2d4f
      Blue Swirl 提交于
      Problem: Our file sys-queue.h is a copy of the BSD file, but there are
      some additions and it's not entirely compatible. Because of that, there have
      been conflicts with system headers on BSD systems. Some hacks have been
      introduced in the commits 15cc9235,
      f40d7537,
      96555a96 and
      3990d09a but the fixes were fragile.
      
      Solution: Avoid the conflict entirely by renaming the functions and the
      file. Revert the previous hacks.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      72cf2d4f
  5. 11 9月, 2009 1 次提交
  6. 05 9月, 2009 1 次提交
  7. 04 9月, 2009 3 次提交
  8. 24 8月, 2009 1 次提交
  9. 11 8月, 2009 1 次提交
  10. 28 7月, 2009 3 次提交
  11. 27 7月, 2009 1 次提交
  12. 17 7月, 2009 1 次提交
  13. 16 7月, 2009 1 次提交
  14. 10 7月, 2009 2 次提交
    • M
      Don't abort if TUNSETSNDBUF fails where no sndbuf= arg is supplied · d026fb6d
      Mark McLoughlin 提交于
      If no tap,sndbuf= arg is supplied, we use a default value. If
      TUNSETSNDBUF fails in this case, we should not abort.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      d026fb6d
    • M
      net: set a default value for sndbuf= · fc5b81d1
      Mark McLoughlin 提交于
      On reflection, perhaps it does make sense to set a default value for
      the sndbuf= tap parameter.
      
      For best effect, sndbuf= should be set to just below the capacity of
      the physical NIC.
      
      Setting it higher will cause packets to be dropped before the limit
      is hit. Setting it much lower will not cause any problems unless
      you set it low enough such that the guest cannot queue up new packets
      before the NIC has emptied its queue.
      
      In Linux, txqueuelen=1000 by default for ethernet NICs. Given a 1500
      byte MTU, 1Mb is a good choice for sndbuf.
      
      If it turns out that txqueuelen is actually much lower than this, then
      sndbuf is essentially disabled. In the event that txqueuelen is much
      higher, it's unlikely that the NIC will be able to empty a 1Mb queue.
      
      Thanks to Herbert Xu for this logic.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Cc: Herbert Xu <herbert.xu@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      fc5b81d1
  15. 02 7月, 2009 1 次提交
  16. 29 6月, 2009 11 次提交