|
Harald Hoyer |
240f09 |
From 3c530fc528d61ea2701dfb46ccd90e218a6d8aef Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
240f09 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
240f09 |
Date: Mon, 31 Mar 2014 16:21:49 +0200
|
|
Harald Hoyer |
240f09 |
Subject: [PATCH] fcoe: workaround fcoe timing issues
|
|
Harald Hoyer |
240f09 |
|
|
Harald Hoyer |
240f09 |
---
|
|
Harald Hoyer |
240f09 |
modules.d/95fcoe/fcoe-genrules.sh | 2 +-
|
|
Harald Hoyer |
240f09 |
modules.d/95fcoe/fcoe-up.sh | 23 ++++++++++++++++++++---
|
|
Harald Hoyer |
240f09 |
2 files changed, 21 insertions(+), 4 deletions(-)
|
|
Harald Hoyer |
240f09 |
|
|
Harald Hoyer |
240f09 |
diff --git a/modules.d/95fcoe/fcoe-genrules.sh b/modules.d/95fcoe/fcoe-genrules.sh
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
index 80894ed2d5..fa3af6df0c 100755
|
|
Harald Hoyer |
240f09 |
--- a/modules.d/95fcoe/fcoe-genrules.sh
|
|
Harald Hoyer |
240f09 |
+++ b/modules.d/95fcoe/fcoe-genrules.sh
|
|
Harald Hoyer |
240f09 |
@@ -13,4 +13,4 @@
|
|
Harald Hoyer |
240f09 |
else
|
|
Harald Hoyer |
240f09 |
printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_interface" "$fcoe_dcb"
|
|
Harald Hoyer |
240f09 |
fi
|
|
Harald Hoyer |
240f09 |
-} > /etc/udev/rules.d/92-fcoe.rules
|
|
Harald Hoyer |
240f09 |
+} >> /etc/udev/rules.d/92-fcoe.rules
|
|
Harald Hoyer |
240f09 |
diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
index dd4535889f..d8c73c8147 100755
|
|
Harald Hoyer |
240f09 |
--- a/modules.d/95fcoe/fcoe-up.sh
|
|
Harald Hoyer |
240f09 |
+++ b/modules.d/95fcoe/fcoe-up.sh
|
|
Harald Hoyer |
240f09 |
@@ -36,10 +36,27 @@ if [ "$dcb" = "dcb" ]; then
|
|
Harald Hoyer |
240f09 |
sleep 1
|
|
Harald Hoyer |
240f09 |
i=$(($i+1))
|
|
Harald Hoyer |
240f09 |
done
|
|
Harald Hoyer |
240f09 |
- dcbtool sc "$netif" dcb on
|
|
Harald Hoyer |
240f09 |
- sleep 1
|
|
Harald Hoyer |
240f09 |
- dcbtool sc "$netif" app:fcoe e:1 a:1 w:1
|
|
Harald Hoyer |
240f09 |
+
|
|
Harald Hoyer |
240f09 |
+ # on some systems lldpad needs some time
|
|
Harald Hoyer |
240f09 |
+ # sleep until we find a better solution
|
|
Harald Hoyer |
240f09 |
+ sleep 30
|
|
Harald Hoyer |
240f09 |
+
|
|
Harald Hoyer |
240f09 |
+ while [ $i -lt 60 ]; do
|
|
Harald Hoyer |
240f09 |
+ dcbtool sc "$netif" dcb on && break
|
|
Harald Hoyer |
240f09 |
+ info "Retrying to turn dcb on"
|
|
Harald Hoyer |
240f09 |
+ sleep 1
|
|
Harald Hoyer |
240f09 |
+ i=$(($i+1))
|
|
Harald Hoyer |
240f09 |
+ done
|
|
Harald Hoyer |
240f09 |
+
|
|
Harald Hoyer |
240f09 |
+ while [ $i -lt 60 ]; do
|
|
Harald Hoyer |
240f09 |
+ dcbtool sc "$netif" app:fcoe e:1 a:1 w:1 && break
|
|
Harald Hoyer |
240f09 |
+ info "Retrying to turn fcoe on"
|
|
Harald Hoyer |
240f09 |
+ sleep 1
|
|
Harald Hoyer |
240f09 |
+ i=$(($i+1))
|
|
Harald Hoyer |
240f09 |
+ done
|
|
Harald Hoyer |
240f09 |
+
|
|
Harald Hoyer |
240f09 |
sleep 1
|
|
Harald Hoyer |
240f09 |
+
|
|
Harald Hoyer |
240f09 |
fipvlan "$netif" -c -s
|
|
Harald Hoyer |
240f09 |
elif [ "$netdriver" = "bnx2x" ]; then
|
|
Harald Hoyer |
240f09 |
# If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
--
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
1.9.3
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
|