diff options
Diffstat (limited to 'manifests/config.pp')
-rw-r--r-- | manifests/config.pp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/manifests/config.pp b/manifests/config.pp index b74f6d4..b1ed7ad 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -4,20 +4,25 @@ # class fdio::config { + if $fdio::vpp_dpdk_support { + # ensure that dpdk module is loaded + $dpdk_pmd_real = regsubst($fdio::vpp_dpdk_uio_driver, '-', '_', 'G') + exec { 'insert_dpdk_kmod': + command => "modprobe ${fdio::vpp_dpdk_uio_driver}", + unless => "lsmod | grep ${dpdk_pmd_real}", + path => '/bin:/sbin', + } + + vpp_config { + 'dpdk/dev/default': value => $fdio::vpp_dpdk_dev_default_options; + 'dpdk/uio-driver': value => $fdio::vpp_dpdk_uio_driver; + } + + fdio::config::vpp_devices { $fdio::vpp_dpdk_devs: } + } + vpp_config { - 'dpdk/dev/default': value => $fdio::vpp_dpdk_dev_default_options; - 'dpdk/uio-driver': value => $fdio::vpp_dpdk_uio_driver; 'cpu/main-core': value => $fdio::vpp_cpu_main_core; 'cpu/corelist-workers': value => $fdio::vpp_cpu_corelist_workers; } - - fdio::config::vpp_devices { $fdio::vpp_dpdk_devs: } - - # ensure that dpdk module is loaded - $dpdk_pmd_real = regsubst($fdio::vpp_dpdk_uio_driver, '-', '_', 'G') - exec { 'insert_dpdk_kmod': - command => "modprobe ${fdio::vpp_dpdk_uio_driver}", - unless => "lsmod | grep ${dpdk_pmd_real}", - path => '/bin:/sbin', - } } |