Skip to contentSkip to conversation

rdma_connect() "timeout"

DISCUSSION Yann Droneaud 2 participants 4 messages Jul 18, 2012 3 messages not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

Hi,

Is there a way to setup the timeout in rdma_connect() ?

I'm testing something not really useful: to trigger connection error, I'm asking to connect to the network address or the broadcast address, for example 10.0.0.0/8 or 10.255.255.255/8.

I'm creating an RDMA_CM identifier for the RDMA_PS_TCP port space.

rdma_resolve_addr() is OK, I'm getting RDMA_CM_EVENT_ADDR_RESOLVED event.
rdma_resolve_route() is OK, I'm getting RDMA_CM_EVENT_ROUTE_RESOLVED event.
rdma_connect() is OK ... but I'm getting RDMA_CM_EVENT_UNREACHABLE event about 98 seconds after calling rdma_connect().

And 98 seconds is a bit longer than I expected.

Is there a way to change the CM parameters ? e.g. "Service Timeout" to wait for moving from "REP wait" state to "Timeout" state, and the number of send "REQ" retries (From 12.9.5 "Communication Establishement and Release - Active") ?

Is struct rdma_conn_param.retry_count the number of "REQ" retries ? According to the manpage, it seems it doesn't apply to CM.

Regards.

Signature · 8 lines
Yann Droneaud
OPTEYA


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1342624372.19395.35.camel-sQn2kEGNn0pFevvuwOF9vF6hYfS7NtTn@public.gmane.org

#2 lore raw

PiBJcyB0aGVyZSBhIHdheSB0byBzZXR1cCB0aGUgdGltZW91dCBpbiByZG1hX2Nvbm5lY3QoKSA/ DQoNCkZvciBJQiwgdGhlIHRpbWVvdXQgaXMgYmFzZWQgb24gdGhlIHBhY2tldCBsaWZldGltZSBp biB0aGUgcGF0aCByZWNvcmQgcmV0dXJuZWQgYnkgdGhlIFNBLiAgVGhlIHJkbWFfY20gd2lsbCBy ZXRyeSBhIENNIFJFUSB0aGUgbWF4aW11bSBudW1iZXIgb2YgdGltZXMgKDE1KS4NCiANCj4gSXMg dGhlcmUgYSB3YXkgdG8gY2hhbmdlIHRoZSBDTSBwYXJhbWV0ZXJzID8gZS5nLiAiU2VydmljZSBU aW1lb3V0IiB0bw0KPiB3YWl0IGZvciBtb3ZpbmcgZnJvbSAiUkVQIHdhaXQiIHN0YXRlIHRvICJU aW1lb3V0IiBzdGF0ZSwgYW5kIHRoZSBudW1iZXINCj4gb2Ygc2VuZCAiUkVRIiByZXRyaWVzIChG cm9tIDEyLjkuNSAiQ29tbXVuaWNhdGlvbiBFc3RhYmxpc2hlbWVudCBhbmQNCj4gUmVsZWFzZSAt IEFjdGl2ZSIpID8NCg0KVGhlcmUgaXMgbm8gZGlyZWN0IHdheSB0byBjaGFuZ2UgdGhlIHRpbWVv dXQgcGFyYW1ldGVyLiAgWW91IHdvdWxkIG5lZWQgdG8gYWRqdXN0IHRoZSBzdWJuZXQgdGltZW91 dCB2YWx1ZXMgYXQgdGhlIFNBLg0KIA0KPiBJcyBzdHJ1Y3QgcmRtYV9jb25uX3BhcmFtLnJldHJ5 X2NvdW50IHRoZSBudW1iZXIgb2YgIlJFUSIgcmV0cmllcyA/DQo+IEFjY29yZGluZyB0byB0aGUg bWFucGFnZSwgaXQgc2VlbXMgaXQgZG9lc24ndCBhcHBseSB0byBDTS4NCg0KVGhlIHJldHJ5X2Nv dW50IGFwcGxpZXMgdG8gdGhlIFFQIGFuZCBpcyBub3QgYXNzb2NpYXRlZCB3aXRoIHRoZSBDTSB0 aW1lb3V0LiAgSS5lLiBpdCBtYXBzIHRvIFJFUTpyZXRyeV9jb3VudCwgdmVyc3VzIFJFUTptYXhf Y21fcmV0cmllcy4NCg0KLSBTZWFuDQo=
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1828884A29C6694DAF28B7E6B8A8237346A6A5AA-P5GAC/[email protected]

#4 lore raw

Hi,

Quoted 5 lines · Sean
Quoted 1 line

Is there a way to setup the timeout in rdma_connect() ?

For IB, the timeout is based on the packet lifetime in the path record returned by the SA. The rdma_cm will retry a CM REQ the maximum number of times (15).

According to the OpenSM default configuration (/usr/sbin/opensm --create-config <config>) :

# The subnet_timeout code that will be set for all the ports # The actual timeout is 4.096usec * 2^<subnet_timeout> subnet_timeout 18

# The code of maximal time a packet can live in a switch # The actual time is 4.096usec * 2^<packet_life_time> # The value 0x14 disables this mechanism packet_life_time 0x12

Despite the notation, they are the same values.

It gives me:

4.096 * 10^-6 * 2^18 = 1.074 s

15 * subnet timeout / packet life time = 16.106 s ...

This is a lot less than 98 s.

Where does come the difference ?

Quoted 6 lines
Quoted 4 lines

Is there a way to change the CM parameters ? e.g. "Service Timeout" to wait for moving from "REP wait" state to "Timeout" state, and the number of send "REQ" retries (From 12.9.5 "Communication Establishement and Release - Active") ?

There is no direct way to change the timeout parameter. You would need to adjust the subnet timeout values at the SA.

Is it subnet_timeout or packet_life_time ?

Thanks for your answers.

Regards.

Signature · 8 lines
Yann Droneaud
OPTEYA


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1342631766.19395.48.camel-sQn2kEGNn0pFevvuwOF9vF6hYfS7NtTn@public.gmane.org

#6 lore raw

PiBBY2NvcmRpbmcgdG8gdGhlIE9wZW5TTSBkZWZhdWx0IGNvbmZpZ3VyYXRpb24gKC91c3Ivc2Jp bi9vcGVuc20NCj4gLS1jcmVhdGUtY29uZmlnIDxjb25maWc+KSA6DQo+IA0KPiAgICMgVGhlIHN1 Ym5ldF90aW1lb3V0IGNvZGUgdGhhdCB3aWxsIGJlIHNldCBmb3IgYWxsIHRoZSBwb3J0cw0KPiAg ICMgVGhlIGFjdHVhbCB0aW1lb3V0IGlzIDQuMDk2dXNlYyAqIDJePHN1Ym5ldF90aW1lb3V0Pg0K PiAgIHN1Ym5ldF90aW1lb3V0IDE4DQo+IA0KPiAgICMgVGhlIGNvZGUgb2YgbWF4aW1hbCB0aW1l IGEgcGFja2V0IGNhbiBsaXZlIGluIGEgc3dpdGNoDQo+ICAgIyBUaGUgYWN0dWFsIHRpbWUgaXMg NC4wOTZ1c2VjICogMl48cGFja2V0X2xpZmVfdGltZT4NCj4gICAjIFRoZSB2YWx1ZSAweDE0IGRp c2FibGVzIHRoaXMgbWVjaGFuaXNtDQo+ICAgcGFja2V0X2xpZmVfdGltZSAweDEyDQo+IA0KPiBE ZXNwaXRlIHRoZSBub3RhdGlvbiwgdGhleSBhcmUgdGhlIHNhbWUgdmFsdWVzLg0KPiANCj4gSXQg Z2l2ZXMgbWU6DQo+IA0KPiAgNC4wOTYgKiAxMF4tNiAqIDJeMTggPSAxLjA3NCBzDQo+IA0KPiAg MTUgKiBzdWJuZXQgdGltZW91dCAvIHBhY2tldCBsaWZlIHRpbWUgPSAxNi4xMDYgcyAuLi4NCj4g DQo+IFRoaXMgaXMgYSBsb3QgbGVzcyB0aGFuIDk4IHMuDQo+IA0KPiBXaGVyZSBkb2VzIGNvbWUg dGhlIGRpZmZlcmVuY2UgPw0KDQpUaGUgSUIgQ00gY2FsY3VsYXRlcyB0aGUgdGltZW91dCBhczoN Cg0KcGFja2V0IGxpZmV0aW1lICogMiArIHJlbW90ZSBjbSByZXNwb25zZSB0aW1lb3V0DQoNClRo ZSByZG1hX2NtIGhhcyBhIGhhcmQgY29kZWQgdmFsdWUgb2YgMjAgZm9yIHRoZSByZW1vdGUgY20g cmVzcG9uc2UgdGltZW91dCwgd2hpY2ggZW5kcyB1cCBhY2NvdW50aW5nIGZvciB0aGUgbWFqb3Jp dHkgb2YgdGhlIHRpbWUuLi4gOi8NCg==
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html