diff options
author | chigang <chigang@huawei.com> | 2017-08-10 10:40:11 +0800 |
---|---|---|
committer | chigang <chigang@huawei.com> | 2017-09-13 20:25:19 +0800 |
commit | 193dc2117a1fb96d9fdd98258c1040775a33f033 (patch) | |
tree | 07dc0ac2553e6e397cdd3d6d9cf110f5bfab9cd5 /plugins/dpdk/roles/ins_dpdk/templates | |
parent | 28d894c7f577625635ef238a89e5cf53a92017a4 (diff) |
Add dpdk plugin
JIRA: COMPASS-550
add OVS-DPDK plugin, there are two roles in this plugin.
1. ins_dpdk is for dpdk installation and hugepages setting.
2. ins_ovs is for openvswitch installation.
add dpdk scenario networking configuration example called "network_cfg_dpdk.yaml"
Change-Id: Ifd8c1aadc218753f99bc26bb530e7cf9962ad8e3
Signed-off-by: chigang <chigang@huawei.com>
Diffstat (limited to 'plugins/dpdk/roles/ins_dpdk/templates')
-rw-r--r-- | plugins/dpdk/roles/ins_dpdk/templates/dpdk_uio.sh.j2 | 9 | ||||
-rw-r--r-- | plugins/dpdk/roles/ins_dpdk/templates/dpdk_vfio.sh.j2 | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/plugins/dpdk/roles/ins_dpdk/templates/dpdk_uio.sh.j2 b/plugins/dpdk/roles/ins_dpdk/templates/dpdk_uio.sh.j2 new file mode 100644 index 00000000..560d30ca --- /dev/null +++ b/plugins/dpdk/roles/ins_dpdk/templates/dpdk_uio.sh.j2 @@ -0,0 +1,9 @@ +#!/bin/bash +ifdown {{ item.device_name }} +modprobe uio +lsmod |grep igb_uio +if [ $? == 0 ];then + rmmod igb_uio +fi +insmod {{ item.dpdk_build }}/kmod/igb_uio.ko +{{ item.dpdk_dir }}/tools/dpdk-devbind.py --bind=igb_uio {{ item.device_name }} diff --git a/plugins/dpdk/roles/ins_dpdk/templates/dpdk_vfio.sh.j2 b/plugins/dpdk/roles/ins_dpdk/templates/dpdk_vfio.sh.j2 new file mode 100644 index 00000000..58839342 --- /dev/null +++ b/plugins/dpdk/roles/ins_dpdk/templates/dpdk_vfio.sh.j2 @@ -0,0 +1,6 @@ +#!/bin/bash +ifdown {{ item.device_name }} +modprobe vfio-pci +chmod a+x /dev/vfio +chmod 0666 /dev/vfio/* +{{ item.dpdk_dir }}/tools/dpdk-devbind.py --bind=vfio-pci {{ item.device_name }} |