Skip to content

Conversation

@sumansaurabh
Copy link

Summary

Implements SEQPACKET socket type support for virtio vsock to enable datagram relay use cases while preserving packet boundaries.

Changes

  • Added VIRTIO_VSOCK_F_SEQPACKET feature flag support
  • Implemented SOCK_SEQPACKET socket type handling in vsock implementation
  • Added socket type validation to ensure host UDS matches vsock socket type
  • Updated connection logic to handle SEQPACKET connections appropriately

Why

This addresses the limitation where VMs relaying datagrams over vsock need to preserve packet boundaries, which SOCK_STREAM combines together. The SEQPACKET type maintains message boundaries while providing reliable, ordered delivery.

Testing

  • Verified SOCK_SEQPACKET socket creation and connection establishment
  • Confirmed socket type mismatch rejection between guest and host
  • Validated packet boundary preservation in data transmission

Fixes #4822


This PR was created from task: https://remote-code-1.onrender.com/tasks/hATFTs3x7VF1zV1Wokznz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add SEQPACKET socket type for vsock

2 participants