{"action":"created","comment":{"url":"https://api.github.com/repos/linux-rdma/infiniband-diags/pulls/comments/174239943","pull_request_review_id":103559816,"id":174239943,"diff_hunk":"@@ -825,57 +867,83 @@ int main(int argc, char **argv)\n \n \tnode_name_map = open_node_name_map(node_name_map_file);\n \n-\tif (resolve_portid_str(ibd_ca, ibd_ca_port, &src_portid, argv[0],\n+\twhile (srcid[0] != '\\0' && dstid != '\\0') {\n+\n+\t\tif (resolve_portid_str(ibd_ca, ibd_ca_port, &src_portid, srcid,\n \t\t\t       ibd_dest_type, ibd_sm_id, srcport) < 0)\n-\t\tIBEXIT(\"can't resolve source port %s\", argv[0]);\n+\t\t\tIBEXIT(\"can't resolve source port %s\", argv[0]);\n \n-\tif (resolve_portid_str(ibd_ca, ibd_ca_port, &dest_portid, argv[1],\n+\t\tif (resolve_portid_str(ibd_ca, ibd_ca_port, &dest_portid, dstid,\n \t\t\t       ibd_dest_type, ibd_sm_id, srcport) < 0)\n-\t\tIBEXIT(\"can't resolve destination port %s\", argv[1]);\n-\n-\tif (ibd_dest_type == IB_DEST_DRPATH) {\n-\t\tif (resolve_lid(&src_portid, NULL) < 0)\n-\t\t\tIBEXIT(\"cannot resolve lid for port \\'%s\\'\",\n-\t\t\t\tportid2str(&src_portid));\n-\t\tif (resolve_lid(&dest_portid, NULL) < 0)\n-\t\t\tIBEXIT(\"cannot resolve lid for port \\'%s\\'\",\n-\t\t\t\tportid2str(&dest_portid));\n-\t}\n+\t\t\tIBEXIT(\"can't resolve destination port %s\", argv[1]);\n+\n+\t\tif (ibd_dest_type == IB_DEST_DRPATH) {\n+\t\t\tif (resolve_lid(&src_portid, NULL) < 0)\n+\t\t\t\tIBEXIT(\"cannot resolve lid for port \\'%s\\'\",\n+\t\t\t\t\tportid2str(&src_portid));\n+\t\t\tif (resolve_lid(&dest_portid, NULL) < 0)\n+\t\t\t\tIBEXIT(\"cannot resolve lid for port \\'%s\\'\",\n+\t\t\t\t\tportid2str(&dest_portid));\n+\t\t}\n \n-\tif (dest_portid.lid == 0 || src_portid.lid == 0) {\n-\t\tIBWARN(\"bad src/dest lid\");\n-\t\tibdiag_show_usage();\n-\t}\n+\t\tif (dest_portid.lid == 0 || src_portid.lid == 0) {\n+\t\t\tIBWARN(\"bad src/dest lid\");\n+\t\t\tibdiag_show_usage();\n+\t\t}\n \n-\tif (ibd_dest_type != IB_DEST_DRPATH) {\n-\t\t/* first find a direct path to the src port */\n-\t\tif (find_route(&my_portid, &src_portid, 0) < 0)\n-\t\t\tIBEXIT(\"can't find a route to the src port\");\n+\t\tif (ibd_dest_type != IB_DEST_DRPATH) {\n+\t\t\t/* first find a direct path to the src port */\n+\t\t\tif (find_route(&my_portid, &src_portid, 0) < 0)\n+\t\t\t\tIBEXIT(\"can't find a route to the src port\");\n \n-\t\tsrc_portid = my_portid;\n-\t}\n+\t\t\tsrc_portid = my_portid;\n+\t\t}\n \n-\tif (!multicast) {\n-\t\tif (find_route(&src_portid, &dest_portid, dumplevel) < 0)\n-\t\t\tIBEXIT(\"can't find a route from src to dest\");\n-\t\texit(0);\n-\t} else {\n-\t\tif (mlid < 0xc000)\n-\t\t\tIBWARN(\"invalid MLID; must be 0xc000 or larger\");\n-\t}\n+\t\tif (!multicast) {\n+\t\t\tif (find_route(&src_portid, &dest_portid, dumplevel) < 0)\n+\t\t\t\tIBEXIT(\"can't find a route from src to dest\");\n+\t\t} else {\n+\t\t\tif (mlid < 0xc000)\n+\t\t\t\tIBWARN(\"invalid MLID; must be 0xc000 or larger\");\n \n-\tif (!(target_portguid = find_target_portguid(&dest_portid)))\n-\t\tIBEXIT(\"can't reach target lid %d\", dest_portid.lid);\n+\t\t\tif (!(target_portguid = find_target_portguid(&dest_portid)))\n+\t\t\t\tIBEXIT(\"can't reach target lid %d\", dest_portid.lid);\n \n-\tif (!(endnode = find_mcpath(&src_portid, mlid)))\n-\t\tIBEXIT(\"can't find a multicast route from src to dest\");\n+\t\t\tif (!(endnode = find_mcpath(&src_portid, mlid)))\n+\t\t\t\tIBEXIT(\"can't find a multicast route from src to dest\");\n \n-\t/* dump multicast path */\n-\tdump_mcpath(endnode, dumplevel);\n+\t\t\t/* dump multicast path */\n+\t\t\tdump_mcpath(endnode, dumplevel);\n+\t\t}\n \n+\t\tif (ports_fd) {\n+\t\t\tmy_portid.drpath.cnt = 0;\n+\t\t\tsrc_portid.drpath.cnt = 0;\n+     \t   \t\tif (fgets(ports_buffer, sizeof(ports_buffer), ports_fd)) {\n+\t\t\t\tnum_port_pairs++;\n+                \t\tif ( sscanf(ports_buffer, \"%s %s\", srcid, dstid) != 2 ) ","path":"src/ibtracert.c","position":177,"original_position":177,"commit_id":"68d19129f83d35afd5688e6b920991ea97fd2545","original_commit_id":"68d19129f83d35afd5688e6b920991ea97fd2545","user":{"login":"skcoulter","id":1141436,"avatar_url":"https://avatars2.githubusercontent.com/u/1141436?v=4","gravatar_id":"","url":"https://api.github.com/users/skcoulter","html_url":"https://github.com/skcoulter","followers_url":"https://api.github.com/users/skcoulter/followers","following_url":"https://api.github.com/users/skcoulter/following{/other_user}","gists_url":"https://api.github.com/users/skcoulter/gists{/gist_id}","starred_url":"https://api.github.com/users/skcoulter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skcoulter/subscriptions","organizations_url":"https://api.github.com/users/skcoulter/orgs","repos_url":"https://api.github.com/users/skcoulter/repos","events_url":"https://api.github.com/users/skcoulter/events{/privacy}","received_events_url":"https://api.github.com/users/skcoulter/received_events","type":"User","site_admin":false},"body":"ditto other tab comment\r\n","created_at":"2018-03-13T18:31:03Z","updated_at":"2018-03-13T18:31:03Z","html_url":"https://github.com/linux-rdma/infiniband-diags/pull/5#discussion_r174239943","pull_request_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/pulls/5","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/linux-rdma/infiniband-diags/pulls/comments/174239943"},"html":{"href":"https://github.com/linux-rdma/infiniband-diags/pull/5#discussion_r174239943"},"pull_request":{"href":"https://api.github.com/repos/linux-rdma/infiniband-diags/pulls/5"}},"in_reply_to_id":173621736},"pull_request":{"url":"https://api.github.com/repos/linux-rdma/infiniband-diags/pulls/5","id":174087413,"html_url":"https://github.com/linux-rdma/infiniband-diags/pull/5","diff_url":"https://github.com/linux-rdma/infiniband-diags/pull/5.diff","patch_url":"https://github.com/linux-rdma/infiniband-diags/pull/5.patch","issue_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/issues/5","number":5,"state":"open","locked":false,"title":"Allow specificaiton of a file that contains several src/dst pairs.","user":{"login":"skcoulter","id":1141436,"avatar_url":"https://avatars2.githubusercontent.com/u/1141436?v=4","gravatar_id":"","url":"https://api.github.com/users/skcoulter","html_url":"https://github.com/skcoulter","followers_url":"https://api.github.com/users/skcoulter/followers","following_url":"https://api.github.com/users/skcoulter/following{/other_user}","gists_url":"https://api.github.com/users/skcoulter/gists{/gist_id}","starred_url":"https://api.github.com/users/skcoulter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skcoulter/subscriptions","organizations_url":"https://api.github.com/users/skcoulter/orgs","repos_url":"https://api.github.com/users/skcoulter/repos","events_url":"https://api.github.com/users/skcoulter/events{/privacy}","received_events_url":"https://api.github.com/users/skcoulter/received_events","type":"User","site_admin":false},"body":"These can be lids or guids, in non-sequential order.\r\nThe use case is allowing the creation of large route maps in a significantly shorter period of time.\r\nTesting a route map for n=128 ports, (n*(n-1)) = 16256 distinct routes , resulted in almost 7x speed up.\r\n\r\nSigned-off-by: Susan K. Coulter <markus@wf-fe1.lanl.gov>","created_at":"2018-03-09T19:24:11Z","updated_at":"2018-03-13T18:31:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"324a401c6551cf181874515c871bccc06fe571d9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/pulls/5/commits","review_comments_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/pulls/5/comments","review_comment_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/issues/5/comments","statuses_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/statuses/68d19129f83d35afd5688e6b920991ea97fd2545","head":{"label":"skcoulter:master","ref":"master","sha":"68d19129f83d35afd5688e6b920991ea97fd2545","user":{"login":"skcoulter","id":1141436,"avatar_url":"https://avatars2.githubusercontent.com/u/1141436?v=4","gravatar_id":"","url":"https://api.github.com/users/skcoulter","html_url":"https://github.com/skcoulter","followers_url":"https://api.github.com/users/skcoulter/followers","following_url":"https://api.github.com/users/skcoulter/following{/other_user}","gists_url":"https://api.github.com/users/skcoulter/gists{/gist_id}","starred_url":"https://api.github.com/users/skcoulter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skcoulter/subscriptions","organizations_url":"https://api.github.com/users/skcoulter/orgs","repos_url":"https://api.github.com/users/skcoulter/repos","events_url":"https://api.github.com/users/skcoulter/events{/privacy}","received_events_url":"https://api.github.com/users/skcoulter/received_events","type":"User","site_admin":false},"repo":{"id":119729016,"name":"infiniband-diags","full_name":"skcoulter/infiniband-diags","owner":{"login":"skcoulter","id":1141436,"avatar_url":"https://avatars2.githubusercontent.com/u/1141436?v=4","gravatar_id":"","url":"https://api.github.com/users/skcoulter","html_url":"https://github.com/skcoulter","followers_url":"https://api.github.com/users/skcoulter/followers","following_url":"https://api.github.com/users/skcoulter/following{/other_user}","gists_url":"https://api.github.com/users/skcoulter/gists{/gist_id}","starred_url":"https://api.github.com/users/skcoulter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skcoulter/subscriptions","organizations_url":"https://api.github.com/users/skcoulter/orgs","repos_url":"https://api.github.com/users/skcoulter/repos","events_url":"https://api.github.com/users/skcoulter/events{/privacy}","received_events_url":"https://api.github.com/users/skcoulter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skcoulter/infiniband-diags","description":null,"fork":true,"url":"https://api.github.com/repos/skcoulter/infiniband-diags","forks_url":"https://api.github.com/repos/skcoulter/infiniband-diags/forks","keys_url":"https://api.github.com/repos/skcoulter/infiniband-diags/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skcoulter/infiniband-diags/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skcoulter/infiniband-diags/teams","hooks_url":"https://api.github.com/repos/skcoulter/infiniband-diags/hooks","issue_events_url":"https://api.github.com/repos/skcoulter/infiniband-diags/issues/events{/number}","events_url":"https://api.github.com/repos/skcoulter/infiniband-diags/events","assignees_url":"https://api.github.com/repos/skcoulter/infiniband-diags/assignees{/user}","branches_url":"https://api.github.com/repos/skcoulter/infiniband-diags/branches{/branch}","tags_url":"https://api.github.com/repos/skcoulter/infiniband-diags/tags","blobs_url":"https://api.github.com/repos/skcoulter/infiniband-diags/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skcoulter/infiniband-diags/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skcoulter/infiniband-diags/git/refs{/sha}","trees_url":"https://api.github.com/repos/skcoulter/infiniband-diags/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skcoulter/infiniband-diags/statuses/{sha}","languages_url":"https://api.github.com/repos/skcoulter/infiniband-diags/languages","stargazers_url":"https://api.github.com/repos/skcoulter/infiniband-diags/stargazers","contributors_url":"https://api.github.com/repos/skcoulter/infiniband-diags/contributors","subscribers_url":"https://api.github.com/repos/skcoulter/infiniband-diags/subscribers","subscription_url":"https://api.github.com/repos/skcoulter/infiniband-diags/subscription","commits_url":"https://api.github.com/repos/skcoulter/infiniband-diags/commits{/sha}","git_commits_url":"https://api.github.com/repos/skcoulter/infiniband-diags/git/commits{/sha}","comments_url":"https://api.github.com/repos/skcoulter/infiniband-diags/comments{/number}","issue_comment_url":"https://api.github.com/repos/skcoulter/infiniband-diags/issues/comments{/number}","contents_url":"https://api.github.com/repos/skcoulter/infiniband-diags/contents/{+path}","compare_url":"https://api.github.com/repos/skcoulter/infiniband-diags/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skcoulter/infiniband-diags/merges","archive_url":"https://api.github.com/repos/skcoulter/infiniband-diags/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skcoulter/infiniband-diags/downloads","issues_url":"https://api.github.com/repos/skcoulter/infiniband-diags/issues{/number}","pulls_url":"https://api.github.com/repos/skcoulter/infiniband-diags/pulls{/number}","milestones_url":"https://api.github.com/repos/skcoulter/infiniband-diags/milestones{/number}","notifications_url":"https://api.github.com/repos/skcoulter/infiniband-diags/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skcoulter/infiniband-diags/labels{/name}","releases_url":"https://api.github.com/repos/skcoulter/infiniband-diags/releases{/id}","deployments_url":"https://api.github.com/repos/skcoulter/infiniband-diags/deployments","created_at":"2018-01-31T18:51:52Z","updated_at":"2018-01-31T18:51:54Z","pushed_at":"2018-02-16T20:21:55Z","git_url":"git://github.com/skcoulter/infiniband-diags.git","ssh_url":"git@github.com:skcoulter/infiniband-diags.git","clone_url":"https://github.com/skcoulter/infiniband-diags.git","svn_url":"https://github.com/skcoulter/infiniband-diags","homepage":null,"size":1566,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"linux-rdma:master","ref":"master","sha":"5b5642437afee6b7d51c82b464b40bcde1a60371","user":{"login":"linux-rdma","id":22179970,"avatar_url":"https://avatars1.githubusercontent.com/u/22179970?v=4","gravatar_id":"","url":"https://api.github.com/users/linux-rdma","html_url":"https://github.com/linux-rdma","followers_url":"https://api.github.com/users/linux-rdma/followers","following_url":"https://api.github.com/users/linux-rdma/following{/other_user}","gists_url":"https://api.github.com/users/linux-rdma/gists{/gist_id}","starred_url":"https://api.github.com/users/linux-rdma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linux-rdma/subscriptions","organizations_url":"https://api.github.com/users/linux-rdma/orgs","repos_url":"https://api.github.com/users/linux-rdma/repos","events_url":"https://api.github.com/users/linux-rdma/events{/privacy}","received_events_url":"https://api.github.com/users/linux-rdma/received_events","type":"Organization","site_admin":false},"repo":{"id":91368169,"name":"infiniband-diags","full_name":"linux-rdma/infiniband-diags","owner":{"login":"linux-rdma","id":22179970,"avatar_url":"https://avatars1.githubusercontent.com/u/22179970?v=4","gravatar_id":"","url":"https://api.github.com/users/linux-rdma","html_url":"https://github.com/linux-rdma","followers_url":"https://api.github.com/users/linux-rdma/followers","following_url":"https://api.github.com/users/linux-rdma/following{/other_user}","gists_url":"https://api.github.com/users/linux-rdma/gists{/gist_id}","starred_url":"https://api.github.com/users/linux-rdma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linux-rdma/subscriptions","organizations_url":"https://api.github.com/users/linux-rdma/orgs","repos_url":"https://api.github.com/users/linux-rdma/repos","events_url":"https://api.github.com/users/linux-rdma/events{/privacy}","received_events_url":"https://api.github.com/users/linux-rdma/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linux-rdma/infiniband-diags","description":null,"fork":false,"url":"https://api.github.com/repos/linux-rdma/infiniband-diags","forks_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/forks","keys_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/teams","hooks_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/hooks","issue_events_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/issues/events{/number}","events_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/events","assignees_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/assignees{/user}","branches_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/branches{/branch}","tags_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/tags","blobs_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/git/refs{/sha}","trees_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/statuses/{sha}","languages_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/languages","stargazers_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/stargazers","contributors_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/contributors","subscribers_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/subscribers","subscription_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/subscription","commits_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/commits{/sha}","git_commits_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/git/commits{/sha}","comments_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/comments{/number}","issue_comment_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/issues/comments{/number}","contents_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/contents/{+path}","compare_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/merges","archive_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/downloads","issues_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/issues{/number}","pulls_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/pulls{/number}","milestones_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/milestones{/number}","notifications_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/labels{/name}","releases_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/releases{/id}","deployments_url":"https://api.github.com/repos/linux-rdma/infiniband-diags/deployments","created_at":"2017-05-15T17:57:34Z","updated_at":"2017-12-06T06:57:11Z","pushed_at":"2018-03-09T19:24:12Z","git_url":"git://github.com/linux-rdma/infiniband-diags.git","ssh_url":"git@github.com:linux-rdma/infiniband-diags.git","clone_url":"https://github.com/linux-rdma/infiniband-diags.git","svn_url":"https://github.com/linux-rdma/infiniband-diags","homepage":null,"size":1550,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linux-rdma/infiniband-diags/pulls/5"},"html":{"href":"https://github.com/linux-rdma/infiniband-diags/pull/5"},"issue":{"href":"https://api.github.com/repos/linux-rdma/infiniband-diags/issues/5"},"comments":{"href":"https://api.github.com/repos/linux-rdma/infiniband-diags/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/linux-rdma/infiniband-diags/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/linux-rdma/infiniband-diags/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linux-rdma/infiniband-diags/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/linux-rdma/infiniband-diags/statuses/68d19129f83d35afd5688e6b920991ea97fd2545"}},"author_association":"NONE"}}
{"actor":{"display_login":"skcoulter"}}