From 3a5780724417e6938bc6b2677757b1d9be2c9a7a Mon Sep 17 00:00:00 2001 From: abhi Date: Wed, 15 Jul 2026 11:45:42 +0530 Subject: [PATCH] fix (dpf/bf4): Remove unsupport parameter HIDE_PORT2_PF from bf4 flavor --- crates/dpf/src/flavor.rs | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/crates/dpf/src/flavor.rs b/crates/dpf/src/flavor.rs index 2e209267a6..354d847de9 100644 --- a/crates/dpf/src/flavor.rs +++ b/crates/dpf/src/flavor.rs @@ -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()), }), @@ -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(),