From 37f457a76c8f412a0a2ceb79c77b91eea24ef341 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 8 Nov 2022 21:16:46 +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 --- tcp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tcp.c') diff --git a/tcp.c b/tcp.c index 1e37714..b21da94 100644 --- a/tcp.c +++ b/tcp.c @@ -1049,7 +1049,8 @@ size_t tcp_fill_headers4(const struct ctx *c, tcp_fill_header(th, conn, seq); - tcp_update_check_tcp4(iph, th); + if (c->mode != MODE_VU || *c->pcap) + tcp_update_check_tcp4(iph, th); return ip_len; } @@ -1090,7 +1091,8 @@ size_t tcp_fill_headers6(const struct ctx *c, tcp_fill_header(th, conn, seq); - tcp_update_check_tcp6(ip6h, th); + if (c->mode != MODE_VU || *c->pcap) + tcp_update_check_tcp6(ip6h, th); return ip_len; } -- cgit v1.2.3