Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: qemu/qemu
base: 97c81ef4b8e2
Choose a base ref
...
head repository: qemu/qemu
compare: 4f7c7b40f512
Choose a head ref
  • 16 commits
  • 14 files changed
  • 4 contributors

Commits on Jul 7, 2023

  1. virtio-net: correctly report maximum tx_queue_size value

    Maximum value for tx_queue_size depends on the backend type.
    1024 for vDPA/vhost-user, 256 for all the others.
    
    The value is returned by virtio_net_max_tx_queue_size() to set the
    parameter:
    
        n->net_conf.tx_queue_size = MIN(virtio_net_max_tx_queue_size(n),
                                        n->net_conf.tx_queue_size);
    
    But the parameter checking uses VIRTQUEUE_MAX_SIZE (1024).
    
    So the parameter is silently ignored and ethtool reports a different
    value than the one provided by the user.
    
       ... -netdev tap,... -device virtio-net,tx_queue_size=1024
    
        # ethtool -g enp0s2
        Ring parameters for enp0s2:
        Pre-set maximums:
        RX:		256
        RX Mini:	n/a
        RX Jumbo:	n/a
        TX:		256
        Current hardware settings:
        RX:		256
        RX Mini:	n/a
        RX Jumbo:	n/a
        TX:		256
    
       ... -netdev vhost-user,... -device virtio-net,tx_queue_size=2048
    
        Invalid tx_queue_size (= 2048), must be a power of 2 between 256 and 1024
    
    With this patch the correct maximum value is checked and displayed.
    
    For vDPA/vhost-user:
    
        Invalid tx_queue_size (= 2048), must be a power of 2 between 256 and 1024
    
    For all the others:
    
        Invalid tx_queue_size (= 512), must be a power of 2 between 256 and 256
    
    Fixes: 2eef278 ("virtio-net: fix tx queue size for !vhost-user")
    Cc: mst@redhat.com
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Laurent Vivier <lvivier@redhat.com>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    vivier authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    4271f40 View commit details
    Browse the repository at this point in the history
  2. hw/net: e1000: Remove the logic of padding short frames in the receiv…

    …e path
    
    Now that we have implemented unified short frames padding in the
    QEMU networking codes, remove the same logic in the NIC codes.
    
    This actually reverts commit 78aeb23.
    
    Signed-off-by: Bin Meng <bmeng@tinylab.org>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    lbmeng authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    140eae9 View commit details
    Browse the repository at this point in the history
  3. hw/net: vmxnet3: Remove the logic of padding short frames in the rece…

    …ive path
    
    Now that we have implemented unified short frames padding in the
    QEMU networking codes, remove the same logic in the NIC codes.
    
    This actually reverts commit 40a87c6.
    
    Signed-off-by: Bin Meng <bmeng@tinylab.org>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    lbmeng authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    c445f20 View commit details
    Browse the repository at this point in the history
  4. hw/net: i82596: Remove the logic of padding short frames in the recei…

    …ve path
    
    Now that we have implemented unified short frames padding in the
    QEMU networking codes, remove the same logic in the NIC codes.
    
    Signed-off-by: Bin Meng <bmeng@tinylab.org>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    lbmeng authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    c58da33 View commit details
    Browse the repository at this point in the history
  5. hw/net: ne2000: Remove the logic of padding short frames in the recei…

    …ve path
    
    Now that we have implemented unified short frames padding in the
    QEMU networking codes, remove the same logic in the NIC codes.
    
    Signed-off-by: Bin Meng <bmeng@tinylab.org>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    lbmeng authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    05db447 View commit details
    Browse the repository at this point in the history
  6. hw/net: pcnet: Remove the logic of padding short frames in the receiv…

    …e path
    
    Now that we have implemented unified short frames padding in the
    QEMU networking codes, remove the same logic in the NIC codes.
    
    Signed-off-by: Bin Meng <bmeng@tinylab.org>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    lbmeng authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    6d0d261 View commit details
    Browse the repository at this point in the history
  7. hw/net: rtl8139: Remove the logic of padding short frames in the rece…

    …ive path
    
    Now that we have implemented unified short frames padding in the
    QEMU networking codes, remove the same logic in the NIC codes.
    
    Signed-off-by: Bin Meng <bmeng@tinylab.org>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    lbmeng authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    63b901b View commit details
    Browse the repository at this point in the history
  8. hw/net: sungem: Remove the logic of padding short frames in the recei…

    …ve path
    
    Now that we have implemented unified short frames padding in the
    QEMU networking codes, remove the same logic in the NIC codes.
    
    Signed-off-by: Bin Meng <bmeng@tinylab.org>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    lbmeng authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    aee87b4 View commit details
    Browse the repository at this point in the history
  9. hw/net: sunhme: Remove the logic of padding short frames in the recei…

    …ve path
    
    Now that we have implemented unified short frames padding in the
    QEMU networking codes, remove the same logic in the NIC codes.
    
    Signed-off-by: Bin Meng <bmeng@tinylab.org>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    lbmeng authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    0fe0efc View commit details
    Browse the repository at this point in the history
  10. hw/net: ftgmac100: Drop the small packet check in the receive path

    Now that we have implemented unified short frames padding in the
    QEMU networking codes, the small packet check logic in the receive
    path is no longer needed.
    
    Suggested-by: Cédric Le Goater <clg@kaod.org>
    Reviewed-by: Cédric Le Goater <clg@kaod.org>
    Signed-off-by: Bin Meng <bmeng@tinylab.org>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    lbmeng authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    71e11da View commit details
    Browse the repository at this point in the history
  11. net: socket: prepare to cleanup net_init_socket()

    Use directly net_socket_fd_init_stream() and net_socket_fd_init_dgram()
    when the socket type is already known.
    
    Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: Laurent Vivier <lvivier@redhat.com>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    vivier authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    006c3fa View commit details
    Browse the repository at this point in the history
  12. net: socket: move fd type checking to its own function

    Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: Laurent Vivier <lvivier@redhat.com>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    vivier authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    23455ae View commit details
    Browse the repository at this point in the history
  13. net: socket: remove net_init_socket()

    Move the file descriptor type checking before doing anything with it.
    If it's not usable, don't close it as it could be in use by another
    part of QEMU, only fail and report an error.
    
    Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: Laurent Vivier <lvivier@redhat.com>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    vivier authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    b6aeee0 View commit details
    Browse the repository at this point in the history
  14. e1000e: Add ICR clearing by corresponding IMS bit

    The datasheet does not say what happens when interrupt was asserted
    (ICR.INT_ASSERT=1) and auto mask is *not* active.
    However, section of 13.3.27 the PCIe* GbE Controllers Open Source
    Software Developer’s Manual, which were written for older devices,
    namely 631xESB/632xESB, 82563EB/82564EB, 82571EB/82572EI &
    82573E/82573V/82573L, does say:
    > If IMS = 0b, then the ICR register is always clear-on-read. If IMS is
    > not 0b, but some ICR bit is set where the corresponding IMS bit is not
    > set, then a read does not clear the ICR register. For example, if
    > IMS = 10101010b and ICR = 01010101b, then a read to the ICR register
    > does not clear it. If IMS = 10101010b and ICR = 0101011b, then a read
    > to the ICR register clears it entirely (ICR.INT_ASSERTED = 1b).
    
    Linux does no longer activate auto mask since commit
    0a8047ac68e50e4ccbadcfc6b6b070805b976885 and the real hardware clears
    ICR even in such a case so we also should do so.
    
    Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1707441
    Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
    Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    akihikodaki authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    e414270 View commit details
    Browse the repository at this point in the history
  15. igb: Remove obsolete workaround for Windows

    I confirmed it works with Windows even without this workaround. It is
    likely to be a mistake so remove it.
    
    Fixes: 3a977de ("Intrdocue igb device emulation")
    Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    akihikodaki authored and jasowang committed Jul 7, 2023
    Copy the full SHA
    da9f7f7 View commit details
    Browse the repository at this point in the history
  16. Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into…

    … staging
    
    # -----BEGIN PGP SIGNATURE-----
    # Version: GnuPG v1
    #
    # iQEcBAABAgAGBQJkp86uAAoJEO8Ells5jWIRX00H/1T20eOfMZ+8ZyO32P1DBl5U
    # ZQNl5/rcg5cqjatragwagAHGYzmoegJlY3/JbWju09SPtsgbMT/nQI6EFDfpTHb6
    # 9HB2h+43eHq+OBpmPPsmqVRzjuNi9lUmJ20We4aqJe/VM4/DHMtKW3EXGmORb7cF
    # wjazN5FVn+YQHgA+pckQ79k6h/lJhtLv+MuainS12o8yyCO8OyqP6Bm4lYPbBNpb
    # Im3HXiv05gFuS2P4lD8ZvjcdWalHDzDZW4RzKHlpcic0GBN/rcU3FDqGeOIP8qWL
    # oxokpjd2QmW1rX/TwaweiObEjo/3n7ymRu5PofE3T7e+gnAVfAyqDxrgAU6fMjA=
    # =CGHw
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Fri 07 Jul 2023 09:37:02 AM BST
    # gpg:                using RSA key EF04965B398D6211
    # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [undefined]
    # gpg: WARNING: This key is not certified with a trusted signature!
    # gpg:          There is no indication that the signature belongs to the owner.
    # Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211
    
    * tag 'net-pull-request' of https://github.com/jasowang/qemu:
      igb: Remove obsolete workaround for Windows
      e1000e: Add ICR clearing by corresponding IMS bit
      net: socket: remove net_init_socket()
      net: socket: move fd type checking to its own function
      net: socket: prepare to cleanup net_init_socket()
      hw/net: ftgmac100: Drop the small packet check in the receive path
      hw/net: sunhme: Remove the logic of padding short frames in the receive path
      hw/net: sungem: Remove the logic of padding short frames in the receive path
      hw/net: rtl8139: Remove the logic of padding short frames in the receive path
      hw/net: pcnet: Remove the logic of padding short frames in the receive path
      hw/net: ne2000: Remove the logic of padding short frames in the receive path
      hw/net: i82596: Remove the logic of padding short frames in the receive path
      hw/net: vmxnet3: Remove the logic of padding short frames in the receive path
      hw/net: e1000: Remove the logic of padding short frames in the receive path
      virtio-net: correctly report maximum tx_queue_size value
    
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    rth7680 committed Jul 7, 2023
    Copy the full SHA
    4f7c7b4 View commit details
    Browse the repository at this point in the history