On 01/28/2013 12:11 AM, Hannes Reinecke wrote:
Instead of having to check the individual stages we can
easier just check if any vlans are created. Vlans are
only created if the user specified '--create', so if
no VLANs are created either the user has not specified
it or some error occured along the line. In either case
we can shutdown the interface.

This assumption is not correct. HP flex fabric systems, for example, sends a VLAN notification with VLAN ID 0, in which case we start FCoE on the physical interface itself. However, with this change the interface will be shut down, as it will not have an entry in iff->vlans. This change affects boot-from-SAN as fipvlan will be used by the init scripts during installation and boot.

thanks,
Bhanu


Signed-off-by: Hannes Reinecke <[email protected]>
---
  fipvlan.c |    6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fipvlan.c b/fipvlan.c
index cb313df..3c786fe 100644
--- a/fipvlan.c
+++ b/fipvlan.c
@@ -725,8 +725,7 @@ void cleanup_interfaces(void)
if (config.automode) {
                TAILQ_FOREACH(iff, &interfaces, list_node) {
-                       if (iff->linkup_sent &&
-                           (!iff->running || !iff->req_sent || 
!iff->resp_recv)) {
+                       if (iff->linkup_sent && TAILQ_EMPTY(&iff->vlans)) {
                                FIP_LOG_DBG("shutdown if %d",
                                            iff->ifindex);
                                rtnl_set_iff_down(iff->ifindex, NULL);
@@ -740,8 +739,7 @@ void cleanup_interfaces(void)
                                skipped++;
                                continue;
                        }
-                       if (iff->linkup_sent &&
-                           (!iff->running || !iff->req_sent || 
!iff->resp_recv)) {
+                       if (iff->linkup_sent && TAILQ_EMPTY(&iff->vlans)) {

                                FIP_LOG_DBG("shutdown if %d",
                                            iff->ifindex);
                                rtnl_set_iff_down(iff->ifindex, NULL);



_______________________________________________
fcoe-devel mailing list
[email protected]
http://lists.open-fcoe.org/mailman/listinfo/fcoe-devel

Reply via email to