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

Support adding vhost-net network devices #27

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

justxuewei
Copy link
Contributor

Argument virnets receives a JSON string of NetworkInterfaceConfig, rather than VirtioNetDeviceConfigInfo. It allows user to add any network devices according to item's backend type.

Argument `virnets` receives a JSON string of `NetworkInterfaceConfig`,
rather than `VirtioNetDeviceConfigInfo`. It allows user to add any network
devices according to item's backend type.

Signed-off-by: Xuewei Niu <[email protected]>
for config in configs.iter() {
self.insert_virnet(config.clone())
.context("Insert a virtio-net device to the Dragonball")?;
.context("Insert a virtio device to the Dragonball")?;
Copy link
Member

Choose a reason for hiding this comment

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

The user cannot know that it's net device that went wrong in this error message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

self.handle_request(Request::Sync(VmmAction::InsertNetworkDevice(config)))
.context("Request to insert a virtio-net device")?;
.context("Request to insert a virtio device")?;
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

- Errors have net device type and name.
- Formating the import blocks of  "vmm_comm_trait.rs".

Signed-off-by: Xuewei Niu <[email protected]>
@studychao studychao merged commit ab29676 into openanolis:main Nov 23, 2023
5 checks passed
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