qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 4271f4: virtio-net: correctly report maximum


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 4271f4: virtio-net: correctly report maximum tx_queue_size...
Date: Fri, 07 Jul 2023 12:20:35 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4271f4038372f174dbafffacca1a748d058a03ba
      
https://github.com/qemu/qemu/commit/4271f4038372f174dbafffacca1a748d058a03ba
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M hw/net/virtio-net.c

  Log Message:
  -----------
  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: 2eef278b9e63 ("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>


  Commit: 140eae9c8f760e9260356fe9b56b802a02f0a9d2
      
https://github.com/qemu/qemu/commit/140eae9c8f760e9260356fe9b56b802a02f0a9d2
  Author: Bin Meng <bmeng@tinylab.org>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M hw/net/e1000.c

  Log Message:
  -----------
  hw/net: e1000: Remove the logic of padding short frames in the receive 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 78aeb23eded2d0b765bf9145c71f80025b568acd.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: c445f200ad241b443aa7a61a5381b26f56a18f0e
      
https://github.com/qemu/qemu/commit/c445f200ad241b443aa7a61a5381b26f56a18f0e
  Author: Bin Meng <bmeng@tinylab.org>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M hw/net/vmxnet3.c

  Log Message:
  -----------
  hw/net: vmxnet3: Remove the logic of padding short frames in the receive 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 40a87c6c9b11ef9c14e0301f76abf0eb2582f08e.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: c58da33f2f8410b6f22cd1d33377dadf3a4d8867
      
https://github.com/qemu/qemu/commit/c58da33f2f8410b6f22cd1d33377dadf3a4d8867
  Author: Bin Meng <bmeng@tinylab.org>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M hw/net/i82596.c

  Log Message:
  -----------
  hw/net: i82596: Remove the logic of padding short frames in the receive 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>


  Commit: 05db4476c5d25e437d807175de9f862bf5bf732c
      
https://github.com/qemu/qemu/commit/05db4476c5d25e437d807175de9f862bf5bf732c
  Author: Bin Meng <bmeng@tinylab.org>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M hw/net/ne2000.c

  Log Message:
  -----------
  hw/net: ne2000: Remove the logic of padding short frames in the receive 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>


  Commit: 6d0d261dbfa6122e9b3bdcab7d934ca49f069c21
      
https://github.com/qemu/qemu/commit/6d0d261dbfa6122e9b3bdcab7d934ca49f069c21
  Author: Bin Meng <bmeng@tinylab.org>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M hw/net/pcnet.c

  Log Message:
  -----------
  hw/net: pcnet: Remove the logic of padding short frames in the receive 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>


  Commit: 63b901bfd30a0975bc326ba8527880fabac2e66d
      
https://github.com/qemu/qemu/commit/63b901bfd30a0975bc326ba8527880fabac2e66d
  Author: Bin Meng <bmeng@tinylab.org>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M hw/net/rtl8139.c

  Log Message:
  -----------
  hw/net: rtl8139: Remove the logic of padding short frames in the receive 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>


  Commit: aee87b43fe2206acb8f5e334b42790df33a1cbad
      
https://github.com/qemu/qemu/commit/aee87b43fe2206acb8f5e334b42790df33a1cbad
  Author: Bin Meng <bmeng@tinylab.org>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M hw/net/sungem.c

  Log Message:
  -----------
  hw/net: sungem: Remove the logic of padding short frames in the receive 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>


  Commit: 0fe0efc9cd594eb0ce36cc7722f0ce1d038df8d7
      
https://github.com/qemu/qemu/commit/0fe0efc9cd594eb0ce36cc7722f0ce1d038df8d7
  Author: Bin Meng <bmeng@tinylab.org>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M hw/net/sunhme.c

  Log Message:
  -----------
  hw/net: sunhme: Remove the logic of padding short frames in the receive 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>


  Commit: 71e11da1facdf08c91b3763bd9a72c2121f2bbb6
      
https://github.com/qemu/qemu/commit/71e11da1facdf08c91b3763bd9a72c2121f2bbb6
  Author: Bin Meng <bmeng@tinylab.org>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M hw/net/ftgmac100.c

  Log Message:
  -----------
  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>


  Commit: 006c3fa74c3edb978ff46d2851699e9a95609da5
      
https://github.com/qemu/qemu/commit/006c3fa74c3edb978ff46d2851699e9a95609da5
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M net/socket.c

  Log Message:
  -----------
  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>


  Commit: 23455ae341656ca867ee4a171826b9d280d6acb5
      
https://github.com/qemu/qemu/commit/23455ae341656ca867ee4a171826b9d280d6acb5
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M net/socket.c

  Log Message:
  -----------
  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>


  Commit: b6aeee02980e193f744f74c48fd900940feb2799
      
https://github.com/qemu/qemu/commit/b6aeee02980e193f744f74c48fd900940feb2799
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M net/socket.c

  Log Message:
  -----------
  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>


  Commit: e414270000e9f7fe2a56d314ab85259aeaf1bd91
      
https://github.com/qemu/qemu/commit/e414270000e9f7fe2a56d314ab85259aeaf1bd91
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M hw/net/e1000e_core.c
    M hw/net/trace-events

  Log Message:
  -----------
  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>


  Commit: da9f7f7769e8e65f6423095e978f9a375e33515c
      
https://github.com/qemu/qemu/commit/da9f7f7769e8e65f6423095e978f9a375e33515c
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M hw/net/igb_core.c

  Log Message:
  -----------
  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: 3a977deebe ("Intrdocue igb device emulation")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 4f7c7b40f5126502b8c6c2aaa3d57970eb27ca19
      
https://github.com/qemu/qemu/commit/4f7c7b40f5126502b8c6c2aaa3d57970eb27ca19
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M hw/net/e1000.c
    M hw/net/e1000e_core.c
    M hw/net/ftgmac100.c
    M hw/net/i82596.c
    M hw/net/igb_core.c
    M hw/net/ne2000.c
    M hw/net/pcnet.c
    M hw/net/rtl8139.c
    M hw/net/sungem.c
    M hw/net/sunhme.c
    M hw/net/trace-events
    M hw/net/virtio-net.c
    M hw/net/vmxnet3.c
    M net/socket.c

  Log Message:
  -----------
  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>


Compare: https://github.com/qemu/qemu/compare/97c81ef4b8e2...4f7c7b40f512



reply via email to

[Prev in Thread] Current Thread [Next in Thread]