Ales Komarek | 32fea93 | 2016-12-15 12:20:33 +0100 | [diff] [blame] | 1 | |
| 2 | ===================== |
| 3 | Generic system models |
| 4 | ===================== |
| 5 | |
| 6 | This repo contains general reclass system level of salt model. It is to be |
| 7 | used along with service models and concrete cluster deployment model. |
| 8 | |
| 9 | Network configuration |
| 10 | ===================== |
| 11 | |
Petr Jediný | 2418e4e | 2017-02-15 16:12:32 +0100 | [diff] [blame] | 12 | Enable SR-IOV support |
| 13 | --------------------- |
| 14 | |
| 15 | Include class at `cluster.<name>.openstack.compute` |
| 16 | |
Petr Jediný | efc605a | 2017-03-27 11:49:40 +0200 | [diff] [blame^] | 17 | .. code-block:: yaml |
Petr Jediný | 2418e4e | 2017-02-15 16:12:32 +0100 | [diff] [blame] | 18 | |
Petr Jediný | efc605a | 2017-03-27 11:49:40 +0200 | [diff] [blame^] | 19 | - system.nova.compute.nfv.sriov |
Petr Jediný | 2418e4e | 2017-02-15 16:12:32 +0100 | [diff] [blame] | 20 | |
Petr Jediný | efc605a | 2017-03-27 11:49:40 +0200 | [diff] [blame^] | 21 | For single SR-IOV interface setup you can set parameters: |
| 22 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 23 | |
| 24 | `sriov_nic01_device_name` |
| 25 | Name of the Physical Function interface (pF) |
| 26 | |
| 27 | `sriov_nic01_numvfs` |
| 28 | Number of Virtual Functions (VF), for number of |
| 29 | supported VF check documentation for your network interface card. |
| 30 | |
| 31 | `sriov_nic01_physical_network` |
| 32 | Default **physnet1**, label for physical network the interface belongs to. |
| 33 | |
| 34 | `sriov_unsafe_interrupts` |
| 35 | Default **False**, needs to be set **True** if your hw platform does not |
| 36 | support interrupt remapping. |
| 37 | |
| 38 | |
| 39 | Multiple SR-IOV interface setup: |
| 40 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 41 | |
| 42 | By default, the metadata model contains configuration for 1 NIC |
| 43 | dedicated for SR-IOV, so we need to setup network interfaces like in the |
| 44 | following example. |
| 45 | |
| 46 | .. code-block:: yaml |
| 47 | |
| 48 | ... |
| 49 | nova: |
| 50 | compute: |
| 51 | sriov: |
| 52 | sriov_nic01: |
| 53 | devname: eth1 |
| 54 | physical_network: physnet3 |
| 55 | sriov_nic02: |
| 56 | devname: eth2 |
| 57 | physical_network: physnet4 |
| 58 | sriov_nic03: |
| 59 | devname: eth3 |
| 60 | physical_network: physnet3 |
| 61 | sriov_nic04: |
| 62 | devname: eth4 |
| 63 | physical_network: physnet6 |
| 64 | linux: |
| 65 | system: |
| 66 | kernel: |
| 67 | sriov: True |
| 68 | unsafe_interrupts: False |
| 69 | rc: |
| 70 | local: | |
| 71 | #!/bin/sh -e |
| 72 | # Enabling 7 VFs on eth1 PF |
| 73 | echo 7 > /sys/class/net/eth1/device/sriov_numvfs; sleep 2; ip link set eth1 up |
| 74 | # Enabling 15 VFs on eth2 PF |
| 75 | echo 15 > /sys/class/net/eth2/device/sriov_numvfs; sleep 2; ip link set eth2 up |
| 76 | # Enabling 15 VFs on eth3 PF |
| 77 | echo 15 > /sys/class/net/eth3/device/sriov_numvfs; sleep 2; ip link set eth3 up |
| 78 | # Enabling 7 VFs on eth4 PF |
| 79 | echo 7 > /sys/class/net/eth4/device/sriov_numvfs; sleep 2; ip link set eth4 up |
| 80 | exit 0 |