1. 05 2月, 2018 1 次提交
  2. 06 12月, 2017 1 次提交
  3. 20 11月, 2017 2 次提交
    • T
      hw/net/vmxnet3: Fix code to work on big endian hosts, too · c527e0af
      Thomas Huth 提交于
      Since commit ab06ec43 we test the vmxnet3 device in the
      pxe-tester, too (when running "make check SPEED=slow"). This now
      revealed that the code is not working there if the host is a big
      endian machine (for example ppc64 or s390x) - "make check SPEED=slow"
      is now failing on such hosts.
      
      The vmxnet3 code lacks endianness conversions in a couple of places.
      Interestingly, the bitfields in the structs in vmxnet3.h already tried to
      take care of the *bit* endianness of the C compilers - but the code missed
      to change the *byte* endianness when reading or writing the corresponding
      structs. So the bitfields are now wrapped into unions which allow to change
      the byte endianness during runtime with the non-bitfield member of the union.
      With these changes, "make check SPEED=slow" now properly works on big endian
      hosts, too.
      Reported-by: NDavid Gibson <dgibson@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NDavid Gibson <dgibson@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      c527e0af
    • E
      net: Transmit zero UDP checksum as 0xFFFF · 0dacea92
      Ed Swierk 提交于
      The checksum algorithm used by IPv4, TCP and UDP allows a zero value
      to be represented by either 0x0000 and 0xFFFF. But per RFC 768, a zero
      UDP checksum must be transmitted as 0xFFFF because 0x0000 is a special
      value meaning no checksum.
      
      Substitute 0xFFFF whenever a checksum is computed as zero when
      modifying a UDP datagram header. Doing this on IPv4 and TCP checksums
      is unnecessary but legal. Add a wrapper for net_checksum_finish() that
      makes the substitution.
      
      (We can't just change net_checksum_finish(), as that function is also
      used by receivers to verify checksums, and in that case the expected
      value is always 0x0000.)
      Signed-off-by: NEd Swierk <eswierk@skyportsystems.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      0dacea92
  4. 15 10月, 2017 1 次提交
    • E
      pci: Add interface names to hybrid PCI devices · a5fa336f
      Eduardo Habkost 提交于
      The following devices support both PCI Express and Conventional
      PCI, by including special code to handle the QEMU_PCI_CAP_EXPRESS
      flag and/or conditional pcie_endpoint_cap_init() calls:
      
      * vfio-pci (is_express=1, but legacy PCI handled by
        vfio_populate_device())
      * vmxnet3 (is_express=0, but PCIe handled by vmxnet3_realize())
      * pvscsi (is_express=0, but PCIe handled by pvscsi_realize())
      * virtio-pci (is_express=0, but PCIe handled by
        virtio_pci_dc_realize(), and additional legacy PCI code at
        virtio_pci_realize())
      * base-xhci (is_express=1, but pcie_endpoint_cap_init() call
        is conditional on pci_bus_is_express(dev->bus)
        * Note that xhci does not clear QEMU_PCI_CAP_EXPRESS like the
          other hybrid devices
      
      Cc: Dmitry Fleytman <dmitry@daynix.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Alex Williamson <alex.williamson@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      a5fa336f
  5. 27 9月, 2017 1 次提交
  6. 13 6月, 2017 1 次提交
  7. 06 6月, 2017 1 次提交
  8. 06 3月, 2017 2 次提交
  9. 14 2月, 2017 1 次提交
  10. 01 2月, 2017 1 次提交
    • C
      pci: Convert msix_init() to Error and fix callers · ee640c62
      Cao jin 提交于
      msix_init() reports errors with error_report(), which is wrong when
      it's used in realize().  The same issue was fixed for msi_init() in
      commit 1108b2f8. In order to make the API change as small as possible,
      leave the return value check to later patch.
      
      For some devices(like e1000e, vmxnet3, nvme) who won't fail because of
      msix_init's failure, suppress the error report by passing NULL error
      object.
      
      Bonus: add comment for msix_init.
      
      CC: Jiri Pirko <jiri@resnulli.us>
      CC: Gerd Hoffmann <kraxel@redhat.com>
      CC: Dmitry Fleytman <dmitry@daynix.com>
      CC: Jason Wang <jasowang@redhat.com>
      CC: Michael S. Tsirkin <mst@redhat.com>
      CC: Hannes Reinecke <hare@suse.de>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: Alex Williamson <alex.williamson@redhat.com>
      CC: Markus Armbruster <armbru@redhat.com>
      CC: Marcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NCao jin <caoj.fnst@cn.fujitsu.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      ee640c62
  11. 25 1月, 2017 2 次提交
  12. 26 10月, 2016 1 次提交
  13. 09 8月, 2016 1 次提交
  14. 20 7月, 2016 1 次提交
    • E
      qapi: Change Netdev into a flat union · f394b2e2
      Eric Blake 提交于
      This is a mostly-mechanical conversion that creates a new flat
      union 'Netdev' QAPI type that covers all the branches of the
      former 'NetClientOptions' simple union, where the branches are
      now listed in a new 'NetClientDriver' enum rather than generated
      from the simple union.  The existence of a flat union has no
      change to the command line syntax accepted for new code, and
      will make it possible for a future patch to switch the QMP
      command to parse a boxed union for no change to valid QMP; but
      it does have some ripple effect on the C code when dealing with
      the new types.
      
      While making the conversion, note that the 'NetLegacy' type
      remains unchanged: it applies only to legacy command line options,
      and will not be ported to QMP, so it should remain a wrapper
      around a simple union; to avoid confusion, the type named
      'NetClientOptions' is now gone, and we introduce 'NetLegacyOptions'
      in its place.  Then, in the C code, we convert from NetLegacy to
      Netdev as soon as possible, so that the bulk of the net stack
      only has to deal with one QAPI type, not two.  Note that since
      the old legacy code always rejected 'hubport', we can just omit
      that branch from the new 'NetLegacyOptions' simple union.
      
      Based on an idea originally by Zoltán Kővágó <DirtY.iCE.hu@gmail.com>:
      Message-Id: <01a527fbf1a5de880091f98cf011616a78adeeee.1441627176.git.DirtY.iCE.hu@gmail.com>
      although the sed script in that patch no longer applies due to
      other changes in the tree since then, and I also did some manual
      cleanups (such as fixing whitespace to keep checkpatch happy).
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1468468228-27827-13-git-send-email-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      [Fixup from Eric squashed in]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      f394b2e2
  15. 05 7月, 2016 2 次提交
  16. 28 6月, 2016 1 次提交
  17. 24 6月, 2016 1 次提交
  18. 17 6月, 2016 1 次提交
  19. 02 6月, 2016 4 次提交
  20. 18 5月, 2016 1 次提交
  21. 29 1月, 2016 1 次提交
  22. 22 1月, 2016 1 次提交
  23. 11 1月, 2016 11 次提交