diff options
author | Xuan Zhuo | 2022-10-17 11:25:55 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2022-11-07 19:12:20 +0100 |
commit | 7dc6be52f4ead25e7da8fb758900bdcb527996f7 (patch) | |
tree | 9b41d868f48df44b2db2184a404230ccf85a5134 /hw/net/vhost_net.c | |
parent | virtio-net: introduce flush_or_purge_queued_packets() (diff) | |
download | qemu-7dc6be52f4ead25e7da8fb758900bdcb527996f7.tar.gz qemu-7dc6be52f4ead25e7da8fb758900bdcb527996f7.tar.xz qemu-7dc6be52f4ead25e7da8fb758900bdcb527996f7.zip |
virtio-net: support queue reset
virtio-net and vhost-kernel implement queue reset.
Queued packets in the corresponding queue pair are flushed
or purged.
For virtio-net, userspace datapath will be disabled later in
__virtio_queue_reset(). It will set addr of vring to 0 and idx to 0.
Thus, virtio_net_receive() and virtio_net_flush_tx() will not receive
or send packets.
For vhost-net, the datapath will be disabled in vhost_net_virtqueue_reset().
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: Kangjie Xu <kangjie.xu@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20221017092558.111082-13-xuanzhuo@linux.alibaba.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/net/vhost_net.c')
0 files changed, 0 insertions, 0 deletions