Thread (51 messages) 51 messages, 4 authors, 2025-07-29

Re: [RFC PATCH net-next v6 13/14] virtio/vsock: implement datagram support

From: Amery Hung <hidden>
Date: 2024-07-11 23:07:27
Also in: bpf, kvm, linux-hyperv, lkml, virtualization

On Thu, Jul 11, 2024 at 4:03 PM Luigi Leonardi
[off-list ref] wrote:
Hi Bobby, Amery

Thank you for working on this!
quoted
This commit implements datagram support with a new version of
->dgram_allow().
Commit messages should be imperative "This commit implements X" -> "Implements X".
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
This suggestion applies to many of the commits in this series.
Thanks for pointing this out. I will change the commit message in the
next version.
quoted
+static bool virtio_transport_dgram_allow(u32 cid, u32 port)
+{
+     struct virtio_vsock *vsock;
+     bool dgram_allow;
+
+     dgram_allow = false;
I think you can initialize the variable in the declaration.
Got it.

Thanks,
Amery
quoted
+     rcu_read_lock();
+     vsock = rcu_dereference(the_virtio_vsock);
+     if (vsock)
+             dgram_allow = vsock->dgram_allow;
+     rcu_read_unlock();
+
+     return dgram_allow;
+}
+
The rest LGTM.

Thanks,
Luigi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help