From 561c555fcb56ad9fa072fcc8f467b860e9f6979e Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Tue, 23 Dec 2014 14:27:50 +0200 Subject: [PATCH] Fixed ipoib interfaces alias ib* -> netdev-ib* This is to avoid the warning below: Loading kernel module for a network device with CAP_SYS_MODULE (deprecated). Use CAP_NET_ADMIN and alias netdev-ib0 instead Signed-off-by: Vladimir Sokolovsky --- compat-rdma.spec | 34 ---------------------------------- ofed_scripts/ib_ipoib.conf | 3 +-- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/compat-rdma.spec b/compat-rdma.spec index fc47b53..c973aaf 100755 --- a/compat-rdma.spec +++ b/compat-rdma.spec @@ -303,29 +303,6 @@ rm -rf $RPM_BUILD_DIR/%{_name}-%{_version} %post if [ $1 -ge 1 ]; then # 1 : This package is being installed or reinstalled -count_ib_ports() -{ - local cnt=0 - local tmp_cnt=0 - - tmp_cnt=$(/sbin/lspci -n | grep "15b3:" | wc -l | tr -d '[:space:]') # Mellanox HCAs - cnt=$[ $cnt + 2*${tmp_cnt} ] - - tmp_cnt=$(/sbin/lspci -n | grep -E "1fc1:|1077:7220" | wc -l | tr -d '[:space:]') # QLogic SDR and DDR HCA - cnt=$[ $cnt + ${tmp_cnt} ] - - tmp_cnt=$(/sbin/lspci -n | grep -E "1077:7322" | wc -l | tr -d '[:space:]') # QLogic QDR HCA - cnt=$[ $cnt + 2*${tmp_cnt} ] - return $cnt -} - -count_ib_ports -ports_num=$? - -# Set default number of ports to 2 if no HCAs found -if [ $ports_num -eq 0 ]; then - ports_num=2 -fi ############################################################################################################# # Modules configuration # ############################################################################################################# @@ -347,17 +324,6 @@ EOF fi %endif -%if %{modprobe_update} -%if %{build_ipoib} -for (( i=0 ; i < $ports_num ; i++ )) -do -cat >> /etc/modprobe.d/ib_ipoib.conf << EOF -alias ib${i} ib_ipoib -EOF -done -%endif -%endif - /sbin/depmod %{KVERSION} ############################################################################################################# diff --git a/ofed_scripts/ib_ipoib.conf b/ofed_scripts/ib_ipoib.conf index 3f41806..8439d8e 100644 --- a/ofed_scripts/ib_ipoib.conf +++ b/ofed_scripts/ib_ipoib.conf @@ -1,2 +1 @@ -# install ib_ipoib modprobe --ignore-install ib_ipoib && /sbin/ib_ipoib_sysctl load -# remove ib_ipoib /sbin/ib_ipoib_sysctl unload ; modprobe -r --ignore-remove ib_ipoib +alias netdev-ib* ib_ipoib -- 2.41.0