1. 11 6月, 2015 1 次提交
  2. 11 5月, 2015 1 次提交
  3. 26 2月, 2015 1 次提交
  4. 18 2月, 2015 2 次提交
    • 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
  5. 15 10月, 2014 1 次提交
  6. 27 6月, 2014 1 次提交
  7. 19 6月, 2014 4 次提交
  8. 11 6月, 2014 1 次提交
  9. 25 2月, 2014 4 次提交
  10. 15 2月, 2014 1 次提交
    • M
      net: declare struct iovec in checksum.h to fix compiler warning · 26247179
      Michael Tokarev 提交于
      The checksum calculation header exports a function that refers to
      struct iov defined in iov.h.  Without including the former, build
      fails like this:
      
        In file included from hw/net/fsl_etsec/rings.c:24:0:
        include/net/checksum.h:51:31: error: ‘struct iovec’ declared inside parameter list [-Werror]
        include/net/checksum.h:51:31: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
      
      Mention struct iovec there.
      Reported-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      26247179
  11. 09 11月, 2013 1 次提交
  12. 06 9月, 2013 1 次提交
  13. 16 7月, 2013 1 次提交
    • A
      net: add support of mac-programming over macvtap in QEMU side · b1be4280
      Amos Kong 提交于
      Currently macvtap based macvlan device is working in promiscuous
      mode, we want to implement mac-programming over macvtap through
      Libvirt for better performance.
      
      Design:
       QEMU notifies Libvirt when rx-filter config is changed in guest,
       then Libvirt query the rx-filter information by a monitor command,
       and sync the change to macvtap device. Related rx-filter config
       of the nic contains main mac, rx-mode items and vlan table.
      
      This patch adds a QMP event to notify management of rx-filter change,
      and adds a monitor command for management to query rx-filter
      information.
      
      Test:
       If we repeatedly add/remove vlan, and change macaddr of vlan
       interfaces in guest by a loop script.
      
      Result:
       The events will flood the QMP client(management), management takes
       too much resource to process the events.
      
       Event_throttle API (set rate to 1 ms) can avoid the events to flood
       QMP client, but it could cause an unexpected delay (~1ms), guests
       guests normally expect rx-filter updates immediately.
      
       So we use a flag for each nic to avoid events flooding, the event
       is emitted once until the query command is executed. The flag
       implementation could not introduce unexpected delay.
      
      There maybe exist an uncontrollable delay if we let Libvirt do the
      real change, guests normally expect rx-filter updates immediately.
      But it's another separate issue, we can investigate it when the
      work in Libvirt side is done.
      
      Michael S. Tsirkin: tweaked to enable events on start
      Michael S. Tsirkin: fixed not to crash when no id
      Michael S. Tsirkin: fold in patch:
         "additional fixes for mac-programming feature"
      Amos Kong: always notify QMP client if mactable is changed
      Amos Kong: return NULL list if no net client supports rx-filter query
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAmos Kong <akong@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      b1be4280
  14. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  15. 25 3月, 2013 4 次提交
  16. 27 2月, 2013 1 次提交
    • J
      net: reduce the unnecessary memory allocation of multiqueue · f6b26cf2
      Jason Wang 提交于
      Edivaldo reports a problem that the array of NetClientState in NICState is too
      large - MAX_QUEUE_NUM(1024) which will wastes memory even if multiqueue is not
      used.
      
      Instead of static arrays, solving this issue by allocating the queues on demand
      for both the NetClientState array in NICState and VirtIONetQueue array in
      VirtIONet.
      
      Tested by myself, with single virtio-net-pci device. The memory allocation is
      almost the same as when multiqueue is not merged.
      
      Cc: Edivaldo de Araujo Pereira <edivaldoapereira@yahoo.com.br>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      f6b26cf2
  17. 02 2月, 2013 10 次提交
    • J
      tap: multiqueue support · 264986e2
      Jason Wang 提交于
      Recently, linux support multiqueue tap which could let userspace call TUNSETIFF
      for a signle device many times to create multiple file descriptors as
      independent queues. User could also enable/disabe a specific queue through
      TUNSETQUEUE.
      
      The patch adds the generic infrastructure to create multiqueue taps. To achieve
      this a new parameter "queues" were introduced to specify how many queues were
      expected to be created for tap by qemu itself. Alternatively, management could
      also pass multiple pre-created tap file descriptors separated with ':' through a
      new parameter fds like -netdev tap,id=hn0,fds="X:Y:..:Z". Multiple vhost file
      descriptors could also be passed in this way.
      
      Each TAPState were still associated to a tap fd, which mean multiple TAPStates
      were created when user needs multiqueue taps. Since each TAPState contains one
      NetClientState, with the multiqueue nic support, an N peers of NetClientState
      were built up.
      
      A new parameter, mq_required were introduce in tap_open() to create multiqueue
      tap fds.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      264986e2
    • J
      tap: introduce a helper to get the name of an interface · e5dc0b40
      Jason Wang 提交于
      This patch introduces a helper tap_get_ifname() to get the device name of tap
      device. This is needed when ifname is unspecified in the command line and qemu
      were asked to create tap device by itself. In this situation, the name were
      allocated by kernel, so if multiqueue is asked, we need to fetch its name after
      creating the first queue.
      
      Only linux has this support since it's the only platform that supports
      multiqueue tap.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      e5dc0b40
    • J
      tap: support enabling or disabling a queue · 16dbaf90
      Jason Wang 提交于
      This patch introduce a new bit - enabled in TAPState which tracks whether a
      specific queue/fd is enabled. The tap/fd is enabled during initialization and
      could be enabled/disabled by tap_enalbe() and tap_disable() which calls platform
      specific helpers to do the real work. Polling of a tap fd can only done when
      the tap was enabled.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      16dbaf90
    • J
      net: multiqueue support · 1ceef9f2
      Jason Wang 提交于
      This patch adds basic multiqueue support for qemu. The idea is simple, an array
      of NetClientStates were introduced in NICState, parse_netdev() were extended to
      find and match all NetClientStates belongs to the backend and place their
      pointers in NICConf. Then qemu_new_nic can setup a N:N mapping between NICStates
      that belongs to a nic and NICStates belongs to the netdev. And a queue_index
      were introduced in NetClientState to track its index. After this, each peers of
      a NICState were abstracted as a queue.
      
      After this change, all NetClientState that belongs to the same backend/nic has
      the same id. When use want to change the link status, all NetClientStates that
      belongs to the same backend/nic will be also changed. When user want to delete
      a device or netdev, all NetClientStates that belongs to the same backend/nic
      will be deleted also. Changing or deleting an specific queue is not allowed.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      1ceef9f2
    • J
      net: introduce NetClientState destructor · f7860455
      Jason Wang 提交于
      To allow allocating an array of NetClientState and free it once, this patch
      introduces destructor of NetClientState. Which could do type specific free,
      which could be used by multiqueue to free the array once.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      f7860455
    • J
      net: introduce qemu_find_net_clients_except() · 6c51ae73
      Jason Wang 提交于
      In multiqueue, all NetClientState that belongs to the same netdev or nic has the
      same id. So this patches introduces an helper qemu_find_net_clients_except()
      which finds all NetClientState with the same id. This will be used by multiqueue
      networking.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6c51ae73
    • J
      net: intorduce qemu_del_nic() · 948ecf21
      Jason Wang 提交于
      To support multiqueue nic, this patch separate the nic destructor from
      qemu_del_net_client() to a new helper qemu_del_nic() since the mapping bettween
      NiCState and NetClientState were not 1:1 in multiqueue. The following patches
      would refactor this function to support multiqueue nic.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      948ecf21
    • J
      net: introduce qemu_get_nic() · cc1f0f45
      Jason Wang 提交于
      To support multiqueue, this patch introduces a helper qemu_get_nic() to get
      NICState from a NetClientState. The following patches would refactor this helper
      to support multiqueue.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      cc1f0f45
    • J
      net: introduce qemu_get_queue() · b356f76d
      Jason Wang 提交于
      To support multiqueue, the patch introduce a helper qemu_get_queue()
      which is used to get the NetClientState of a device. The following patches would
      refactor this helper to support multiqueue.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      b356f76d
    • J
      net: tap: using bool instead of bitfield · ec45f083
      Jason Wang 提交于
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ec45f083
  18. 17 1月, 2013 1 次提交
  19. 19 12月, 2012 3 次提交