tools: virtio: introduce vhost_net_test
authorYunsheng Lin <linyunsheng@huawei.com>
Wed, 28 Feb 2024 09:30:12 +0000 (17:30 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 5 Mar 2024 10:38:14 +0000 (11:38 +0100)
commitc5d3705cfd938f6ddd8fa2ff74689cc9b52c00ca
tree0a9c5c5872b910d0152fd869daacd57b4aaf2e87
parent4051bd8129ac6c1faf447264aa7a8f91feb778b8
tools: virtio: introduce vhost_net_test

introduce vhost_net_test for both vhost_net tx and rx basing
on virtio_test to test vhost_net changing in the kernel.

Steps for vhost_net tx testing:
1. Prepare a out buf.
2. Kick the vhost_net to do tx processing.
3. Do the receiving in the tun side.
4. verify the data received by tun is correct.

Steps for vhost_net rx testing:
1. Prepare a in buf.
2. Do the sending in the tun side.
3. Kick the vhost_net to do rx processing.
4. verify the data received by vhost_net is correct.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/virtio/.gitignore
tools/virtio/Makefile
tools/virtio/linux/virtio_config.h
tools/virtio/vhost_net_test.c [new file with mode: 0644]