{"action":"created","comment":{"url":"https://api.github.com/repos/Linaro/odp/pulls/comments/184921647","pull_request_review_id":116209101,"id":184921647,"diff_hunk":"@@ -186,6 +196,121 @@ static int worker_thread(void *arg)\n \treturn 0;\n }\n \n+static int worker_thread_timers(void *arg)\n+{\n+\todp_event_t ev[BURST_SIZE];\n+\tint num, sent, drop, out, tmos, i, src_pktio, src_queue;\n+\todp_pktout_queue_t pktout;\n+\todp_queue_t queue;\n+\tqueue_context_t *queue_context;\n+\todp_timer_t timer;\n+\todp_timer_set_t ret;\n+\tworker_arg_t *worker_arg = arg;\n+\ttest_global_t *test_global = worker_arg->test_global_ptr;\n+\tint worker_id = worker_arg->worker_id;\n+\tuint32_t polls = 0;\n+\tuint64_t tick = test_global->timer.timeout_tick;\n+\n+\tprintf(\"Worker (timers) %i started\\n\", worker_id);\n+\n+\t/* Wait for other workers to start */\n+\todp_barrier_wait(&test_global->worker_start);\n+\n+\twhile (1) {\n+\t\todp_packet_t pkt[BURST_SIZE];\n+\n+\t\tnum = odp_schedule_multi(&queue, ODP_SCHED_NO_WAIT,\n+\t\t\t\t\t ev, BURST_SIZE);\n+\n+\t\tpolls++;\n+\n+\t\tif (polls == CHECK_PERIOD) {\n+\t\t\tpolls = 0;\n+\t\t\tif (test_global->stop_workers)\n+\t\t\t\tbreak;\n+\t\t}\n+\n+\t\tif (num <= 0)\n+\t\t\tcontinue;\n+\n+\t\ttmos = 0;\n+\t\tqueue_context = odp_queue_context(queue);\n+\t\tsrc_pktio = queue_context->src_pktio;\n+\t\tsrc_queue = queue_context->src_queue;\n+\t\ttimer = test_global->timer.timer[src_pktio][src_queue];\n+\n+\t\tfor (i = 0; i < num; i++) {\n+\t\t\tif (odp_unlikely(odp_event_type(ev[i]) ==\n+\t\t\t\t\t ODP_EVENT_TIMEOUT)) {\n+\t\t\t\ttmos++;\n+\t\t\t\tret = odp_timer_set_rel(timer, tick, &ev[i]);\n+\n+\t\t\t\tif (ret != ODP_TIMER_SUCCESS) {\n+\t\t\t\t\t/* Such never happen */\n+\t\t\t\t\tprintf(\"Expired timer reset failed\\n\");\n+\t\t\t\t\todp_event_free(ev[i]);\n+\t\t\t\t}\n+\n+\t\t\t\tif (tmos > 1) {\n+\t\t\t\t\t/* Such never happen */\n+\t\t\t\t\tprintf(\"Too many timeouts\\n\");\n+\t\t\t\t}\n+\t\t\t} else {\n+\t\t\t\tpkt[i - tmos] = odp_packet_from_event(ev[i]);\n+\t\t\t}\n+\t\t}\n+\n+\t\tif (tmos == 0) {\n+\t\t\t/* Reset timer with existing timeout event */\n+\t\t\tret = odp_timer_set_rel(timer, tick, NULL);\n+\n+\t\t\tif (ret != ODP_TIMER_SUCCESS &&\n+\t\t\t    ret != ODP_TIMER_TOOEARLY) {\n+\t\t\t\t/* Such never happen. Reset should either","path":"test/performance/odp_sched_pktio.c","position":null,"original_position":100,"commit_id":"a44c237f4adefab958611e5233aa3da45adb9701","original_commit_id":"996c57eff8adc1fa1fdfd8b537b7f68aa576b65e","user":{"login":"psavol","id":9589374,"avatar_url":"https://avatars0.githubusercontent.com/u/9589374?v=4","gravatar_id":"","url":"https://api.github.com/users/psavol","html_url":"https://github.com/psavol","followers_url":"https://api.github.com/users/psavol/followers","following_url":"https://api.github.com/users/psavol/following{/other_user}","gists_url":"https://api.github.com/users/psavol/gists{/gist_id}","starred_url":"https://api.github.com/users/psavol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psavol/subscriptions","organizations_url":"https://api.github.com/users/psavol/orgs","repos_url":"https://api.github.com/users/psavol/repos","events_url":"https://api.github.com/users/psavol/events{/privacy}","received_events_url":"https://api.github.com/users/psavol/received_events","type":"User","site_admin":false},"body":"Fixed all three in v2.","created_at":"2018-04-30T07:12:47Z","updated_at":"2018-04-30T07:12:47Z","html_url":"https://github.com/Linaro/odp/pull/584#discussion_r184921647","pull_request_url":"https://api.github.com/repos/Linaro/odp/pulls/584","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Linaro/odp/pulls/comments/184921647"},"html":{"href":"https://github.com/Linaro/odp/pull/584#discussion_r184921647"},"pull_request":{"href":"https://api.github.com/repos/Linaro/odp/pulls/584"}},"in_reply_to_id":184803887},"pull_request":{"url":"https://api.github.com/repos/Linaro/odp/pulls/584","id":184621746,"html_url":"https://github.com/Linaro/odp/pull/584","diff_url":"https://github.com/Linaro/odp/pull/584.diff","patch_url":"https://github.com/Linaro/odp/pull/584.patch","issue_url":"https://api.github.com/repos/Linaro/odp/issues/584","number":584,"state":"open","locked":false,"title":"[PATCH v2] sched_pktio test development","user":{"login":"psavol","id":9589374,"avatar_url":"https://avatars0.githubusercontent.com/u/9589374?v=4","gravatar_id":"","url":"https://api.github.com/users/psavol","html_url":"https://github.com/psavol","followers_url":"https://api.github.com/users/psavol/followers","following_url":"https://api.github.com/users/psavol/following{/other_user}","gists_url":"https://api.github.com/users/psavol/gists{/gist_id}","starred_url":"https://api.github.com/users/psavol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psavol/subscriptions","organizations_url":"https://api.github.com/users/psavol/orgs","repos_url":"https://api.github.com/users/psavol/repos","events_url":"https://api.github.com/users/psavol/events{/privacy}","received_events_url":"https://api.github.com/users/psavol/received_events","type":"User","site_admin":false},"body":"Developed sched_pktio test further to maintain packet order as well as added -q and -t options. The first selecting packet IO interface queue count and second enabled timer performance testing with packet IO. Also found and corrected a bug in timer: it did not set highest resolution capability in scheduler polled mode (inline_timers=true). Application modifications are tested with the bug correction, hence it's included into the patch set. ","created_at":"2018-04-27T13:26:19Z","updated_at":"2018-04-30T07:12:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9e73df8b627d55c7264ffe4a3fb5ae92fbbec7b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Linaro/odp/pulls/584/commits","review_comments_url":"https://api.github.com/repos/Linaro/odp/pulls/584/comments","review_comment_url":"https://api.github.com/repos/Linaro/odp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Linaro/odp/issues/584/comments","statuses_url":"https://api.github.com/repos/Linaro/odp/statuses/a44c237f4adefab958611e5233aa3da45adb9701","head":{"label":"psavol:master-test-sched-pktio-timer","ref":"master-test-sched-pktio-timer","sha":"a44c237f4adefab958611e5233aa3da45adb9701","user":{"login":"psavol","id":9589374,"avatar_url":"https://avatars0.githubusercontent.com/u/9589374?v=4","gravatar_id":"","url":"https://api.github.com/users/psavol","html_url":"https://github.com/psavol","followers_url":"https://api.github.com/users/psavol/followers","following_url":"https://api.github.com/users/psavol/following{/other_user}","gists_url":"https://api.github.com/users/psavol/gists{/gist_id}","starred_url":"https://api.github.com/users/psavol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psavol/subscriptions","organizations_url":"https://api.github.com/users/psavol/orgs","repos_url":"https://api.github.com/users/psavol/repos","events_url":"https://api.github.com/users/psavol/events{/privacy}","received_events_url":"https://api.github.com/users/psavol/received_events","type":"User","site_admin":false},"repo":{"id":99666758,"name":"odp","full_name":"psavol/odp","owner":{"login":"psavol","id":9589374,"avatar_url":"https://avatars0.githubusercontent.com/u/9589374?v=4","gravatar_id":"","url":"https://api.github.com/users/psavol","html_url":"https://github.com/psavol","followers_url":"https://api.github.com/users/psavol/followers","following_url":"https://api.github.com/users/psavol/following{/other_user}","gists_url":"https://api.github.com/users/psavol/gists{/gist_id}","starred_url":"https://api.github.com/users/psavol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psavol/subscriptions","organizations_url":"https://api.github.com/users/psavol/orgs","repos_url":"https://api.github.com/users/psavol/repos","events_url":"https://api.github.com/users/psavol/events{/privacy}","received_events_url":"https://api.github.com/users/psavol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/psavol/odp","description":"The ODP project is an open-source, cross-platform set of application programming interfaces (APIs) for the networking data plane","fork":true,"url":"https://api.github.com/repos/psavol/odp","forks_url":"https://api.github.com/repos/psavol/odp/forks","keys_url":"https://api.github.com/repos/psavol/odp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/psavol/odp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/psavol/odp/teams","hooks_url":"https://api.github.com/repos/psavol/odp/hooks","issue_events_url":"https://api.github.com/repos/psavol/odp/issues/events{/number}","events_url":"https://api.github.com/repos/psavol/odp/events","assignees_url":"https://api.github.com/repos/psavol/odp/assignees{/user}","branches_url":"https://api.github.com/repos/psavol/odp/branches{/branch}","tags_url":"https://api.github.com/repos/psavol/odp/tags","blobs_url":"https://api.github.com/repos/psavol/odp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/psavol/odp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/psavol/odp/git/refs{/sha}","trees_url":"https://api.github.com/repos/psavol/odp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/psavol/odp/statuses/{sha}","languages_url":"https://api.github.com/repos/psavol/odp/languages","stargazers_url":"https://api.github.com/repos/psavol/odp/stargazers","contributors_url":"https://api.github.com/repos/psavol/odp/contributors","subscribers_url":"https://api.github.com/repos/psavol/odp/subscribers","subscription_url":"https://api.github.com/repos/psavol/odp/subscription","commits_url":"https://api.github.com/repos/psavol/odp/commits{/sha}","git_commits_url":"https://api.github.com/repos/psavol/odp/git/commits{/sha}","comments_url":"https://api.github.com/repos/psavol/odp/comments{/number}","issue_comment_url":"https://api.github.com/repos/psavol/odp/issues/comments{/number}","contents_url":"https://api.github.com/repos/psavol/odp/contents/{+path}","compare_url":"https://api.github.com/repos/psavol/odp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/psavol/odp/merges","archive_url":"https://api.github.com/repos/psavol/odp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/psavol/odp/downloads","issues_url":"https://api.github.com/repos/psavol/odp/issues{/number}","pulls_url":"https://api.github.com/repos/psavol/odp/pulls{/number}","milestones_url":"https://api.github.com/repos/psavol/odp/milestones{/number}","notifications_url":"https://api.github.com/repos/psavol/odp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/psavol/odp/labels{/name}","releases_url":"https://api.github.com/repos/psavol/odp/releases{/id}","deployments_url":"https://api.github.com/repos/psavol/odp/deployments","created_at":"2017-08-08T08:01:15Z","updated_at":"2018-04-30T07:05:22Z","pushed_at":"2018-04-30T07:12:11Z","git_url":"git://github.com/psavol/odp.git","ssh_url":"git@github.com:psavol/odp.git","clone_url":"https://github.com/psavol/odp.git","svn_url":"https://github.com/psavol/odp","homepage":"http://www.opendataplane.org/","size":10452,"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":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Linaro:master","ref":"master","sha":"3600304c30c4a345538f6c06ca50183b14cd12b1","user":{"login":"Linaro","id":1180626,"avatar_url":"https://avatars0.githubusercontent.com/u/1180626?v=4","gravatar_id":"","url":"https://api.github.com/users/Linaro","html_url":"https://github.com/Linaro","followers_url":"https://api.github.com/users/Linaro/followers","following_url":"https://api.github.com/users/Linaro/following{/other_user}","gists_url":"https://api.github.com/users/Linaro/gists{/gist_id}","starred_url":"https://api.github.com/users/Linaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Linaro/subscriptions","organizations_url":"https://api.github.com/users/Linaro/orgs","repos_url":"https://api.github.com/users/Linaro/repos","events_url":"https://api.github.com/users/Linaro/events{/privacy}","received_events_url":"https://api.github.com/users/Linaro/received_events","type":"Organization","site_admin":false},"repo":{"id":79130215,"name":"odp","full_name":"Linaro/odp","owner":{"login":"Linaro","id":1180626,"avatar_url":"https://avatars0.githubusercontent.com/u/1180626?v=4","gravatar_id":"","url":"https://api.github.com/users/Linaro","html_url":"https://github.com/Linaro","followers_url":"https://api.github.com/users/Linaro/followers","following_url":"https://api.github.com/users/Linaro/following{/other_user}","gists_url":"https://api.github.com/users/Linaro/gists{/gist_id}","starred_url":"https://api.github.com/users/Linaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Linaro/subscriptions","organizations_url":"https://api.github.com/users/Linaro/orgs","repos_url":"https://api.github.com/users/Linaro/repos","events_url":"https://api.github.com/users/Linaro/events{/privacy}","received_events_url":"https://api.github.com/users/Linaro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Linaro/odp","description":"The ODP project is an open-source, cross-platform set of application programming interfaces (APIs) for the networking data plane","fork":false,"url":"https://api.github.com/repos/Linaro/odp","forks_url":"https://api.github.com/repos/Linaro/odp/forks","keys_url":"https://api.github.com/repos/Linaro/odp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Linaro/odp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Linaro/odp/teams","hooks_url":"https://api.github.com/repos/Linaro/odp/hooks","issue_events_url":"https://api.github.com/repos/Linaro/odp/issues/events{/number}","events_url":"https://api.github.com/repos/Linaro/odp/events","assignees_url":"https://api.github.com/repos/Linaro/odp/assignees{/user}","branches_url":"https://api.github.com/repos/Linaro/odp/branches{/branch}","tags_url":"https://api.github.com/repos/Linaro/odp/tags","blobs_url":"https://api.github.com/repos/Linaro/odp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Linaro/odp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Linaro/odp/git/refs{/sha}","trees_url":"https://api.github.com/repos/Linaro/odp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Linaro/odp/statuses/{sha}","languages_url":"https://api.github.com/repos/Linaro/odp/languages","stargazers_url":"https://api.github.com/repos/Linaro/odp/stargazers","contributors_url":"https://api.github.com/repos/Linaro/odp/contributors","subscribers_url":"https://api.github.com/repos/Linaro/odp/subscribers","subscription_url":"https://api.github.com/repos/Linaro/odp/subscription","commits_url":"https://api.github.com/repos/Linaro/odp/commits{/sha}","git_commits_url":"https://api.github.com/repos/Linaro/odp/git/commits{/sha}","comments_url":"https://api.github.com/repos/Linaro/odp/comments{/number}","issue_comment_url":"https://api.github.com/repos/Linaro/odp/issues/comments{/number}","contents_url":"https://api.github.com/repos/Linaro/odp/contents/{+path}","compare_url":"https://api.github.com/repos/Linaro/odp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Linaro/odp/merges","archive_url":"https://api.github.com/repos/Linaro/odp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Linaro/odp/downloads","issues_url":"https://api.github.com/repos/Linaro/odp/issues{/number}","pulls_url":"https://api.github.com/repos/Linaro/odp/pulls{/number}","milestones_url":"https://api.github.com/repos/Linaro/odp/milestones{/number}","notifications_url":"https://api.github.com/repos/Linaro/odp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Linaro/odp/labels{/name}","releases_url":"https://api.github.com/repos/Linaro/odp/releases{/id}","deployments_url":"https://api.github.com/repos/Linaro/odp/deployments","created_at":"2017-01-16T15:11:12Z","updated_at":"2018-04-28T19:16:10Z","pushed_at":"2018-04-30T07:12:13Z","git_url":"git://github.com/Linaro/odp.git","ssh_url":"git@github.com:Linaro/odp.git","clone_url":"https://github.com/Linaro/odp.git","svn_url":"https://github.com/Linaro/odp","homepage":"http://www.opendataplane.org/","size":11136,"stargazers_count":44,"watchers_count":44,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":50,"open_issues":17,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Linaro/odp/pulls/584"},"html":{"href":"https://github.com/Linaro/odp/pull/584"},"issue":{"href":"https://api.github.com/repos/Linaro/odp/issues/584"},"comments":{"href":"https://api.github.com/repos/Linaro/odp/issues/584/comments"},"review_comments":{"href":"https://api.github.com/repos/Linaro/odp/pulls/584/comments"},"review_comment":{"href":"https://api.github.com/repos/Linaro/odp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Linaro/odp/pulls/584/commits"},"statuses":{"href":"https://api.github.com/repos/Linaro/odp/statuses/a44c237f4adefab958611e5233aa3da45adb9701"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"psavol"}}