N3000 configured by puppet using pf-bb-config

pf-bb-config utility is from now on used to configure Intel FPGA N3000
FEC (accelerator) device. The configuration is based on hard-coded
values in fpga_5gnr_config_vf.cfg file available in the pf-bb-config
public repository (https://github.com/intel/pf-bb-config/tree/v21.6).

Notice reset of device is done before configuring via the tool.

Depends-On: https://review.opendev.org/c/starlingx/integ/+/799693
Depends-On: https://review.opendev.org/c/starlingx/config/+/799716
Task: 42785
Story: 2009036
Signed-off-by: Douglas Henrique Koerich <douglashenrique.koerich@windriver.com>
Change-Id: I66f82e00b801b0476a7bc8a43d47232d6a930cdc
This commit is contained in:
Douglas Henrique Koerich 2021-07-06 17:41:38 -03:00
parent 132d23cb97
commit b71c0df6a2
3 changed files with 20 additions and 1 deletions

View File

@ -71,6 +71,10 @@ define platform::devices::sriov_bind (
include platform::devices::fpga::n3000::reset
Class['platform::devices::fpga::n3000::reset']
-> Exec["sriov-bind-device: ${title}"]
include platform::devices::n3000::config
Exec["sriov-enable-device: ${title}"]
-> Class['platform::devices::n3000::config']
}
if ($device_id != undef) and ($device_id == '0d5c') {
class { platform::devices::acc100::config :
@ -159,6 +163,20 @@ class platform::devices::fpga::fec {
require ::platform::devices::fpga::fec::config
}
class platform::devices::n3000::fec (
$enabled = false
) {}
class platform::devices::n3000::config
inherits ::platform::devices::n3000::fec {
if $enabled {
exec { 'Configure N3000 FPGA 5GNR device':
command => template('platform/n3000-config.erb'),
logoutput => true,
}
}
}
class platform::devices::acc100::fec (
$enabled = false
) {}
@ -168,7 +186,7 @@ class platform::devices::acc100::config (
) inherits ::platform::devices::acc100::fec {
if $enabled {
exec { "Configure ACC100 device with ${num_vf_bundles} VF bundles":
command => template('platform/processing.accelerator-config.erb'),
command => template('platform/acc100-config.erb'),
logoutput => true,
}
}

View File

@ -0,0 +1 @@
/usr/bin/pf_bb_config FPGA_5GNR -c /usr/share/pf-bb-config/fpga_5gnr/fpga_5gnr_config_vf.cfg