diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2024-08-02 15:53:54 +1000 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2024-08-02 15:53:54 +1000 |
| commit | c4d242501a61093a8b80ee8f6dd071c5110a100c (patch) | |
| tree | 69235300cb0f61dac0642ed212efb6b6fccf8839 /include | |
| parent | 31669121a01a14732f57c49400bc239cf9fd505f (diff) | |
| parent | 64f75f57f9d2c8c12ac6d9355fa5d3a2af5879ca (diff) | |
| download | focaccia-qemu-c4d242501a61093a8b80ee8f6dd071c5110a100c.tar.gz focaccia-qemu-c4d242501a61093a8b80ee8f6dd071c5110a100c.zip | |
Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging
# -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEIV1G9IJGaJ7HfzVi7wSWWzmNYhEFAmasTgwACgkQ7wSWWzmN # YhFUtAgAq45v7fQJ7cKKwRam/VrIkxT5cM59ODwzLSL9kPWfL6f/bJ7xM/zvLyvn # LNBXFWWu+eNKA73f95cckZwaqZ4U6giGbiesCACn1IpgVtieLS+Lq78jsifKIAsR # yxFvbT9oLhU0dZ1Up3+isc6V+jeAE4ZYu4KOiIt7PscTEzkJl+vSUjN4X9rRVtUD # PzONUacL6MoTJtX8UZJZXNzLN9JTsN39Gx+LSDGQ27MDmDvE3R9BW+T0ZgF9JQZ7 # wnrL5sharqF3gxa7X55fPBI1qwY5gWcH0yyJpRdM8guA13vhtvlrhNSypip9eKWi # HtPHUTKEB5YOvF236WRiuQPIm/GNpA== # =7HGN # -----END PGP SIGNATURE----- # gpg: Signature made Fri 02 Aug 2024 01:10:04 PM AEST # gpg: using RSA key 215D46F48246689EC77F3562EF04965B398D6211 # 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: net: Reinstate '-net nic, model=help' output as documented in man page net: update netdev stream man page with the reconnect parameter net: update netdev dgram man page with unix socket net: update netdev stream man page with unix socket net: update netdev stream/dgram man page virtio-net: Fix network stall at the host side waiting for kick virtio-net: Ensure queue index fits with RSS rtl8139: Fix behaviour for old kernels. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/hw/virtio/virtio.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index d2a1938757..0fcbc5c0c6 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -273,9 +273,13 @@ void qemu_put_virtqueue_element(VirtIODevice *vdev, QEMUFile *f, VirtQueueElement *elem); int virtqueue_avail_bytes(VirtQueue *vq, unsigned int in_bytes, unsigned int out_bytes); -void virtqueue_get_avail_bytes(VirtQueue *vq, unsigned int *in_bytes, - unsigned int *out_bytes, - unsigned max_in_bytes, unsigned max_out_bytes); +/** + * Return <0 on error or an opaque >=0 to pass to + * virtio_queue_enable_notification_and_check on success. + */ +int virtqueue_get_avail_bytes(VirtQueue *vq, unsigned int *in_bytes, + unsigned int *out_bytes, unsigned max_in_bytes, + unsigned max_out_bytes); void virtio_notify_irqfd(VirtIODevice *vdev, VirtQueue *vq); void virtio_notify(VirtIODevice *vdev, VirtQueue *vq); @@ -309,6 +313,15 @@ int virtio_queue_ready(VirtQueue *vq); int virtio_queue_empty(VirtQueue *vq); +/** + * Enable notification and check whether guest has added some + * buffers since last call to virtqueue_get_avail_bytes. + * + * @opaque: value returned from virtqueue_get_avail_bytes + */ +bool virtio_queue_enable_notification_and_check(VirtQueue *vq, + int opaque); + void virtio_queue_set_shadow_avail_idx(VirtQueue *vq, uint16_t idx); /* Host binding interface. */ |