From 28997fcb29b560fc0dcfd91bad5eece3ded5eb72 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Fri, 22 Nov 2024 17:43:34 +0100 Subject: vhost-user: add vhost-user add virtio and vhost-user functions to connect with QEMU. $ ./passt --vhost-user and # qemu-system-x86_64 ... -m 4G \ -object memory-backend-memfd,id=memfd0,share=on,size=4G \ -numa node,memdev=memfd0 \ -chardev socket,id=chr0,path=/tmp/passt_1.socket \ -netdev vhost-user,id=netdev0,chardev=chr0 \ -device virtio-net,mac=9a:2b:2c:2d:2e:2f,netdev=netdev0 \ ... Signed-off-by: Laurent Vivier Reviewed-by: David Gibson [sbrivio: as suggested by lvivier, include before including as C libraries such as musl __UAPI_DEF_ETHHDR in if they already have a definition of struct ethhdr] Signed-off-by: Stefano Brivio --- udp_vu.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 udp_vu.h (limited to 'udp_vu.h') diff --git a/udp_vu.h b/udp_vu.h new file mode 100644 index 0000000..ba7018d --- /dev/null +++ b/udp_vu.h @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* Copyright Red Hat + * Author: Laurent Vivier + */ + +#ifndef UDP_VU_H +#define UDP_VU_H + +void udp_vu_listen_sock_handler(const struct ctx *c, union epoll_ref ref, + uint32_t events, const struct timespec *now); +void udp_vu_reply_sock_handler(const struct ctx *c, union epoll_ref ref, + uint32_t events, const struct timespec *now); +#endif /* UDP_VU_H */ -- cgit v1.2.3