Browse Source

95fcoe: support bnx2fc

To start bnx2fc, we need to run fipvlan only and not dcbtool.  DCBX is run
automatically in the hardware, but VLAN discovery needs to be started by
fipvlan.

https://bugzilla.redhat.com/show_bug.cgi?id=736094
master
Harald Hoyer 13 years ago
parent
commit
f6783bee07
  1. 8
      modules.d/95fcoe/fcoe-up
  2. 1
      modules.d/95fcoe/module-setup.sh
  3. 7
      modules.d/95fcoe/parse-fcoe.sh

8
modules.d/95fcoe/fcoe-up

@ -23,6 +23,9 @@ dcb=$2
ip link set "$netif" up ip link set "$netif" up
wait_for_if_up "$netif" wait_for_if_up "$netif"


netdriver=$(readlink -f /sys/class/net/$netif/device/driver)
netdriver=${netdriver##*/}

if [ "$dcb" = "dcb" ]; then if [ "$dcb" = "dcb" ]; then
# Note lldpad will stay running after switchroot, the system initscripts # Note lldpad will stay running after switchroot, the system initscripts
# are to kill it and start a new lldpad to take over. Data is transfered # are to kill it and start a new lldpad to take over. Data is transfered
@ -35,6 +38,11 @@ if [ "$dcb" = "dcb" ]; then
dcbtool sc "$netif" app:fcoe e:1 a:1 w:1 dcbtool sc "$netif" app:fcoe e:1 a:1 w:1
sleep 1 sleep 1
fipvlan "$netif" -c -s fipvlan "$netif" -c -s
elif [ "$netdriver" = "bnx2x" ]; then
# If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan
modprobe 8021q
udevadm settle --timeout=30
fipvlan "$netif" -c -s
else else
echo -n "$netif" > /sys/module/fcoe/parameters/create echo -n "$netif" > /sys/module/fcoe/parameters/create
fi fi

1
modules.d/95fcoe/module-setup.sh

@ -25,6 +25,7 @@ install() {
inst dcbtool inst dcbtool
inst fipvlan inst fipvlan
inst lldpad inst lldpad
inst readlink


mkdir -m 0755 -p "$initdir/var/lib/lldpad" mkdir -m 0755 -p "$initdir/var/lib/lldpad"



7
modules.d/95fcoe/parse-fcoe.sh

@ -20,6 +20,13 @@
# If it's not set we don't continue # If it's not set we don't continue
[ -z "$fcoe" ] && return [ -z "$fcoe" ] && return



# BRCM: Later, should check whether bnx2x is loaded first before loading bnx2fc so do not load bnx2fc when there are no Broadcom adapters
[ -e /sys/module/fcoe/parameters/create ] || modprobe -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE"

modprobe bnx2fc >/dev/null 2>&1
udevadm settle --timeout=30

# FCoE actually supported? # FCoE actually supported?
[ -e /sys/module/fcoe/parameters/create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE" [ -e /sys/module/fcoe/parameters/create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE"



Loading…
Cancel
Save