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

Make vsock buffer sizes configurable #139

Merged
merged 3 commits into from
Jun 6, 2024
Merged

Make vsock buffer sizes configurable #139

merged 3 commits into from
Jun 6, 2024

Conversation

qwandor
Copy link
Collaborator

@qwandor qwandor commented Jun 5, 2024

No description provided.

Copy link
Contributor

@thedataking thedataking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with a buffer size of 4096 for both PER_CONNETION_BUFFER_CAPACITY and RX_BUFFER_SIZE. Not sure if per connection buffer sizes need validation, otherwise this looks great to me!

Self {
driver,
connections: Vec::new(),
listening_ports: Vec::new(),
per_connection_buffer_capacity,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any requirements on per_connection_buffer_capacity similar to RX_BUFFER_SIZE?

If so, would it make sense to validate the buffer size here or would an invalid buffer fail a check elsewhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell the only requirement is that it fit in a u32, so I've changed the type to that.

The vsock protocol passes it as a u32, so we shouldn't allow anything
bigger.
@qwandor qwandor merged commit 7c18b36 into master Jun 6, 2024
6 checks passed
@qwandor qwandor deleted the buffer_size branch June 6, 2024 09:38
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.

2 participants