This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 5ea7804a01f51e345d71ff72d03889734fb61efb
Author: Yongrong Wang <[email protected]>
AuthorDate: Tue Mar 25 19:29:39 2025 +0800

    include/nuttx/virtio: add host_cid to the vsock config
    
    net/vsock reads the peer CID from the device config when
    VIRTIO_VSOCK_F_HOST_CID is offered. Add the feature bit and the
    host_cid field to struct virtio_vsock_config_s.
    
    Signed-off-by: Yongrong Wang <[email protected]>
---
 include/nuttx/virtio/virtio-vsock.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/nuttx/virtio/virtio-vsock.h 
b/include/nuttx/virtio/virtio-vsock.h
index d73ba0bb945..1503b0857ca 100644
--- a/include/nuttx/virtio/virtio-vsock.h
+++ b/include/nuttx/virtio/virtio-vsock.h
@@ -36,6 +36,7 @@
 #define VIRTIO_VSOCK_F_STREAM            0 /* SOCK_STREAM supported */
 #define VIRTIO_VSOCK_F_SEQPACKET         1 /* SOCK_SEQPACKET supported */
 #define VIRTIO_VSOCK_F_NO_IMPLIED_STREAM 2 /* SOCK_STREAM is not implied */
+#define VIRTIO_VSOCK_F_HOST_CID          3 /* Remote CID is supported */
 
 /****************************************************************************
  * Public Type Definitions
@@ -44,6 +45,7 @@
 begin_packed_struct struct virtio_vsock_config_s
 {
   uint64_t guest_cid;
+  uint64_t host_cid;
 } end_packed_struct;
 
 #endif /* __INCLUDE_NUTTX_VIRTIO_VIRTIO_VSOCK_H */

Reply via email to