95fcoe: Reorder initialisation for bnx2x
Check first if we're running off an bnx2x device and start FCoE on it via fipvlan, then go the normal/Intel way of starting DCB. Also the SUSE version of fcoemon needs the yes parameter for the --syslog option References: bsc#982588 Signed-off-by: Johannes Thumshirn <jthumshirn@suse.com>master
parent
3dbf1f0783
commit
6b96b50d2c
|
@ -27,6 +27,13 @@ fi
|
||||||
ip link set dev $netif up
|
ip link set dev $netif up
|
||||||
linkup "$netif"
|
linkup "$netif"
|
||||||
|
|
||||||
|
# Some fcoemon implementations expect --syslog=true
|
||||||
|
syslogopt="--syslog"
|
||||||
|
if fcoemon -h|grep syslog|grep -q yes; then
|
||||||
|
fcoemonyes="$syslogopt=yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
netdriver=$(readlink -f /sys/class/net/$netif/device/driver)
|
netdriver=$(readlink -f /sys/class/net/$netif/device/driver)
|
||||||
netdriver=${netdriver##*/}
|
netdriver=${netdriver##*/}
|
||||||
|
|
||||||
|
@ -45,7 +52,16 @@ write_fcoemon_cfg() {
|
||||||
echo MODE=\"fabric\" >> /etc/fcoe/cfg-$netif
|
echo MODE=\"fabric\" >> /etc/fcoe/cfg-$netif
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$dcb" = "dcb" ]; then
|
if [ "$netdriver" = "bnx2x" ]; then
|
||||||
|
# If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan
|
||||||
|
modprobe 8021q
|
||||||
|
udevadm settle --timeout=30
|
||||||
|
# Sleep for 13 s to allow dcb negotiation
|
||||||
|
sleep 13
|
||||||
|
write_fcoemon_cfg
|
||||||
|
fcoemon $syslogopt
|
||||||
|
fipvlan -c -s "$netif"
|
||||||
|
elif [ "$dcb" = "dcb" ]; then
|
||||||
# wait for lldpad to be ready
|
# wait for lldpad to be ready
|
||||||
i=0
|
i=0
|
||||||
while [ $i -lt 60 ]; do
|
while [ $i -lt 60 ]; do
|
||||||
|
@ -79,18 +95,11 @@ if [ "$dcb" = "dcb" ]; then
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
write_fcoemon_cfg
|
write_fcoemon_cfg
|
||||||
fcoemon --syslog
|
fcoemon $syslogopt
|
||||||
elif [ "$netdriver" = "bnx2x" ]; then
|
|
||||||
# If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan
|
|
||||||
modprobe 8021q
|
|
||||||
udevadm settle --timeout=30
|
|
||||||
# Sleep for 13 s to allow dcb negotiation
|
|
||||||
sleep 13
|
|
||||||
fipvlan "$netif" -c -s
|
|
||||||
else
|
else
|
||||||
vlan="no"
|
vlan="no"
|
||||||
write_fcoemon_cfg
|
write_fcoemon_cfg
|
||||||
fcoemon --syslog
|
fcoemon $syslogopt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
need_shutdown
|
need_shutdown
|
||||||
|
|
Loading…
Reference in New Issue