{"action":"created","comment":{"url":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments/29397457","id":29397457,"diff_hunk":"@@ -943,24 +968,30 @@ static int fi_ibv_getinfo(uint32_t version, const char *node, const char *servic\n {\n \tstruct rdma_cm_id *id;\n \tstruct rdma_addrinfo *rai;\n-\tstruct fi_info *fi;\n+\tstruct fi_info *fi, *_info;\n \tint ret;\n \n \tret = fi_ibv_init_info(hints);\n \tif (ret)\n \t\treturn ret;\n \n-\t/* TODO When multiple devices are present verbs_info would be list\n-\t * of info. In that case we have to choose the correct verbs_info to \n-\t * check against if we have a valid ibv_context in id->verbs */\n+\tassert(verbs_info);\n+\n \tret = fi_ibv_create_ep(node, service, flags, hints, &rai, &id);\n \tif (ret)\n \t\treturn ret;\n \n-\tassert(!id->verbs || !strcmp(verbs_info->domain_attr->name,\n-\t\t\t\t     ibv_get_device_name(id->verbs->device)));\n+\tif (id->verbs) {\n+\t\tfor (_info = verbs_info; _info; _info = _info->next) {\n+\t\t\tif (!strcmp(_info->domain_attr->name,\n+\t\t\t\tibv_get_device_name(id->verbs->device)))\n+\t\t\t\tbreak;\n+\t\t}\n+\t} else {\n+\t\t_info = verbs_info;\n+\t}","path":"prov/verbs/src/fi_verbs.c","position":192,"original_position":192,"commit_id":"a960238773a34891c9ec91036c010457e37a441e","original_commit_id":"a960238773a34891c9ec91036c010457e37a441e","user":{"login":"a-ilango","id":8547674,"avatar_url":"https://avatars.githubusercontent.com/u/8547674?v=3","gravatar_id":"","url":"https://api.github.com/users/a-ilango","html_url":"https://github.com/a-ilango","followers_url":"https://api.github.com/users/a-ilango/followers","following_url":"https://api.github.com/users/a-ilango/following{/other_user}","gists_url":"https://api.github.com/users/a-ilango/gists{/gist_id}","starred_url":"https://api.github.com/users/a-ilango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-ilango/subscriptions","organizations_url":"https://api.github.com/users/a-ilango/orgs","repos_url":"https://api.github.com/users/a-ilango/repos","events_url":"https://api.github.com/users/a-ilango/events{/privacy}","received_events_url":"https://api.github.com/users/a-ilango/received_events","type":"User","site_admin":false},"body":"But each of the fi_info structures in verbs_info would be associated with a device. The domain_attr->name would be set for each of them and all the attributes correspond to the device.","created_at":"2015-04-30T01:19:47Z","updated_at":"2015-04-30T01:19:47Z","html_url":"https://github.com/ofiwg/libfabric/pull/994#discussion_r29397457","pull_request_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/994","_links":{"self":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments/29397457"},"html":{"href":"https://github.com/ofiwg/libfabric/pull/994#discussion_r29397457"},"pull_request":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/994"}}},"pull_request":{"url":"https://api.github.com/repos/ofiwg/libfabric/pulls/994","id":34413394,"html_url":"https://github.com/ofiwg/libfabric/pull/994","diff_url":"https://github.com/ofiwg/libfabric/pull/994.diff","patch_url":"https://github.com/ofiwg/libfabric/pull/994.patch","issue_url":"https://api.github.com/repos/ofiwg/libfabric/issues/994","number":994,"state":"open","locked":false,"title":"prov/verbs: Add partial support for the case where multiple verbs device...","user":{"login":"a-ilango","id":8547674,"avatar_url":"https://avatars.githubusercontent.com/u/8547674?v=3","gravatar_id":"","url":"https://api.github.com/users/a-ilango","html_url":"https://github.com/a-ilango","followers_url":"https://api.github.com/users/a-ilango/followers","following_url":"https://api.github.com/users/a-ilango/following{/other_user}","gists_url":"https://api.github.com/users/a-ilango/gists{/gist_id}","starred_url":"https://api.github.com/users/a-ilango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-ilango/subscriptions","organizations_url":"https://api.github.com/users/a-ilango/orgs","repos_url":"https://api.github.com/users/a-ilango/repos","events_url":"https://api.github.com/users/a-ilango/events{/privacy}","received_events_url":"https://api.github.com/users/a-ilango/received_events","type":"User","site_admin":false},"body":"...s are present.\r\n\r\nWhen multiple verbs devices are available on a system, construct verbs_info list\r\nwhere each element corresponds to a device. If the node, service or hints provided\r\nby the app uniquely identifies a device, check the hints against matched fi_info.\r\n\r\nAdd domain_attr check in fi_domain and store matching info as part of fi_ibv_domain.\r\n\r\nIn fi_fabric, search through verbs_info to find matching fabric.\r\n\r\nSigned-off-by: Arun C Ilango <arun.ilango@intel.com>","created_at":"2015-04-29T22:40:47Z","updated_at":"2015-04-30T01:19:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1de619a8bc18335290fc334c825297ea1fb641f0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/994/commits","review_comments_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/994/comments","review_comment_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ofiwg/libfabric/issues/994/comments","statuses_url":"https://api.github.com/repos/ofiwg/libfabric/statuses/a960238773a34891c9ec91036c010457e37a441e","head":{"label":"a-ilango:dev","ref":"dev","sha":"a960238773a34891c9ec91036c010457e37a441e","user":{"login":"a-ilango","id":8547674,"avatar_url":"https://avatars.githubusercontent.com/u/8547674?v=3","gravatar_id":"","url":"https://api.github.com/users/a-ilango","html_url":"https://github.com/a-ilango","followers_url":"https://api.github.com/users/a-ilango/followers","following_url":"https://api.github.com/users/a-ilango/following{/other_user}","gists_url":"https://api.github.com/users/a-ilango/gists{/gist_id}","starred_url":"https://api.github.com/users/a-ilango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-ilango/subscriptions","organizations_url":"https://api.github.com/users/a-ilango/orgs","repos_url":"https://api.github.com/users/a-ilango/repos","events_url":"https://api.github.com/users/a-ilango/events{/privacy}","received_events_url":"https://api.github.com/users/a-ilango/received_events","type":"User","site_admin":false},"repo":{"id":24616163,"name":"libfabric","full_name":"a-ilango/libfabric","owner":{"login":"a-ilango","id":8547674,"avatar_url":"https://avatars.githubusercontent.com/u/8547674?v=3","gravatar_id":"","url":"https://api.github.com/users/a-ilango","html_url":"https://github.com/a-ilango","followers_url":"https://api.github.com/users/a-ilango/followers","following_url":"https://api.github.com/users/a-ilango/following{/other_user}","gists_url":"https://api.github.com/users/a-ilango/gists{/gist_id}","starred_url":"https://api.github.com/users/a-ilango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-ilango/subscriptions","organizations_url":"https://api.github.com/users/a-ilango/orgs","repos_url":"https://api.github.com/users/a-ilango/repos","events_url":"https://api.github.com/users/a-ilango/events{/privacy}","received_events_url":"https://api.github.com/users/a-ilango/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/a-ilango/libfabric","description":"Open Fabric Interfaces","fork":true,"url":"https://api.github.com/repos/a-ilango/libfabric","forks_url":"https://api.github.com/repos/a-ilango/libfabric/forks","keys_url":"https://api.github.com/repos/a-ilango/libfabric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/a-ilango/libfabric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/a-ilango/libfabric/teams","hooks_url":"https://api.github.com/repos/a-ilango/libfabric/hooks","issue_events_url":"https://api.github.com/repos/a-ilango/libfabric/issues/events{/number}","events_url":"https://api.github.com/repos/a-ilango/libfabric/events","assignees_url":"https://api.github.com/repos/a-ilango/libfabric/assignees{/user}","branches_url":"https://api.github.com/repos/a-ilango/libfabric/branches{/branch}","tags_url":"https://api.github.com/repos/a-ilango/libfabric/tags","blobs_url":"https://api.github.com/repos/a-ilango/libfabric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/a-ilango/libfabric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/a-ilango/libfabric/git/refs{/sha}","trees_url":"https://api.github.com/repos/a-ilango/libfabric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/a-ilango/libfabric/statuses/{sha}","languages_url":"https://api.github.com/repos/a-ilango/libfabric/languages","stargazers_url":"https://api.github.com/repos/a-ilango/libfabric/stargazers","contributors_url":"https://api.github.com/repos/a-ilango/libfabric/contributors","subscribers_url":"https://api.github.com/repos/a-ilango/libfabric/subscribers","subscription_url":"https://api.github.com/repos/a-ilango/libfabric/subscription","commits_url":"https://api.github.com/repos/a-ilango/libfabric/commits{/sha}","git_commits_url":"https://api.github.com/repos/a-ilango/libfabric/git/commits{/sha}","comments_url":"https://api.github.com/repos/a-ilango/libfabric/comments{/number}","issue_comment_url":"https://api.github.com/repos/a-ilango/libfabric/issues/comments{/number}","contents_url":"https://api.github.com/repos/a-ilango/libfabric/contents/{+path}","compare_url":"https://api.github.com/repos/a-ilango/libfabric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/a-ilango/libfabric/merges","archive_url":"https://api.github.com/repos/a-ilango/libfabric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/a-ilango/libfabric/downloads","issues_url":"https://api.github.com/repos/a-ilango/libfabric/issues{/number}","pulls_url":"https://api.github.com/repos/a-ilango/libfabric/pulls{/number}","milestones_url":"https://api.github.com/repos/a-ilango/libfabric/milestones{/number}","notifications_url":"https://api.github.com/repos/a-ilango/libfabric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/a-ilango/libfabric/labels{/name}","releases_url":"https://api.github.com/repos/a-ilango/libfabric/releases{/id}","created_at":"2014-09-29T22:57:04Z","updated_at":"2015-04-29T22:50:48Z","pushed_at":"2015-04-29T22:54:11Z","git_url":"git://github.com/a-ilango/libfabric.git","ssh_url":"git@github.com:a-ilango/libfabric.git","clone_url":"https://github.com/a-ilango/libfabric.git","svn_url":"https://github.com/a-ilango/libfabric","homepage":null,"size":5834,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ofiwg:master","ref":"master","sha":"d4ab6e56e23124e565ada939054a159737e52102","user":{"login":"ofiwg","id":8459445,"avatar_url":"https://avatars.githubusercontent.com/u/8459445?v=3","gravatar_id":"","url":"https://api.github.com/users/ofiwg","html_url":"https://github.com/ofiwg","followers_url":"https://api.github.com/users/ofiwg/followers","following_url":"https://api.github.com/users/ofiwg/following{/other_user}","gists_url":"https://api.github.com/users/ofiwg/gists{/gist_id}","starred_url":"https://api.github.com/users/ofiwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofiwg/subscriptions","organizations_url":"https://api.github.com/users/ofiwg/orgs","repos_url":"https://api.github.com/users/ofiwg/repos","events_url":"https://api.github.com/users/ofiwg/events{/privacy}","received_events_url":"https://api.github.com/users/ofiwg/received_events","type":"Organization","site_admin":false},"repo":{"id":22996097,"name":"libfabric","full_name":"ofiwg/libfabric","owner":{"login":"ofiwg","id":8459445,"avatar_url":"https://avatars.githubusercontent.com/u/8459445?v=3","gravatar_id":"","url":"https://api.github.com/users/ofiwg","html_url":"https://github.com/ofiwg","followers_url":"https://api.github.com/users/ofiwg/followers","following_url":"https://api.github.com/users/ofiwg/following{/other_user}","gists_url":"https://api.github.com/users/ofiwg/gists{/gist_id}","starred_url":"https://api.github.com/users/ofiwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofiwg/subscriptions","organizations_url":"https://api.github.com/users/ofiwg/orgs","repos_url":"https://api.github.com/users/ofiwg/repos","events_url":"https://api.github.com/users/ofiwg/events{/privacy}","received_events_url":"https://api.github.com/users/ofiwg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ofiwg/libfabric","description":"Open Fabric Interfaces","fork":false,"url":"https://api.github.com/repos/ofiwg/libfabric","forks_url":"https://api.github.com/repos/ofiwg/libfabric/forks","keys_url":"https://api.github.com/repos/ofiwg/libfabric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ofiwg/libfabric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ofiwg/libfabric/teams","hooks_url":"https://api.github.com/repos/ofiwg/libfabric/hooks","issue_events_url":"https://api.github.com/repos/ofiwg/libfabric/issues/events{/number}","events_url":"https://api.github.com/repos/ofiwg/libfabric/events","assignees_url":"https://api.github.com/repos/ofiwg/libfabric/assignees{/user}","branches_url":"https://api.github.com/repos/ofiwg/libfabric/branches{/branch}","tags_url":"https://api.github.com/repos/ofiwg/libfabric/tags","blobs_url":"https://api.github.com/repos/ofiwg/libfabric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ofiwg/libfabric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ofiwg/libfabric/git/refs{/sha}","trees_url":"https://api.github.com/repos/ofiwg/libfabric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ofiwg/libfabric/statuses/{sha}","languages_url":"https://api.github.com/repos/ofiwg/libfabric/languages","stargazers_url":"https://api.github.com/repos/ofiwg/libfabric/stargazers","contributors_url":"https://api.github.com/repos/ofiwg/libfabric/contributors","subscribers_url":"https://api.github.com/repos/ofiwg/libfabric/subscribers","subscription_url":"https://api.github.com/repos/ofiwg/libfabric/subscription","commits_url":"https://api.github.com/repos/ofiwg/libfabric/commits{/sha}","git_commits_url":"https://api.github.com/repos/ofiwg/libfabric/git/commits{/sha}","comments_url":"https://api.github.com/repos/ofiwg/libfabric/comments{/number}","issue_comment_url":"https://api.github.com/repos/ofiwg/libfabric/issues/comments{/number}","contents_url":"https://api.github.com/repos/ofiwg/libfabric/contents/{+path}","compare_url":"https://api.github.com/repos/ofiwg/libfabric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ofiwg/libfabric/merges","archive_url":"https://api.github.com/repos/ofiwg/libfabric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ofiwg/libfabric/downloads","issues_url":"https://api.github.com/repos/ofiwg/libfabric/issues{/number}","pulls_url":"https://api.github.com/repos/ofiwg/libfabric/pulls{/number}","milestones_url":"https://api.github.com/repos/ofiwg/libfabric/milestones{/number}","notifications_url":"https://api.github.com/repos/ofiwg/libfabric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ofiwg/libfabric/labels{/name}","releases_url":"https://api.github.com/repos/ofiwg/libfabric/releases{/id}","created_at":"2014-08-15T16:45:53Z","updated_at":"2015-04-30T00:27:01Z","pushed_at":"2015-04-30T00:27:01Z","git_url":"git://github.com/ofiwg/libfabric.git","ssh_url":"git@github.com:ofiwg/libfabric.git","clone_url":"https://github.com/ofiwg/libfabric.git","svn_url":"https://github.com/ofiwg/libfabric","homepage":"http://ofiwg.github.io/libfabric/","size":14341,"stargazers_count":29,"watchers_count":29,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":34,"mirror_url":null,"open_issues_count":52,"forks":34,"open_issues":52,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/994"},"html":{"href":"https://github.com/ofiwg/libfabric/pull/994"},"issue":{"href":"https://api.github.com/repos/ofiwg/libfabric/issues/994"},"comments":{"href":"https://api.github.com/repos/ofiwg/libfabric/issues/994/comments"},"review_comments":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/994/comments"},"review_comment":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/994/commits"},"statuses":{"href":"https://api.github.com/repos/ofiwg/libfabric/statuses/a960238773a34891c9ec91036c010457e37a441e"}}}}