Browse Source

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
Johannes Thumshirn 9 years ago committed by Daniel Molkentin
parent
commit
6b96b50d2c
  1. 29
      modules.d/95fcoe/fcoe-up.sh

29
modules.d/95fcoe/fcoe-up.sh

@ -27,6 +27,13 @@ fi @@ -27,6 +27,13 @@ fi
ip link set dev $netif up
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=${netdriver##*/}

@ -45,7 +52,16 @@ write_fcoemon_cfg() { @@ -45,7 +52,16 @@ write_fcoemon_cfg() {
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
i=0
while [ $i -lt 60 ]; do
@ -79,18 +95,11 @@ if [ "$dcb" = "dcb" ]; then @@ -79,18 +95,11 @@ if [ "$dcb" = "dcb" ]; then
sleep 1

write_fcoemon_cfg
fcoemon --syslog
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
fcoemon $syslogopt
else
vlan="no"
write_fcoemon_cfg
fcoemon --syslog
fcoemon $syslogopt
fi

need_shutdown

Loading…
Cancel
Save