summaryrefslogtreecommitdiff
path: root/tools/virtio/linux/virtio_config.h
diff options
context:
space:
mode:
authorYunsheng Lin <linyunsheng@huawei.com>2024-02-28 12:30:12 +0300
committerPaolo Abeni <pabeni@redhat.com>2024-03-05 13:38:14 +0300
commitc5d3705cfd938f6ddd8fa2ff74689cc9b52c00ca (patch)
tree0a9c5c5872b910d0152fd869daacd57b4aaf2e87 /tools/virtio/linux/virtio_config.h
parent4051bd8129ac6c1faf447264aa7a8f91feb778b8 (diff)
downloadlinux-c5d3705cfd938f6ddd8fa2ff74689cc9b52c00ca.tar.xz
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>
Diffstat (limited to 'tools/virtio/linux/virtio_config.h')
-rw-r--r--tools/virtio/linux/virtio_config.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/virtio/linux/virtio_config.h b/tools/virtio/linux/virtio_config.h
index 2a8a70e2a950..42a564f22f2d 100644
--- a/tools/virtio/linux/virtio_config.h
+++ b/tools/virtio/linux/virtio_config.h
@@ -1,4 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_VIRTIO_CONFIG_H
+#define LINUX_VIRTIO_CONFIG_H
#include <linux/virtio_byteorder.h>
#include <linux/virtio.h>
#include <uapi/linux/virtio_config.h>
@@ -95,3 +97,5 @@ static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val)
{
return __cpu_to_virtio64(virtio_is_little_endian(vdev), val);
}
+
+#endif