aboutsummaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2017-03-22 10:20:43 -0400
committerFeng Pan <fpan@redhat.com>2017-04-22 00:24:57 -0400
commita9b8980b5b933d1b09134ff1ab2d7601d76c40c2 (patch)
tree6a8954f02e651210bbac8295781d440df0d8cc98 /manifests
parentbb2d937d418b9353fd6f294978c23f5908d2e366 (diff)
Add parameter for dpdk-plugin support
DPDK is now an optional plugin shipped in vpp-plugins package, adding parameter vpp_dpdk_support which defaults to true to support configuration of DPDK related options. JIRA: PUP-2 Change-Id: Ie033e2b6cd871c8f8b644499a0283949a0039bf6 Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'manifests')
-rw-r--r--manifests/config.pp29
-rw-r--r--manifests/init.pp5
-rw-r--r--manifests/install.pp7
-rw-r--r--manifests/params.pp1
4 files changed, 30 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',
- }
}
diff --git a/manifests/init.pp b/manifests/init.pp
index fbdc453..e2d1c0b 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -8,6 +8,10 @@
# Valid values are 'release', 'master' and stable branch like 'stable.1609'.
# Defaults to 'release'.
#
+# [*vpp_dpdk_support*]
+# (optional) Enable DPDK support for VPP
+# Defaults to true
+#
# [*vpp_dpdk_devs*]
# (optional) Array of PCI addresses to bind to vpp.
# Defaults to undef.
@@ -39,6 +43,7 @@
#
class fdio (
$repo_branch = $::fdio::params::repo_branch,
+ $vpp_dpdk_support = $::fdio::params::vpp_dpdk_support,
$vpp_dpdk_devs = $::fdio::params::vpp_dpdk_devs,
$vpp_dpdk_uio_driver = $::fdio::params::vpp_dpdk_uio_driver,
$vpp_dpdk_dev_default_options = $::fdio::params::vpp_dpdk_dev_default_options,
diff --git a/manifests/install.pp b/manifests/install.pp
index 14577a7..bad8ec4 100644
--- a/manifests/install.pp
+++ b/manifests/install.pp
@@ -22,4 +22,11 @@ class fdio::install {
ensure => present,
require => Yumrepo["fdio-${fdio::repo_branch}"],
}
+
+ if $fdio::vpp_dpdk_support {
+ package { 'vpp-plugins':
+ ensure => present,
+ require => Package['vpp'],
+ }
+ }
}
diff --git a/manifests/params.pp b/manifests/params.pp
index 9adba11..c3c3ed8 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -4,6 +4,7 @@
#
class fdio::params {
$repo_branch = 'release'
+ $vpp_dpdk_support = true
$vpp_dpdk_devs = []
$vpp_dpdk_uio_driver = 'uio_pci_generic'
$vpp_dpdk_dev_default_options = undef