mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: add configuration for network offloading features
Add new configuration for offloading features, including Checksum/TSO/UFO, and set these offloading features as enabled by default. Fixes: #4792. Signed-off-by: Yong He <alexyonghe@tencent.com>
This commit is contained in:
@@ -2334,6 +2334,9 @@ impl DeviceManager {
|
||||
.map(|s| s.to_versioned_state())
|
||||
.transpose()
|
||||
.map_err(DeviceManagerError::RestoreGetState)?,
|
||||
net_cfg.offload_tso,
|
||||
net_cfg.offload_ufo,
|
||||
net_cfg.offload_csum,
|
||||
) {
|
||||
Ok(vun_device) => vun_device,
|
||||
Err(e) => {
|
||||
@@ -2371,6 +2374,9 @@ impl DeviceManager {
|
||||
.try_clone()
|
||||
.map_err(DeviceManagerError::EventFd)?,
|
||||
state,
|
||||
net_cfg.offload_tso,
|
||||
net_cfg.offload_ufo,
|
||||
net_cfg.offload_csum,
|
||||
)
|
||||
.map_err(DeviceManagerError::CreateVirtioNet)?,
|
||||
))
|
||||
@@ -2389,6 +2395,9 @@ impl DeviceManager {
|
||||
.try_clone()
|
||||
.map_err(DeviceManagerError::EventFd)?,
|
||||
state,
|
||||
net_cfg.offload_tso,
|
||||
net_cfg.offload_ufo,
|
||||
net_cfg.offload_csum,
|
||||
)
|
||||
.map_err(DeviceManagerError::CreateVirtioNet)?,
|
||||
))
|
||||
@@ -2411,6 +2420,9 @@ impl DeviceManager {
|
||||
.try_clone()
|
||||
.map_err(DeviceManagerError::EventFd)?,
|
||||
state,
|
||||
net_cfg.offload_tso,
|
||||
net_cfg.offload_ufo,
|
||||
net_cfg.offload_csum,
|
||||
)
|
||||
.map_err(DeviceManagerError::CreateVirtioNet)?,
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user