Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vsock: how can host vsock server accepting every guest cid? #551

Open
ikicha opened this issue Nov 22, 2023 · 2 comments
Open

vsock: how can host vsock server accepting every guest cid? #551

ikicha opened this issue Nov 22, 2023 · 2 comments

Comments

@ikicha
Copy link
Contributor

ikicha commented Nov 22, 2023

I'd like to set up vsock server in the host accepting every connection which is acting likesvm_cid=VMADDR_CID_HOST. But for now, it needs to bind to uds-path from specific cid. Is there any way to do that for now? or we need to set up multiple sockets for each?

@stefano-garzarella
Copy link
Member

yeah, this is a limitation of firecracker's hybrid vsock approach that we are currently using here.
So, with the current implementation we don't have any easy way, but I have something in mind that I want to implement that will allow your use case.

Essentially I want to extend AF_VSOCK, to support SOCK_RAW and allow vhost-device-vsock to enqueue packets in the host vsock stack. This way we can finally remove the Unix socket and applications in the host can use AF_VSOCK as with vhost-vsock. At this point your use case is trivial, just listen on AF_VSOCK(CID_HOST, port) and you'll get connections from any guests.

I'll add an issue in https://gitlab.com/vsock/vsock/-/issues to track this idea, then any help to implement it will be very well accepted :-)

@stefano-garzarella
Copy link
Member

I'll add an issue in https://gitlab.com/vsock/vsock/-/issues to track this idea, then any help to implement it will be very well accepted :-)

Dumped the idea here: https://gitlab.com/vsock/vsock/-/issues/12

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

No branches or pull requests

2 participants