<feed xmlns='http://www.w3.org/2005/Atom'>
<title>passt/vhost_user.h, branch bug165c</title>
<subtitle>Plug A Simple Socket Transport</subtitle>
<link rel='alternate' type='text/html' href='https://passt.top/passt/'/>
<entry>
<title>style: Add parentheses to function names in comments</title>
<updated>2025-07-18T17:19:37+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2025-06-20T15:25:15+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=3757ea36d8aa4f40119d66646a3ccaafc670d6b4'/>
<id>3757ea36d8aa4f40119d66646a3ccaafc670d6b4</id>
<content type='text'>
The commit updates the style of function comments by adding parentheses
to function names in the descriptions where they are missing.

Done with:

---------8&lt;------ fix_function_name.awk ---------8&lt;------
/^\/\*\*/ {
    check_next = 1;
    print $0
    next
}
check_next == 1 &amp;&amp; / \* struct/ {
    check_next = 0
    print $0
    next
}
check_next == 1 &amp;&amp; / \* enum/ {
    check_next = 0
    print $0
    next
}
check_next == 1 &amp;&amp; /^ \* [^ (]* -/ {
   modified_line = gensub(/^ \* ([^ ]*) -(.*)$/, " * \\1() -\\2", "g", $0)
   print modified_line
   check_next = 0;
   next
}
{
    print $0
    check_next = 0
}
---------8&lt;------ fix_function_name.awk ---------8&lt;------

Then

for file in *.[ch]; do
    cp ${file} ${file}.tmp &amp;&amp; \
    awk -f fix_function_name.awk ${file}.tmp &gt; ${file}
done

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The commit updates the style of function comments by adding parentheses
to function names in the descriptions where they are missing.

Done with:

---------8&lt;------ fix_function_name.awk ---------8&lt;------
/^\/\*\*/ {
    check_next = 1;
    print $0
    next
}
check_next == 1 &amp;&amp; / \* struct/ {
    check_next = 0
    print $0
    next
}
check_next == 1 &amp;&amp; / \* enum/ {
    check_next = 0
    print $0
    next
}
check_next == 1 &amp;&amp; /^ \* [^ (]* -/ {
   modified_line = gensub(/^ \* ([^ ]*) -(.*)$/, " * \\1() -\\2", "g", $0)
   print modified_line
   check_next = 0;
   next
}
{
    print $0
    check_next = 0
}
---------8&lt;------ fix_function_name.awk ---------8&lt;------

Then

for file in *.[ch]; do
    cp ${file} ${file}.tmp &amp;&amp; \
    awk -f fix_function_name.awk ${file}.tmp &gt; ${file}
done

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vhost_user: Correct and align function comment headers</title>
<updated>2025-05-16T16:27:08+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2025-05-16T12:42:26+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=2fd0944f21d6b9fce53c328acf1faaeb46b98528'/>
<id>2fd0944f21d6b9fce53c328acf1faaeb46b98528</id>
<content type='text'>
This commit cleans up function comment headers in vhost_user.c to ensure
accuracy and consistency with the code. Changes include correcting
parameter names in comments and signatures (e.g., standardizing on vmsg
for vhost messages, fixing dev to vdev), updating function names in
comment descriptions, and removing/rectifying erroneous parameter
documentation.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit cleans up function comment headers in vhost_user.c to ensure
accuracy and consistency with the code. Changes include correcting
parameter names in comments and signatures (e.g., standardizing on vmsg
for vhost messages, fixing dev to vdev), updating function names in
comment descriptions, and removing/rectifying erroneous parameter
documentation.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vhost_user: Don't export several functions</title>
<updated>2025-03-07T01:21:24+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2025-03-05T06:15:07+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=a83c806d1786fbe19bc6a3014f248e928e00651b'/>
<id>a83c806d1786fbe19bc6a3014f248e928e00651b</id>
<content type='text'>
vhost-user added several functions which are exposed in headers, but not
used outside the file where they're defined.  I can't tell if these are
really internal functions, or of they're logically supposed to be exported,
but we don't happen to have anything using them yet.

For the time being, just remove the exports.  We can add them back if we
need to.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vhost-user added several functions which are exposed in headers, but not
used outside the file where they're defined.  I can't tell if these are
really internal functions, or of they're logically supposed to be exported,
but we don't happen to have anything using them yet.

For the time being, just remove the exports.  We can add them back if we
need to.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vhost-user: add VHOST_USER_SET_LOG_BASE command</title>
<updated>2025-01-20T18:51:24+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2024-12-19T11:13:56+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=3c1d91b8162607ec27b05502278a361cd73a54e2'/>
<id>3c1d91b8162607ec27b05502278a361cd73a54e2</id>
<content type='text'>
Sets logging shared memory space.

When the back-end has VHOST_USER_PROTOCOL_F_LOG_SHMFD protocol feature,
the log memory fd is provided in the ancillary data of
VHOST_USER_SET_LOG_BASE message, the size and offset of shared memory
area provided in the message.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
[sbrivio: Fix coding style in a bunch of places]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sets logging shared memory space.

When the back-end has VHOST_USER_PROTOCOL_F_LOG_SHMFD protocol feature,
the log memory fd is provided in the ancillary data of
VHOST_USER_SET_LOG_BASE message, the size and offset of shared memory
area provided in the message.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
[sbrivio: Fix coding style in a bunch of places]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vhost-user: add VHOST_USER_SET_LOG_FD command</title>
<updated>2025-01-20T18:51:24+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2024-12-19T11:13:54+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=b04195c60ff34db89b6bc400ad582d0ff399757b'/>
<id>b04195c60ff34db89b6bc400ad582d0ff399757b</id>
<content type='text'>
VHOST_USER_SET_LOG_FD is an optional message with an eventfd
in ancillary data, it may be used to inform the front-end that the
log has been modified.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
[sbrivio: Fix comment to vu_set_log_fd_exec()]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
VHOST_USER_SET_LOG_FD is an optional message with an eventfd
in ancillary data, it may be used to inform the front-end that the
log has been modified.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
[sbrivio: Fix comment to vu_set_log_fd_exec()]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vhost-user: update protocol features and commands list</title>
<updated>2025-01-20T18:51:24+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2024-12-19T11:13:53+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=6016e04a3aae90cdd49fec391088b83a6d2170a6'/>
<id>6016e04a3aae90cdd49fec391088b83a6d2170a6</id>
<content type='text'>
vhost-user protocol specification has been updated with
feature flags and commands we will need to implement migration.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
[sbrivio: Fix comment to union vhost_user_payload]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vhost-user protocol specification has been updated with
feature flags and commands we will need to implement migration.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
[sbrivio: Fix comment to union vhost_user_payload]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<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>
<entry>
<title>vhost-user: introduce vhost-user API</title>
<updated>2024-11-27T15:12:19+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2024-11-22T16:43:30+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=31117b27c6c905a6bf5fb2567f30fa2f9e0fb3cd'/>
<id>31117b27c6c905a6bf5fb2567f30fa2f9e0fb3cd</id>
<content type='text'>
Add vhost_user.c and vhost_user.h that define the functions needed
to implement vhost-user backend.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add vhost_user.c and vhost_user.h that define the functions needed
to implement vhost-user backend.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
