Re: [PATCH v1] rds: If one path needs re-connection, check all and re-connect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 6/26/20 4:31 PM, David Miller wrote:
From: rao.shoaib@xxxxxxxxxx
Date: Fri, 26 Jun 2020 11:34:38 -0700

+/* Check connectivity of all paths
+ */
+void rds_check_all_paths(struct rds_connection *conn)
+{
+	int i = 0;
+
+	do {
+		rds_conn_path_connect_if_down(&conn->c_path[i]);
+	} while (++i < conn->c_npaths);
+}
Please code this loop in a more canonial way:

	int i;

	for (i = 0; i < conn->c_npaths, i++)
		rds_conn_path_connect_if_down(&conn->c_path[i]);

Thank you.

This was coded in this unusual way because the code is agnostic to the underlying transport. Unfortunately, IB transport does not initialize/use this field where as TCP does and counts starting from one.

If this is not acceptable, I would have to introduce a check for the transport or deal with zero count separately.

Let me know.

Regards,

Shoaib






[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux