[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba7da46b-a84d-142f-90e2-6b0be6899fbf@oracle.com>
Date: Mon, 29 Jun 2020 10:55:28 -0700
From: Rao Shoaib <rao.shoaib@...cle.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
ka-cheong.poon@...cle.com, david.edmondson@...cle.com
Subject: Re: [PATCH v1] rds: If one path needs re-connection, check all and
re-connect
On 6/26/20 4:31 PM, David Miller wrote:
> From: rao.shoaib@...cle.com
> 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
Powered by blists - more mailing lists