{"action":"created","issue":{"url":"https://api.github.com/repos/ofiwg/libfabric/issues/2188","repository_url":"https://api.github.com/repos/ofiwg/libfabric","labels_url":"https://api.github.com/repos/ofiwg/libfabric/issues/2188/labels{/name}","comments_url":"https://api.github.com/repos/ofiwg/libfabric/issues/2188/comments","events_url":"https://api.github.com/repos/ofiwg/libfabric/issues/2188/events","html_url":"https://github.com/ofiwg/libfabric/issues/2188","id":164378918,"number":2188,"title":"fi_getname and fi_enable documentation problem","user":{"login":"hppritcha","id":7818666,"avatar_url":"https://avatars.githubusercontent.com/u/7818666?v=3","gravatar_id":"","url":"https://api.github.com/users/hppritcha","html_url":"https://github.com/hppritcha","followers_url":"https://api.github.com/users/hppritcha/followers","following_url":"https://api.github.com/users/hppritcha/following{/other_user}","gists_url":"https://api.github.com/users/hppritcha/gists{/gist_id}","starred_url":"https://api.github.com/users/hppritcha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hppritcha/subscriptions","organizations_url":"https://api.github.com/users/hppritcha/orgs","repos_url":"https://api.github.com/users/hppritcha/repos","events_url":"https://api.github.com/users/hppritcha/events{/privacy}","received_events_url":"https://api.github.com/users/hppritcha/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ofiwg/libfabric/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ofiwg/libfabric/labels/documentation","name":"documentation","color":"0e8a16"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-07T18:40:56Z","updated_at":"2016-07-08T21:59:55Z","closed_at":null,"body":"A newbie to libfabric (as a consumer) has been trying to follow the guidance  in the libfabric documentation at \r\n\r\nhttp://www.slideshare.net/JianxinXiong/getting-started-with-libfabric\r\n\r\nand has found some problems.  First on page 8 of the document there is a hardwired struct used for sizing the buffer to be passed to ```fi_getname```, rather than showing the correct usage of ```fi_getname``` - first call with NULL buffer and ```addrlen``` set to zero, then use the returned value in ```addrlen```.  If the user uses the code snippet in the document, it may or may not work for a given provider.\r\n\r\nA more sublte problem is the fact that the document doesn't point out that ```fi_getname``` cannot be used prior to a call to ```fi_enable```.    The way the document is structured, it would seem that ```fi_enable``` is the last thing to be done prior to using the endpoint for communication.  \r\n\r\nNote the ```fi_cm``` man page does point out that ```fi_getname``` should only be invoked after an EP has been enabled."},"comment":{"url":"https://api.github.com/repos/ofiwg/libfabric/issues/comments/231483129","html_url":"https://github.com/ofiwg/libfabric/issues/2188#issuecomment-231483129","issue_url":"https://api.github.com/repos/ofiwg/libfabric/issues/2188","id":231483129,"user":{"login":"j-xiong","id":8517165,"avatar_url":"https://avatars.githubusercontent.com/u/8517165?v=3","gravatar_id":"","url":"https://api.github.com/users/j-xiong","html_url":"https://github.com/j-xiong","followers_url":"https://api.github.com/users/j-xiong/followers","following_url":"https://api.github.com/users/j-xiong/following{/other_user}","gists_url":"https://api.github.com/users/j-xiong/gists{/gist_id}","starred_url":"https://api.github.com/users/j-xiong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-xiong/subscriptions","organizations_url":"https://api.github.com/users/j-xiong/orgs","repos_url":"https://api.github.com/users/j-xiong/repos","events_url":"https://api.github.com/users/j-xiong/events{/privacy}","received_events_url":"https://api.github.com/users/j-xiong/received_events","type":"User","site_admin":false},"created_at":"2016-07-08T21:59:55Z","updated_at":"2016-07-08T21:59:55Z","body":"@hppritcha The guide has been updated. \r\n@jithinjosepkl My understanding is that the provider should only fail fi_getname when it can't provide the information. But from the user's point of view, fi_getname is only supposed to be called after the endpoint is enabled (for active endpoint) or fi_setname is called (for passive endpoint)."}}
{"actor":{"display_login":"j-xiong"}}