Parcourir la source

Merge "[DPDK] Enable VT-d in kernel via grub in case vfio-pci PMD driver"

pull/110/head
Jakub Pavlik il y a 7 ans
Parent
révision
8fb5ec75f5
5 fichiers modifiés avec 28 ajouts et 16 suppressions
  1. +5
    -5
      README.rst
  2. +6
    -0
      linux/system/dpdk.sls
  3. +4
    -0
      linux/system/init.sls
  4. +12
    -0
      linux/system/iommu.sls
  5. +1
    -11
      linux/system/sriov.sls

+ 5
- 5
README.rst Voir le fichier

@@ -1043,7 +1043,7 @@ DPDK OVS interfaces
bridge: openvswitch
dpdk:
enabled: true
driver: uio/vfio-pci
driver: uio/vfio
openvswitch:
pmd_cpu_mask: "0x6"
dpdk_socket_mem: "1024,1024"
@@ -1053,7 +1053,7 @@ DPDK OVS interfaces
dpkd0:
name: ${_param:dpdk_nic}
pci: 0000:06:00.0
driver: igb_uio/vfio
driver: igb_uio/vfio-pci
enabled: true
type: dpdk_ovs_port
n_rxq: 2
@@ -1073,7 +1073,7 @@ DPDK OVS interfaces
bridge: openvswitch
dpdk:
enabled: true
driver: uio/vfio-pci
driver: uio/vfio
openvswitch:
pmd_cpu_mask: "0x6"
dpdk_socket_mem: "1024,1024"
@@ -1083,7 +1083,7 @@ DPDK OVS interfaces
dpdk_second_nic:
name: ${_param:primary_second_nic}
pci: 0000:06:00.0
driver: igb_uio/vfio
driver: igb_uio/vfio-pci
bond: dpdkbond0
enabled: true
type: dpdk_ovs_port
@@ -1093,7 +1093,7 @@ DPDK OVS interfaces
dpdk_first_nic:
name: ${_param:primary_first_nic}
pci: 0000:05:00.0
driver: igb_uio/vfio
driver: igb_uio/vfio-pci
bond: dpdkbond0
enabled: true
type: dpdk_ovs_port

+ 6
- 0
linux/system/dpdk.sls Voir le fichier

@@ -0,0 +1,6 @@
{%- from "linux/map.jinja" import network with context %}

{%- if network.dpdk.enabled and network.dpdk.driver == "vfio" %}
include:
- linux.system.iommu
{%- endif %}

+ 4
- 0
linux/system/init.sls Voir le fichier

@@ -1,4 +1,5 @@
{%- from "linux/map.jinja" import system with context %}
{%- from "linux/map.jinja" import network with context %}
include:
- linux.system.env
- linux.system.profile
@@ -19,6 +20,9 @@ include:
{%- if system.kernel.hugepages is defined %}
- linux.system.hugepages
{%- endif %}
{%- if network.dpdk is defined %}
- linux.system.dpdk
{%- endif %}
{%- if system.kernel.sriov is defined %}
- linux.system.sriov
{%- endif %}

+ 12
- 0
linux/system/iommu.sls Voir le fichier

@@ -0,0 +1,12 @@
include:
- linux.system.grub

/etc/default/grub.d/90-iommu.cfg:
file.managed:
- contents: 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT intel_iommu=on iommu=pt"'
- require:
- file: grub_d_directory
{%- if grains.get('virtual_subtype', None) not in ['Docker', 'LXC'] %}
- watch_in:
- cmd: grub_update
{%- endif %}

+ 1
- 11
linux/system/sriov.sls Voir le fichier

@@ -1,17 +1,7 @@
{%- from "linux/map.jinja" import system with context %}

include:
- linux.system.grub

/etc/default/grub.d/90-sriov.cfg:
file.managed:
- contents: 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT intel_iommu=on iommu=pt"'
- require:
- file: grub_d_directory
{%- if grains.get('virtual_subtype', None) not in ['Docker', 'LXC'] %}
- watch_in:
- cmd: grub_update
{%- endif %}
- linux.system.iommu

/etc/modprobe.d/sriov.conf:
file.managed:

Chargement…
Annuler
Enregistrer