Reduce MAC caching timeout when using probed VFs
In order to use RDMA for iSER, storage network is configured over virtual function, in the Ethernet case. VFs doesn't have a permanent MAC, so this change comes to reduce the MAC caching time in order to support a reboot of servers in the cluster with VFs that changing their MAC (e.g storage targets). Change-Id: I2effceebf40d94598c9fe0308873064b0592234f
This commit is contained in:
parent
9d0b917517
commit
65b44b6cf5
@ -19,6 +19,8 @@ source $SCRIPT_DIR/common
|
|||||||
readonly SCRIPT_MODE=$1
|
readonly SCRIPT_MODE=$1
|
||||||
readonly FALLBACK_NUM_VFS=8
|
readonly FALLBACK_NUM_VFS=8
|
||||||
readonly SRIOV_ENABLED_FLAG=1
|
readonly SRIOV_ENABLED_FLAG=1
|
||||||
|
readonly VF_MAC_CACHING_TIMEOUT=1
|
||||||
|
readonly VF_MAC_CACHING_TIMEOUT_DEF=300
|
||||||
readonly NEW_KERNEL_PARAM="intel_iommu=on"
|
readonly NEW_KERNEL_PARAM="intel_iommu=on"
|
||||||
readonly GRUB_FILE_CENTOS="/boot/grub/grub.conf"
|
readonly GRUB_FILE_CENTOS="/boot/grub/grub.conf"
|
||||||
readonly GRUB_FILE_UBUNTU="/boot/grub/grub.cfg"
|
readonly GRUB_FILE_UBUNTU="/boot/grub/grub.cfg"
|
||||||
@ -66,6 +68,19 @@ function calculate_total_vfs () {
|
|||||||
echo ${num_of_vfs}
|
echo ${num_of_vfs}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Reduce mac caching time since VF is used for iSER with non permanent MAC
|
||||||
|
function reduce_mac_caching_timeout () {
|
||||||
|
probes=`get_num_probe_vfs`
|
||||||
|
if [ "$probes" == "1" ]; then
|
||||||
|
timeout=$VF_MAC_CACHING_TIMEOUT
|
||||||
|
else
|
||||||
|
timeout=$VF_MAC_CACHING_TIMEOUT_DEF
|
||||||
|
fi
|
||||||
|
sed -e "/^.*net\.ipv4\.route\.gc_timeout.*$/d" -i /etc/sysctl.conf
|
||||||
|
echo "net.ipv4.route.gc_timeout=$timeout" >> /etc/sysctl.conf
|
||||||
|
sysctl -p
|
||||||
|
}
|
||||||
|
|
||||||
function set_modprobe_file () {
|
function set_modprobe_file () {
|
||||||
PROBE_VFS=`get_num_probe_vfs`
|
PROBE_VFS=`get_num_probe_vfs`
|
||||||
MLX4_CORE_FILE="/etc/modprobe.d/mlx4_core.conf"
|
MLX4_CORE_FILE="/etc/modprobe.d/mlx4_core.conf"
|
||||||
@ -104,6 +119,7 @@ function set_kernel_params () {
|
|||||||
# insert the corrected line on the same line number
|
# insert the corrected line on the same line number
|
||||||
sed -i "${line_num}i\ ${new_kernel_line}" ${grub_file}
|
sed -i "${line_num}i\ ${new_kernel_line}" ${grub_file}
|
||||||
fi
|
fi
|
||||||
|
reduce_mac_caching_timeout
|
||||||
}
|
}
|
||||||
|
|
||||||
function burn_vfs_in_fw () {
|
function burn_vfs_in_fw () {
|
||||||
|
@ -5,7 +5,7 @@ name: mellanox-plugin
|
|||||||
title: Mellanox Openstack features
|
title: Mellanox Openstack features
|
||||||
|
|
||||||
# Plugin version
|
# Plugin version
|
||||||
version: 0.2.23
|
version: 0.2.24
|
||||||
|
|
||||||
# Description
|
# Description
|
||||||
description: Enable features over Mellanox hardware
|
description: Enable features over Mellanox hardware
|
||||||
|
Loading…
Reference in New Issue
Block a user