Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion crates/dpf/src/flavor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub fn flavor_bf4(
containerd_config: None,
grub: Some(bf4_grub_params()),
host_network_interface_configs: None,
nvconfig: Some(vec![get_default_nvconfig()]),
nvconfig: Some(vec![get_bf4_default_nvconfig()]),
ovs: Some(crate::crds::dpuflavors_generated::DpuFlavorOvs {
raw_config_script: Some(get_bf4_ovs_defaults()),
}),
Expand Down Expand Up @@ -350,6 +350,34 @@ fn get_config_files(
Ok(config_files)
}

fn get_bf4_default_nvconfig() -> DpuFlavorNvconfig {
// TODO: HIDE_PORT2_PF is not supported, so reoving it for now.
// We need to find the equivalent field in Bf4 and configure it again.
let parameters = vec![
"PF_BAR2_ENABLE=0".to_string(),
"PER_PF_NUM_SF=1".to_string(),
"PF_TOTAL_SF=30".to_string(),
"PF_SF_BAR_SIZE=10".to_string(),
"NUM_PF_MSIX_VALID=0".to_string(),
"PF_NUM_PF_MSIX_VALID=1".to_string(),
"PF_NUM_PF_MSIX=228".to_string(),
"INTERNAL_CPU_MODEL=1".to_string(),
"INTERNAL_CPU_OFFLOAD_ENGINE=0".to_string(),
"SRIOV_EN=1".to_string(),
"LAG_RESOURCE_ALLOCATION=1".to_string(),
"NUM_OF_VFS=16".to_string(),
"NUM_OF_PF=1".to_string(),
"LINK_TYPE_P1=ETH".to_string(),
"LINK_TYPE_P2=ETH".to_string(),
];

DpuFlavorNvconfig {
// DPF does not allow anyother wild card. It takes only '*'
device: Some(DpuFlavorNvconfigDevice::KopiumVariant0), //"*"
parameters: Some(parameters),
}
}

fn get_default_nvconfig() -> DpuFlavorNvconfig {
let parameters = vec![
"PF_BAR2_ENABLE=0".to_string(),
Expand Down
Loading