[ewg] [PATCH 4/5 VNIC] Delay reconnects to prevent flooding of EVIC (Depends on Patch 3)

Ramachandra K ramachandra.kuchimanchi at qlogic.com
Mon Aug 6 11:09:41 PDT 2007


Delay the reconnects to prevent the flooding of EVIC in case of a failure.

From: Poornima Kamath <poornima.kamath at qlogic.com>
Signed-off-by: Ramachandra K <ramachandra.kuchimanchi at qlogic.com>
---

 drivers/infiniband/ulp/vnic/vnic_main.c    |    7 +++++--
 drivers/infiniband/ulp/vnic/vnic_netpath.h |    1 +
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/ulp/vnic/vnic_main.c b/drivers/infiniband/ulp/vnic/vnic_main.c
index eab123b..e44f0f0 100644
--- a/drivers/infiniband/ulp/vnic/vnic_main.c
+++ b/drivers/infiniband/ulp/vnic/vnic_main.c
@@ -464,11 +464,14 @@ static void update_path_and_reconnect(st
 		      vnic->config->no_path_timeout) {
 		netpath->path_idx = config->path_idx;
 		netpath->connect_time = jiffies;
+		netpath->delay_reconnect = 0;
 		delay = 0;
 	} else if (config->path_idx != netpath->path_idx) {
-		delay = 0;
+		delay = netpath->delay_reconnect;
 		netpath->path_idx = config->path_idx;
-	}
+		netpath->delay_reconnect = 1;
+	} else
+		delay = 1;
 	viport_connect(netpath->viport, delay);
 }
 
diff --git a/drivers/infiniband/ulp/vnic/vnic_netpath.h b/drivers/infiniband/ulp/vnic/vnic_netpath.h
index 51fa3a8..cc43c83 100644
--- a/drivers/infiniband/ulp/vnic/vnic_netpath.h
+++ b/drivers/infiniband/ulp/vnic/vnic_netpath.h
@@ -54,6 +54,7 @@ struct netpath {
 	u32			connect_time;
 	int			second_bias;
 	u8			is_primary_path;
+	u8 			delay_reconnect;
 	struct timer_list	timer;
 	enum netpath_ts		timer_state;
 	struct class_dev_info	class_dev_info;



More information about the ewg mailing list