Re: IB/cma: Make timeout dependent on the subnet timeout

2014-04-25 Thread Bart Van Assche
On 04/25/14 04:59, Hefty, Sean wrote: Sean, can't we have CMA to follow the same practice used in the CM where we derive the RC QP timeout based on the packet life time retrieved in path queries? e.g base the cm response time out on this value too? We could. The timeout that's being

RE: IB/cma: Make timeout dependent on the subnet timeout

2014-04-25 Thread Hefty, Sean
Another possible approach is to make the CM timeout configurable for kernel clients only. How about creating two versions of struct rdma_conn_param - the existing version for communication between user space and kernel and a second version for in-kernel clients only ? In that second version a

Re: IB/cma: Make timeout dependent on the subnet timeout

2014-04-25 Thread Bart Van Assche
On 04/25/14 18:56, Hefty, Sean wrote: Btw, up til now most of the requests regarding CM timeouts has been to increase it. We need to make sure that we don't end up breaking that. Even if we set this timeout to 0, the total timeout for a connection request is 2 x packet lifetime x # retries.

Re: IB/cma: Make timeout dependent on the subnet timeout

2014-04-24 Thread Or Gerlitz
On 23/04/2014 16:44, Hefty, Sean wrote: Regarding SubnetTimeout changes: the code in drivers/infiniband/core/cache.c already queues a work request after each port state change. Inside that work request e.g. the P_Key cache is updated. Would it be acceptable to modify ib_cache_update() such that

RE: IB/cma: Make timeout dependent on the subnet timeout

2014-04-24 Thread Hefty, Sean
Sean, can't we have CMA to follow the same practice used in the CM where we derive the RC QP timeout based on the packet life time retrieved in path queries? e.g base the cm response time out on this value too? We could. The timeout that's being modified by the patch is the time needed by

Re: IB/cma: Make timeout dependent on the subnet timeout

2014-04-23 Thread Hal Rosenstock
On 4/22/2014 2:41 PM, Hefty, Sean wrote: +static u8 cma_get_ib_subnet_timeout(struct rdma_cm_id *id) +{ +struct ib_port_attr attr; +int ret; + +ret = ib_query_port(id-device, id-port_num, attr); +return ret == 0 ? attr.subnet_timeout : 18; +} Can we query the port once

Re: IB/cma: Make timeout dependent on the subnet timeout

2014-04-23 Thread Bart Van Assche
On 04/23/14 14:30, Hal Rosenstock wrote: On 4/22/2014 2:41 PM, Hefty, Sean wrote: +static u8 cma_get_ib_subnet_timeout(struct rdma_cm_id *id) +{ + struct ib_port_attr attr; + int ret; + + ret = ib_query_port(id-device, id-port_num, attr); + return ret == 0 ? attr.subnet_timeout :

Re: IB/cma: Make timeout dependent on the subnet timeout

2014-04-23 Thread Hal Rosenstock
On 4/23/2014 8:46 AM, Bart Van Assche wrote: On 04/23/14 14:30, Hal Rosenstock wrote: On 4/22/2014 2:41 PM, Hefty, Sean wrote: +static u8 cma_get_ib_subnet_timeout(struct rdma_cm_id *id) +{ + struct ib_port_attr attr; + int ret; + + ret = ib_query_port(id-device, id-port_num, attr); +

RE: IB/cma: Make timeout dependent on the subnet timeout

2014-04-23 Thread Hefty, Sean
Regarding SubnetTimeout changes: the code in drivers/infiniband/core/cache.c already queues a work request after each port state change. Inside that work request e.g. the P_Key cache is updated. Would it be acceptable to modify ib_cache_update() such that it also queries the port attributes

RE: IB/cma: Make timeout dependent on the subnet timeout

2014-04-23 Thread Weiny, Ira
On 4/23/2014 8:46 AM, Bart Van Assche wrote: On 04/23/14 14:30, Hal Rosenstock wrote: On 4/22/2014 2:41 PM, Hefty, Sean wrote: +static u8 cma_get_ib_subnet_timeout(struct rdma_cm_id *id) { +struct ib_port_attr attr; +int ret; + +ret =

RE: IB/cma: Make timeout dependent on the subnet timeout

2014-04-22 Thread Hefty, Sean
+static u8 cma_get_ib_subnet_timeout(struct rdma_cm_id *id) +{ + struct ib_port_attr attr; + int ret; + + ret = ib_query_port(id-device, id-port_num, attr); + return ret == 0 ? attr.subnet_timeout : 18; +} Can we query the port once (or only on a change) and cache the