Merge "Modprobe vfio kernel modules for SR-IOV"
This commit is contained in:
commit
9c4d5fb260
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/bash -x
|
||||||
|
# Copyright 2015 Mellanox Technologies, Ltd
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
# implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
readonly SCRIPT_DIR=$(dirname "$0")
|
||||||
|
source $SCRIPT_DIR/common
|
||||||
|
|
||||||
|
if [ $SRIOV == true ]; then
|
||||||
|
lsmod | grep -q vfio || (modprobe vfio && modprobe vfio_pci)
|
||||||
|
grep -q vfio /etc/rc.local || echo "modprobe vfio" >> /etc/rc.local &&
|
||||||
|
grep -q vfio_pci /etc/rc.local || echo "modprobe vfio_pci" >> /etc/rc.local
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit $?
|
|
@ -106,20 +106,29 @@
|
||||||
type: reboot
|
type: reboot
|
||||||
parameters:
|
parameters:
|
||||||
timeout: 420
|
timeout: 420
|
||||||
# change modprobe file + IOMMU in grub file + change VFs num in FW
|
# Check number of VFs
|
||||||
- id: validate_sriov
|
- id: validate_sriov
|
||||||
role: '*'
|
role: '*'
|
||||||
required_for: [remove_blocking_iptable_roles]
|
required_for: [modprobe_vfio]
|
||||||
requires: [reboot_after_ofed]
|
requires: [reboot_after_ofed]
|
||||||
type: shell
|
type: shell
|
||||||
parameters:
|
parameters:
|
||||||
cmd: ./sriov.sh validate
|
cmd: ./sriov.sh validate
|
||||||
timeout: 60
|
timeout: 60
|
||||||
|
# Load required kmods for SR-IOV
|
||||||
|
- id: modprobe_vfio
|
||||||
|
role: ['compute']
|
||||||
|
required_for: [remove_blocking_iptable_roles]
|
||||||
|
requires: [validate_sriov]
|
||||||
|
type: shell
|
||||||
|
parameters:
|
||||||
|
cmd: ./vfio.sh
|
||||||
|
timeout: 60
|
||||||
# This is a workaround: disable wrong rules in CentOS IBP #1458832.
|
# This is a workaround: disable wrong rules in CentOS IBP #1458832.
|
||||||
- id: remove_blocking_iptable_roles
|
- id: remove_blocking_iptable_roles
|
||||||
role: '*'
|
role: '*'
|
||||||
required_for: [pre_deployment_end]
|
required_for: [pre_deployment_end]
|
||||||
requires: [validate_sriov]
|
requires: [modprobe_vfio]
|
||||||
type: shell
|
type: shell
|
||||||
parameters:
|
parameters:
|
||||||
cmd: ./blocking_iptables_rules.sh
|
cmd: ./blocking_iptables_rules.sh
|
||||||
|
|
Loading…
Reference in New Issue