<feed xmlns='http://www.w3.org/2005/Atom'>
<title>passt/tcp_vu.h, branch bug165b</title>
<subtitle>Plug A Simple Socket Transport</subtitle>
<link rel='alternate' type='text/html' href='https://passt.top/passt/'/>
<entry>
<title>vhost-user: add vhost-user</title>
<updated>2024-11-27T15:47:32+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2024-11-22T16:43:34+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=28997fcb29b560fc0dcfd91bad5eece3ded5eb72'/>
<id>28997fcb29b560fc0dcfd91bad5eece3ded5eb72</id>
<content type='text'>
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 &lt;lvivier@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
[sbrivio: as suggested by lvivier, include &lt;netinet/if_ether.h&gt;
 before including &lt;linux/if_ether.h&gt; as C libraries such as musl
 __UAPI_DEF_ETHHDR in &lt;netinet/if_ether.h&gt; if they already have
 a definition of struct ethhdr]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;lvivier@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
[sbrivio: as suggested by lvivier, include &lt;netinet/if_ether.h&gt;
 before including &lt;linux/if_ether.h&gt; as C libraries such as musl
 __UAPI_DEF_ETHHDR in &lt;netinet/if_ether.h&gt; if they already have
 a definition of struct ethhdr]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
