{"action":"created","comment":{"url":"https://api.github.com/repos/srajag/contrail-vrouter/pulls/comments/23839776","id":23839776,"diff_hunk":"@@ -514,6 +650,48 @@ dpdk_lcore_exit()\n     rte_free(lcore);\n }\n \n+/* Handle an IPC command\n+ * Returns -1 if if there is a stop command\n+ */\n+int\n+vr_dpdk_lcore_cmd_handle(struct vr_dpdk_lcore *lcore)\n+{\n+    uint16_t cmd = (uint16_t)rte_atomic16_read(&lcore->lcore_cmd);\n+    uint32_t cmd_param = (uint32_t)rte_atomic32_read(&lcore->lcore_cmd_param);\n+    int ret = 0;\n+    unsigned vif_idx;\n+    struct vr_dpdk_rx_queue *rx_queue;\n+    struct vr_dpdk_tx_queue *tx_queue;\n+\n+    switch (cmd) {\n+    case VR_DPDK_LCORE_RX_RM_CMD:\n+        vif_idx = cmd_param;\n+        /* find the RX queue */\n+        rx_queue = dpdk_lcore_rx_queue_find(lcore, vif_idx);\n+        if (rx_queue) {\n+            /* remove the queue from the lcore */\n+            dpdk_lcore_rx_queue_remove(lcore, rx_queue);\n+        }\n+        break;\n+    case VR_DPDK_LCORE_TX_RM_CMD:\n+        vif_idx = cmd_param;\n+        /* find the TX queue */\n+        tx_queue = &lcore->lcore_tx_queues[vif_idx];\n+        if (tx_queue->txq_queue_h) {\n+            /* remove the queue from the lcore */\n+            dpdk_lcore_tx_queue_remove(lcore, tx_queue);\n+        }\n+        break;\n+    case VR_DPDK_LCORE_STOP_CMD:\n+        ret = -1;\n+        break;\n+    }\n+\n+    rte_atomic16_set(&lcore->lcore_cmd, VR_DPDK_LCORE_NO_CMD);","path":"dpdk/vr_dpdk_lcore.c","position":310,"original_position":310,"commit_id":"9a24cb2bb282c6d7ab00cda700e8751f2ca346e0","original_commit_id":"9a24cb2bb282c6d7ab00cda700e8751f2ca346e0","user":{"login":"semihalf-berestovskyy-andriy","id":7814397,"avatar_url":"https://avatars.githubusercontent.com/u/7814397?v=3","gravatar_id":"","url":"https://api.github.com/users/semihalf-berestovskyy-andriy","html_url":"https://github.com/semihalf-berestovskyy-andriy","followers_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/followers","following_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/following{/other_user}","gists_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/gists{/gist_id}","starred_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/subscriptions","organizations_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/orgs","repos_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/repos","events_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/events{/privacy}","received_events_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/received_events","type":"User","site_admin":false},"body":"For the P6 family processors, locked operations (i.e. rte_atomic*) serialize all outstanding load and store operations (that is, wait for them to complete). This rule is also true for the Pentium 4 and Intel Xeon processors. Source: http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf","created_at":"2015-01-30T12:42:16Z","updated_at":"2015-01-30T12:42:16Z","html_url":"https://github.com/srajag/contrail-vrouter/pull/10#discussion_r23839776","pull_request_url":"https://api.github.com/repos/srajag/contrail-vrouter/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/srajag/contrail-vrouter/pulls/comments/23839776"},"html":{"href":"https://github.com/srajag/contrail-vrouter/pull/10#discussion_r23839776"},"pull_request":{"href":"https://api.github.com/repos/srajag/contrail-vrouter/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/srajag/contrail-vrouter/pulls/10","id":28122524,"html_url":"https://github.com/srajag/contrail-vrouter/pull/10","diff_url":"https://github.com/srajag/contrail-vrouter/pull/10.diff","patch_url":"https://github.com/srajag/contrail-vrouter/pull/10.patch","issue_url":"https://api.github.com/repos/srajag/contrail-vrouter/issues/10","number":10,"state":"open","locked":false,"title":"Implement monitoring interface deletion","user":{"login":"semihalf-berestovskyy-andriy","id":7814397,"avatar_url":"https://avatars.githubusercontent.com/u/7814397?v=3","gravatar_id":"","url":"https://api.github.com/users/semihalf-berestovskyy-andriy","html_url":"https://github.com/semihalf-berestovskyy-andriy","followers_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/followers","following_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/following{/other_user}","gists_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/gists{/gist_id}","starred_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/subscriptions","organizations_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/orgs","repos_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/repos","events_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/events{/privacy}","received_events_url":"https://api.github.com/users/semihalf-berestovskyy-andriy/received_events","type":"User","site_admin":false},"body":"+ basic inter core communication\r\n+ ring queue releasing\r\n+ lock/unlock callbacks\r\n+ other minor changes","created_at":"2015-01-27T16:28:45Z","updated_at":"2015-01-30T12:42:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1cbd49ad3a1156f0184391fa13ae45296fb4dd60","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/srajag/contrail-vrouter/pulls/10/commits","review_comments_url":"https://api.github.com/repos/srajag/contrail-vrouter/pulls/10/comments","review_comment_url":"https://api.github.com/repos/srajag/contrail-vrouter/pulls/comments/{number}","comments_url":"https://api.github.com/repos/srajag/contrail-vrouter/issues/10/comments","statuses_url":"https://api.github.com/repos/srajag/contrail-vrouter/statuses/9a24cb2bb282c6d7ab00cda700e8751f2ca346e0","head":{"label":"srajag:dpdk-devel-del","ref":"dpdk-devel-del","sha":"9a24cb2bb282c6d7ab00cda700e8751f2ca346e0","user":{"login":"srajag","id":5890775,"avatar_url":"https://avatars.githubusercontent.com/u/5890775?v=3","gravatar_id":"","url":"https://api.github.com/users/srajag","html_url":"https://github.com/srajag","followers_url":"https://api.github.com/users/srajag/followers","following_url":"https://api.github.com/users/srajag/following{/other_user}","gists_url":"https://api.github.com/users/srajag/gists{/gist_id}","starred_url":"https://api.github.com/users/srajag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srajag/subscriptions","organizations_url":"https://api.github.com/users/srajag/orgs","repos_url":"https://api.github.com/users/srajag/repos","events_url":"https://api.github.com/users/srajag/events{/privacy}","received_events_url":"https://api.github.com/users/srajag/received_events","type":"User","site_admin":false},"repo":{"id":23854573,"name":"contrail-vrouter","full_name":"srajag/contrail-vrouter","owner":{"login":"srajag","id":5890775,"avatar_url":"https://avatars.githubusercontent.com/u/5890775?v=3","gravatar_id":"","url":"https://api.github.com/users/srajag","html_url":"https://github.com/srajag","followers_url":"https://api.github.com/users/srajag/followers","following_url":"https://api.github.com/users/srajag/following{/other_user}","gists_url":"https://api.github.com/users/srajag/gists{/gist_id}","starred_url":"https://api.github.com/users/srajag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srajag/subscriptions","organizations_url":"https://api.github.com/users/srajag/orgs","repos_url":"https://api.github.com/users/srajag/repos","events_url":"https://api.github.com/users/srajag/events{/privacy}","received_events_url":"https://api.github.com/users/srajag/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srajag/contrail-vrouter","description":"Contrail Virtual Router","fork":true,"url":"https://api.github.com/repos/srajag/contrail-vrouter","forks_url":"https://api.github.com/repos/srajag/contrail-vrouter/forks","keys_url":"https://api.github.com/repos/srajag/contrail-vrouter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srajag/contrail-vrouter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srajag/contrail-vrouter/teams","hooks_url":"https://api.github.com/repos/srajag/contrail-vrouter/hooks","issue_events_url":"https://api.github.com/repos/srajag/contrail-vrouter/issues/events{/number}","events_url":"https://api.github.com/repos/srajag/contrail-vrouter/events","assignees_url":"https://api.github.com/repos/srajag/contrail-vrouter/assignees{/user}","branches_url":"https://api.github.com/repos/srajag/contrail-vrouter/branches{/branch}","tags_url":"https://api.github.com/repos/srajag/contrail-vrouter/tags","blobs_url":"https://api.github.com/repos/srajag/contrail-vrouter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srajag/contrail-vrouter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srajag/contrail-vrouter/git/refs{/sha}","trees_url":"https://api.github.com/repos/srajag/contrail-vrouter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srajag/contrail-vrouter/statuses/{sha}","languages_url":"https://api.github.com/repos/srajag/contrail-vrouter/languages","stargazers_url":"https://api.github.com/repos/srajag/contrail-vrouter/stargazers","contributors_url":"https://api.github.com/repos/srajag/contrail-vrouter/contributors","subscribers_url":"https://api.github.com/repos/srajag/contrail-vrouter/subscribers","subscription_url":"https://api.github.com/repos/srajag/contrail-vrouter/subscription","commits_url":"https://api.github.com/repos/srajag/contrail-vrouter/commits{/sha}","git_commits_url":"https://api.github.com/repos/srajag/contrail-vrouter/git/commits{/sha}","comments_url":"https://api.github.com/repos/srajag/contrail-vrouter/comments{/number}","issue_comment_url":"https://api.github.com/repos/srajag/contrail-vrouter/issues/comments/{number}","contents_url":"https://api.github.com/repos/srajag/contrail-vrouter/contents/{+path}","compare_url":"https://api.github.com/repos/srajag/contrail-vrouter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srajag/contrail-vrouter/merges","archive_url":"https://api.github.com/repos/srajag/contrail-vrouter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srajag/contrail-vrouter/downloads","issues_url":"https://api.github.com/repos/srajag/contrail-vrouter/issues{/number}","pulls_url":"https://api.github.com/repos/srajag/contrail-vrouter/pulls{/number}","milestones_url":"https://api.github.com/repos/srajag/contrail-vrouter/milestones{/number}","notifications_url":"https://api.github.com/repos/srajag/contrail-vrouter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srajag/contrail-vrouter/labels{/name}","releases_url":"https://api.github.com/repos/srajag/contrail-vrouter/releases{/id}","created_at":"2014-09-10T00:07:46Z","updated_at":"2015-01-27T09:30:10Z","pushed_at":"2015-01-30T09:06:47Z","git_url":"git://github.com/srajag/contrail-vrouter.git","ssh_url":"git@github.com:srajag/contrail-vrouter.git","clone_url":"https://github.com/srajag/contrail-vrouter.git","svn_url":"https://github.com/srajag/contrail-vrouter","homepage":null,"size":2528,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"srajag:dpdk-devel","ref":"dpdk-devel","sha":"bc3615f9cd140349c894d390ee9399dfba756d8f","user":{"login":"srajag","id":5890775,"avatar_url":"https://avatars.githubusercontent.com/u/5890775?v=3","gravatar_id":"","url":"https://api.github.com/users/srajag","html_url":"https://github.com/srajag","followers_url":"https://api.github.com/users/srajag/followers","following_url":"https://api.github.com/users/srajag/following{/other_user}","gists_url":"https://api.github.com/users/srajag/gists{/gist_id}","starred_url":"https://api.github.com/users/srajag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srajag/subscriptions","organizations_url":"https://api.github.com/users/srajag/orgs","repos_url":"https://api.github.com/users/srajag/repos","events_url":"https://api.github.com/users/srajag/events{/privacy}","received_events_url":"https://api.github.com/users/srajag/received_events","type":"User","site_admin":false},"repo":{"id":23854573,"name":"contrail-vrouter","full_name":"srajag/contrail-vrouter","owner":{"login":"srajag","id":5890775,"avatar_url":"https://avatars.githubusercontent.com/u/5890775?v=3","gravatar_id":"","url":"https://api.github.com/users/srajag","html_url":"https://github.com/srajag","followers_url":"https://api.github.com/users/srajag/followers","following_url":"https://api.github.com/users/srajag/following{/other_user}","gists_url":"https://api.github.com/users/srajag/gists{/gist_id}","starred_url":"https://api.github.com/users/srajag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srajag/subscriptions","organizations_url":"https://api.github.com/users/srajag/orgs","repos_url":"https://api.github.com/users/srajag/repos","events_url":"https://api.github.com/users/srajag/events{/privacy}","received_events_url":"https://api.github.com/users/srajag/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srajag/contrail-vrouter","description":"Contrail Virtual Router","fork":true,"url":"https://api.github.com/repos/srajag/contrail-vrouter","forks_url":"https://api.github.com/repos/srajag/contrail-vrouter/forks","keys_url":"https://api.github.com/repos/srajag/contrail-vrouter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srajag/contrail-vrouter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srajag/contrail-vrouter/teams","hooks_url":"https://api.github.com/repos/srajag/contrail-vrouter/hooks","issue_events_url":"https://api.github.com/repos/srajag/contrail-vrouter/issues/events{/number}","events_url":"https://api.github.com/repos/srajag/contrail-vrouter/events","assignees_url":"https://api.github.com/repos/srajag/contrail-vrouter/assignees{/user}","branches_url":"https://api.github.com/repos/srajag/contrail-vrouter/branches{/branch}","tags_url":"https://api.github.com/repos/srajag/contrail-vrouter/tags","blobs_url":"https://api.github.com/repos/srajag/contrail-vrouter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srajag/contrail-vrouter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srajag/contrail-vrouter/git/refs{/sha}","trees_url":"https://api.github.com/repos/srajag/contrail-vrouter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srajag/contrail-vrouter/statuses/{sha}","languages_url":"https://api.github.com/repos/srajag/contrail-vrouter/languages","stargazers_url":"https://api.github.com/repos/srajag/contrail-vrouter/stargazers","contributors_url":"https://api.github.com/repos/srajag/contrail-vrouter/contributors","subscribers_url":"https://api.github.com/repos/srajag/contrail-vrouter/subscribers","subscription_url":"https://api.github.com/repos/srajag/contrail-vrouter/subscription","commits_url":"https://api.github.com/repos/srajag/contrail-vrouter/commits{/sha}","git_commits_url":"https://api.github.com/repos/srajag/contrail-vrouter/git/commits{/sha}","comments_url":"https://api.github.com/repos/srajag/contrail-vrouter/comments{/number}","issue_comment_url":"https://api.github.com/repos/srajag/contrail-vrouter/issues/comments/{number}","contents_url":"https://api.github.com/repos/srajag/contrail-vrouter/contents/{+path}","compare_url":"https://api.github.com/repos/srajag/contrail-vrouter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srajag/contrail-vrouter/merges","archive_url":"https://api.github.com/repos/srajag/contrail-vrouter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srajag/contrail-vrouter/downloads","issues_url":"https://api.github.com/repos/srajag/contrail-vrouter/issues{/number}","pulls_url":"https://api.github.com/repos/srajag/contrail-vrouter/pulls{/number}","milestones_url":"https://api.github.com/repos/srajag/contrail-vrouter/milestones{/number}","notifications_url":"https://api.github.com/repos/srajag/contrail-vrouter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srajag/contrail-vrouter/labels{/name}","releases_url":"https://api.github.com/repos/srajag/contrail-vrouter/releases{/id}","created_at":"2014-09-10T00:07:46Z","updated_at":"2015-01-27T09:30:10Z","pushed_at":"2015-01-30T09:06:47Z","git_url":"git://github.com/srajag/contrail-vrouter.git","ssh_url":"git@github.com:srajag/contrail-vrouter.git","clone_url":"https://github.com/srajag/contrail-vrouter.git","svn_url":"https://github.com/srajag/contrail-vrouter","homepage":null,"size":2528,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/srajag/contrail-vrouter/pulls/10"},"html":{"href":"https://github.com/srajag/contrail-vrouter/pull/10"},"issue":{"href":"https://api.github.com/repos/srajag/contrail-vrouter/issues/10"},"comments":{"href":"https://api.github.com/repos/srajag/contrail-vrouter/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/srajag/contrail-vrouter/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/srajag/contrail-vrouter/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/srajag/contrail-vrouter/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/srajag/contrail-vrouter/statuses/9a24cb2bb282c6d7ab00cda700e8751f2ca346e0"}}}}