]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Add dcb support to dracut's FCoE support (rh563794)
authorHans de Goede <hdegoede@redhat.com>
Mon, 15 Mar 2010 10:21:29 +0000 (11:21 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 19 Mar 2010 14:03:21 +0000 (15:03 +0100)
Note that there are still some patches queued upstream for fcoe-utils to
enable it to work with the new lldpad and to add support to fipvlan to
bring up FCoE connections without requiring fcoemon to run.

The invocations of the various tools as in this patch should be final though,
see the discussion in:
http://bugzilla.redhat.com/show_bug.cgi?id=563794

This is the second revision of this patch, which no longer adds /etc/fcoe
to the initrd as that is not needed.

modules.d/95fcoe/fcoe-up
modules.d/95fcoe/install
modules.d/95fcoe/parse-fcoe.sh

index 8a70a6278ad6a6cdecbc72dcdf9220df701b65b3..bd6294a0740da9d401738be8547210c10ce8051e 100755 (executable)
@@ -6,6 +6,8 @@
 # Note currently only nodcb is supported, the dcb option is reserved for
 # future use.
 
+PATH=$PATH:/sbin:/usr/sbin
+
 # Huh? Missing arguments ??
 [ -z "$1" -o -z "$2" ] && exit 1
 
@@ -13,4 +15,14 @@ netif=$1
 dcb=$2
 
 /sbin/ip link set "$netif" up
-echo -n "$netif" > /sys/module/fcoe/parameters/create
+if [ "$dcb" = "dcb" ]; then
+    # 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
+    # between the 2 using a shm segment
+    lldpad -d
+    dcbtool sc "$netif" dcb on
+    dcbtool sc "$netif" app:fcoe e:1 a:1 w:1
+    fipvlan "$netif" -c -s
+else
+    echo -n "$netif" > /sys/module/fcoe/parameters/create
+fi
index 0bd9ed4f6bbe7d6cce64db8b0a74d3012c46e070..71b3bd1a7640b178f23b40e8ea11e0e8d55d9740 100755 (executable)
@@ -1,6 +1,9 @@
 #!/bin/bash
 
-dracut_install ip
+dracut_install ip dcbtool fipvlan
+
+inst lldpad
+mkdir -p "$initdir/var/lib/lldpad"
 
 inst "$moddir/fcoe-up" "/sbin/fcoe-up"
 inst_hook pre-udev 60 "$moddir/fcoe-genrules.sh"
index b35680fce44a95ce24364bf0a298dd5a077d562c..26a5a1a2c6edbe948440f0135ce69f7629352f65 100755 (executable)
@@ -39,8 +39,7 @@ parse_fcoe_opts() {
 
 parse_fcoe_opts
 
-# currently only nodcb is supported
-if [ "$fcoe_dcb" != "nodcb" ] ; then
+if [ "$fcoe_dcb" != "nodcb" -a "$fcoe_dcb" != "dcb" ] ; then
     die "Invalid FCoE DCB option: $fcoe_dcb"
 fi