{"action":"opened","issue":{"url":"https://api.github.com/repos/opencomputeproject/OCP-Networking-Project-Community-Contributions/issues/99","labels_url":"https://api.github.com/repos/opencomputeproject/OCP-Networking-Project-Community-Contributions/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/opencomputeproject/OCP-Networking-Project-Community-Contributions/issues/99/comments","events_url":"https://api.github.com/repos/opencomputeproject/OCP-Networking-Project-Community-Contributions/issues/99/events","html_url":"https://github.com/opencomputeproject/OCP-Networking-Project-Community-Contributions/issues/99","id":86142169,"number":99,"title":"sai_set_port_attribute_fn design intent is?","user":{"login":"nwumengfei","id":12796448,"avatar_url":"https://avatars.githubusercontent.com/u/12796448?v=3","gravatar_id":"","url":"https://api.github.com/users/nwumengfei","html_url":"https://github.com/nwumengfei","followers_url":"https://api.github.com/users/nwumengfei/followers","following_url":"https://api.github.com/users/nwumengfei/following{/other_user}","gists_url":"https://api.github.com/users/nwumengfei/gists{/gist_id}","starred_url":"https://api.github.com/users/nwumengfei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwumengfei/subscriptions","organizations_url":"https://api.github.com/users/nwumengfei/orgs","repos_url":"https://api.github.com/users/nwumengfei/repos","events_url":"https://api.github.com/users/nwumengfei/events{/privacy}","received_events_url":"https://api.github.com/users/nwumengfei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-08T11:43:56Z","updated_at":"2015-06-08T11:43:56Z","closed_at":null,"body":"In the design document \"Switch Abstraction Interface OCP 0 9\", sai_set_port_attribute_fn and correlated interface is designed as follow:\r\ntypedef sai_status_t (*sai_set_port_attribute_fn)(\r\n    _In_ sai_port_id_t port_id, \r\n    _In_ sai_port_attr_t attribute,\r\n    _In_ uint64_t value\r\n    );\r\n\r\ntypedef sai_status_t (*sai_get_port_attribute_fn)(\r\n    _In_ sai_port_id_t port_id,\r\n    _In_ sai_port_attr_t attribute,\r\n    _Out_ uint64_t* value\r\n    );\r\n\r\ntypedef struct _sai_port_api_t\r\n{\r\n    sai_set_port_attribute_fn       set_attribute;\r\n    sai_get_port_attribute_fn       get_attribute;\r\n    sai_ctl_port_stats_fn           ctl_stats;\r\n    sai_get_port_stats_fn           get_stats;\r\n} sai_port_api_t;\r\n\r\nCan we define it like this? If not,OCP's design intent is?\r\ntypedef sai_status_t (*sai_set_port_attribute_fn')(\r\n    _In_ sai_port_id_t port_id, \r\n    _In_ uint64_t value\r\n    );\r\n\r\ntypedef sai_status_t (*sai_get_port_attribute_fn')(\r\n    _In_ sai_port_id_t port_id,\r\n    _Out_ uint64_t* value\r\n    );\r\n\r\ntypedef struct _sai_port_api_t\r\n{\r\n    sai_set_port_attribute_fn'       set_attribute_speed;\r\n    sai_set_port_attribute_fn'       set_attribute_defaultvlan;\r\n    ...\r\n    sai_get_port_attribute_fn'       get_attribute_speed;\r\n    sai_get_port_attribute_fn'       get_attribute_defaultvlan;\r\n    ...\r\n    sai_ctl_port_stats_fn           ctl_stats;\r\n    sai_get_port_stats_fn           get_stats;\r\n} sai_port_api_t;"}}