qemu-cr16/include/net
Laurent Vivier 33b78a30a3 net: Allow network backends to advertise max TX queue size
This commit refactors how the maximum transmit queue size for
virtio-net devices is determined, making the mechanism more generic
and extensible.

Previously, virtio_net_max_tx_queue_size() contained hardcoded
checks for specific network backend types (vhost-user and
vhost-vdpa) to determine their supported maximum queue size. This
created direct dependencies and would require modifications for
every new backend that supports variable queue sizes.

To improve flexibility, a new max_tx_queue_size field is added
to the vhost_net structure. This allows each network backend
to advertise its supported maximum transmit queue size directly.

The virtio_net_max_tx_queue_size() function now retrieves the max
TX queue size from the vhost_net struct, if available and set.
Otherwise, it defaults to VIRTIO_NET_TX_QUEUE_DEFAULT_SIZE.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2025-07-14 13:27:09 +08:00
..
announce.h net: remove AnnounceTimer from typedefs.h 2024-05-03 15:47:48 +02:00
can_emu.h net/can: Add can_dlc2len and can_len2dlc for CAN FD. 2020-09-30 19:11:37 +02:00
can_host.h qom: fix objects with improper parent type 2020-10-12 11:50:22 -04:00
checksum.h net: checksum: Convert data to void * 2024-11-25 13:59:50 +08:00
eth.h net: mark struct ip_header as QEMU_PACKED 2024-11-18 13:45:45 +01:00
filter.h qapi: Move @String out of common.json to discourage reuse 2024-02-12 10:04:32 +01:00
net.h net: Add get_vhost_net callback to NetClientInfo 2025-07-14 13:27:09 +08:00
queue.h net: Remove deadcode 2024-10-03 17:26:05 +03:00
slirp.h net: Remove the deprecated -tftp, -bootp, -redir and -smb options 2018-08-31 09:53:03 +02:00
tap.h net: Add get_vhost_net callback to NetClientInfo 2025-07-14 13:27:09 +08:00
vhost-vdpa.h net: Consolidate vhost feature bits into vhost_net structure 2025-07-14 13:27:09 +08:00
vhost_net.h net: Allow network backends to advertise max TX queue size 2025-07-14 13:27:09 +08:00