{"action":"created","comment":{"url":"https://api.github.com/repos/inliniac/suricata/pulls/comments/59022227","id":59022227,"diff_hunk":"@@ -222,6 +222,18 @@ void *ParseAFPConfig(const char *iface)\n                 aconf->iface);\n         aconf->flags |= AFP_RING_MODE;\n     }\n+    (void)ConfGetChildValueBoolWithDefault(if_root, if_default, \"tpacket-v3\", (int *)&boolval);\n+    if (boolval) {\n+        if (strcasecmp(RunmodeGetActive(), \"workers\") == 0) {\n+            SCLogInfo(\"Enabling tpacket v3 capture on iface %s\",\n+                    aconf->iface);\n+            aconf->flags |= AFP_TPACKET_V3;\n+        } else {\n+            SCLogError(SC_ERR_RUNMODE,","path":"src/runmode-af-packet.c","position":11,"original_position":11,"commit_id":"7404d4858c7703c39c333fa8dfc00ee6cc82943a","original_commit_id":"7404d4858c7703c39c333fa8dfc00ee6cc82943a","user":{"login":"regit","id":308616,"avatar_url":"https://avatars.githubusercontent.com/u/308616?v=3","gravatar_id":"","url":"https://api.github.com/users/regit","html_url":"https://github.com/regit","followers_url":"https://api.github.com/users/regit/followers","following_url":"https://api.github.com/users/regit/following{/other_user}","gists_url":"https://api.github.com/users/regit/gists{/gist_id}","starred_url":"https://api.github.com/users/regit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regit/subscriptions","organizations_url":"https://api.github.com/users/regit/orgs","repos_url":"https://api.github.com/users/regit/repos","events_url":"https://api.github.com/users/regit/events{/privacy}","received_events_url":"https://api.github.com/users/regit/received_events","type":"User","site_admin":false},"body":"Problem is that v3 release a block based so it would meant we maintain a reference count of the block and release the block once we have no more reference. We would need at least one atomic to do so. So it is doable but it may be a bit complicated. Alternative would be to forget about zero copy in non workers runmode.","created_at":"2016-04-08T13:14:02Z","updated_at":"2016-04-08T13:14:02Z","html_url":"https://github.com/inliniac/suricata/pull/1988#discussion_r59022227","pull_request_url":"https://api.github.com/repos/inliniac/suricata/pulls/1988","_links":{"self":{"href":"https://api.github.com/repos/inliniac/suricata/pulls/comments/59022227"},"html":{"href":"https://github.com/inliniac/suricata/pull/1988#discussion_r59022227"},"pull_request":{"href":"https://api.github.com/repos/inliniac/suricata/pulls/1988"}}},"pull_request":{"url":"https://api.github.com/repos/inliniac/suricata/pulls/1988","id":65694675,"html_url":"https://github.com/inliniac/suricata/pull/1988","diff_url":"https://github.com/inliniac/suricata/pull/1988.diff","patch_url":"https://github.com/inliniac/suricata/pull/1988.patch","issue_url":"https://api.github.com/repos/inliniac/suricata/issues/1988","number":1988,"state":"closed","locked":false,"title":"Tpacket v3 2","user":{"login":"regit","id":308616,"avatar_url":"https://avatars.githubusercontent.com/u/308616?v=3","gravatar_id":"","url":"https://api.github.com/users/regit","html_url":"https://github.com/regit","followers_url":"https://api.github.com/users/regit/followers","following_url":"https://api.github.com/users/regit/following{/other_user}","gists_url":"https://api.github.com/users/regit/gists{/gist_id}","starred_url":"https://api.github.com/users/regit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regit/subscriptions","organizations_url":"https://api.github.com/users/regit/orgs","repos_url":"https://api.github.com/users/regit/repos","events_url":"https://api.github.com/users/regit/events{/privacy}","received_events_url":"https://api.github.com/users/regit/received_events","type":"User","site_admin":false},"body":"Implementation of af-packet tpacket_v3 and some cleaning of the af_packet code. No functional change compared to previously tested code but refactoring.\r\n\r\nPR builds:\r\n- PR regit: https://buildbot.openinfosecfoundation.org/builders/regit/builds/154\r\n- PR regit-pcap: https://buildbot.openinfosecfoundation.org/builders/regit-pcap/builds/150\r\n","created_at":"2016-04-07T20:32:04Z","updated_at":"2016-04-08T13:14:02Z","closed_at":"2016-04-08T06:20:13Z","merged_at":null,"merge_commit_sha":"61bfe578d53ee503277aad85b4f629382c66d13f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/inliniac/suricata/pulls/1988/commits","review_comments_url":"https://api.github.com/repos/inliniac/suricata/pulls/1988/comments","review_comment_url":"https://api.github.com/repos/inliniac/suricata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inliniac/suricata/issues/1988/comments","statuses_url":"https://api.github.com/repos/inliniac/suricata/statuses/7404d4858c7703c39c333fa8dfc00ee6cc82943a","head":{"label":"regit:tpacket_v3-2","ref":"tpacket_v3-2","sha":"7404d4858c7703c39c333fa8dfc00ee6cc82943a","user":{"login":"regit","id":308616,"avatar_url":"https://avatars.githubusercontent.com/u/308616?v=3","gravatar_id":"","url":"https://api.github.com/users/regit","html_url":"https://github.com/regit","followers_url":"https://api.github.com/users/regit/followers","following_url":"https://api.github.com/users/regit/following{/other_user}","gists_url":"https://api.github.com/users/regit/gists{/gist_id}","starred_url":"https://api.github.com/users/regit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regit/subscriptions","organizations_url":"https://api.github.com/users/regit/orgs","repos_url":"https://api.github.com/users/regit/repos","events_url":"https://api.github.com/users/regit/events{/privacy}","received_events_url":"https://api.github.com/users/regit/received_events","type":"User","site_admin":false},"repo":{"id":5410368,"name":"suricata","full_name":"regit/suricata","owner":{"login":"regit","id":308616,"avatar_url":"https://avatars.githubusercontent.com/u/308616?v=3","gravatar_id":"","url":"https://api.github.com/users/regit","html_url":"https://github.com/regit","followers_url":"https://api.github.com/users/regit/followers","following_url":"https://api.github.com/users/regit/following{/other_user}","gists_url":"https://api.github.com/users/regit/gists{/gist_id}","starred_url":"https://api.github.com/users/regit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regit/subscriptions","organizations_url":"https://api.github.com/users/regit/orgs","repos_url":"https://api.github.com/users/regit/repos","events_url":"https://api.github.com/users/regit/events{/privacy}","received_events_url":"https://api.github.com/users/regit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/regit/suricata","description":"My personal development tree for Suricata.","fork":true,"url":"https://api.github.com/repos/regit/suricata","forks_url":"https://api.github.com/repos/regit/suricata/forks","keys_url":"https://api.github.com/repos/regit/suricata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/regit/suricata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/regit/suricata/teams","hooks_url":"https://api.github.com/repos/regit/suricata/hooks","issue_events_url":"https://api.github.com/repos/regit/suricata/issues/events{/number}","events_url":"https://api.github.com/repos/regit/suricata/events","assignees_url":"https://api.github.com/repos/regit/suricata/assignees{/user}","branches_url":"https://api.github.com/repos/regit/suricata/branches{/branch}","tags_url":"https://api.github.com/repos/regit/suricata/tags","blobs_url":"https://api.github.com/repos/regit/suricata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/regit/suricata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/regit/suricata/git/refs{/sha}","trees_url":"https://api.github.com/repos/regit/suricata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/regit/suricata/statuses/{sha}","languages_url":"https://api.github.com/repos/regit/suricata/languages","stargazers_url":"https://api.github.com/repos/regit/suricata/stargazers","contributors_url":"https://api.github.com/repos/regit/suricata/contributors","subscribers_url":"https://api.github.com/repos/regit/suricata/subscribers","subscription_url":"https://api.github.com/repos/regit/suricata/subscription","commits_url":"https://api.github.com/repos/regit/suricata/commits{/sha}","git_commits_url":"https://api.github.com/repos/regit/suricata/git/commits{/sha}","comments_url":"https://api.github.com/repos/regit/suricata/comments{/number}","issue_comment_url":"https://api.github.com/repos/regit/suricata/issues/comments{/number}","contents_url":"https://api.github.com/repos/regit/suricata/contents/{+path}","compare_url":"https://api.github.com/repos/regit/suricata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/regit/suricata/merges","archive_url":"https://api.github.com/repos/regit/suricata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/regit/suricata/downloads","issues_url":"https://api.github.com/repos/regit/suricata/issues{/number}","pulls_url":"https://api.github.com/repos/regit/suricata/pulls{/number}","milestones_url":"https://api.github.com/repos/regit/suricata/milestones{/number}","notifications_url":"https://api.github.com/repos/regit/suricata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/regit/suricata/labels{/name}","releases_url":"https://api.github.com/repos/regit/suricata/releases{/id}","deployments_url":"https://api.github.com/repos/regit/suricata/deployments","created_at":"2012-08-14T08:45:02Z","updated_at":"2015-05-01T19:54:47Z","pushed_at":"2016-04-07T20:08:42Z","git_url":"git://github.com/regit/suricata.git","ssh_url":"git@github.com:regit/suricata.git","clone_url":"https://github.com/regit/suricata.git","svn_url":"https://github.com/regit/suricata","homepage":"","size":40591,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":0,"forks":13,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"inliniac:master","ref":"master","sha":"9b6e292a28ac862684056f8dee912f0629590cbf","user":{"login":"inliniac","id":719366,"avatar_url":"https://avatars.githubusercontent.com/u/719366?v=3","gravatar_id":"","url":"https://api.github.com/users/inliniac","html_url":"https://github.com/inliniac","followers_url":"https://api.github.com/users/inliniac/followers","following_url":"https://api.github.com/users/inliniac/following{/other_user}","gists_url":"https://api.github.com/users/inliniac/gists{/gist_id}","starred_url":"https://api.github.com/users/inliniac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inliniac/subscriptions","organizations_url":"https://api.github.com/users/inliniac/orgs","repos_url":"https://api.github.com/users/inliniac/repos","events_url":"https://api.github.com/users/inliniac/events{/privacy}","received_events_url":"https://api.github.com/users/inliniac/received_events","type":"User","site_admin":false},"repo":{"id":5410234,"name":"suricata","full_name":"inliniac/suricata","owner":{"login":"inliniac","id":719366,"avatar_url":"https://avatars.githubusercontent.com/u/719366?v=3","gravatar_id":"","url":"https://api.github.com/users/inliniac","html_url":"https://github.com/inliniac","followers_url":"https://api.github.com/users/inliniac/followers","following_url":"https://api.github.com/users/inliniac/following{/other_user}","gists_url":"https://api.github.com/users/inliniac/gists{/gist_id}","starred_url":"https://api.github.com/users/inliniac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inliniac/subscriptions","organizations_url":"https://api.github.com/users/inliniac/orgs","repos_url":"https://api.github.com/users/inliniac/repos","events_url":"https://api.github.com/users/inliniac/events{/privacy}","received_events_url":"https://api.github.com/users/inliniac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/inliniac/suricata","description":"Mirror of the official OISF Suricata git repository","fork":false,"url":"https://api.github.com/repos/inliniac/suricata","forks_url":"https://api.github.com/repos/inliniac/suricata/forks","keys_url":"https://api.github.com/repos/inliniac/suricata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inliniac/suricata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inliniac/suricata/teams","hooks_url":"https://api.github.com/repos/inliniac/suricata/hooks","issue_events_url":"https://api.github.com/repos/inliniac/suricata/issues/events{/number}","events_url":"https://api.github.com/repos/inliniac/suricata/events","assignees_url":"https://api.github.com/repos/inliniac/suricata/assignees{/user}","branches_url":"https://api.github.com/repos/inliniac/suricata/branches{/branch}","tags_url":"https://api.github.com/repos/inliniac/suricata/tags","blobs_url":"https://api.github.com/repos/inliniac/suricata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inliniac/suricata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inliniac/suricata/git/refs{/sha}","trees_url":"https://api.github.com/repos/inliniac/suricata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inliniac/suricata/statuses/{sha}","languages_url":"https://api.github.com/repos/inliniac/suricata/languages","stargazers_url":"https://api.github.com/repos/inliniac/suricata/stargazers","contributors_url":"https://api.github.com/repos/inliniac/suricata/contributors","subscribers_url":"https://api.github.com/repos/inliniac/suricata/subscribers","subscription_url":"https://api.github.com/repos/inliniac/suricata/subscription","commits_url":"https://api.github.com/repos/inliniac/suricata/commits{/sha}","git_commits_url":"https://api.github.com/repos/inliniac/suricata/git/commits{/sha}","comments_url":"https://api.github.com/repos/inliniac/suricata/comments{/number}","issue_comment_url":"https://api.github.com/repos/inliniac/suricata/issues/comments{/number}","contents_url":"https://api.github.com/repos/inliniac/suricata/contents/{+path}","compare_url":"https://api.github.com/repos/inliniac/suricata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inliniac/suricata/merges","archive_url":"https://api.github.com/repos/inliniac/suricata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inliniac/suricata/downloads","issues_url":"https://api.github.com/repos/inliniac/suricata/issues{/number}","pulls_url":"https://api.github.com/repos/inliniac/suricata/pulls{/number}","milestones_url":"https://api.github.com/repos/inliniac/suricata/milestones{/number}","notifications_url":"https://api.github.com/repos/inliniac/suricata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inliniac/suricata/labels{/name}","releases_url":"https://api.github.com/repos/inliniac/suricata/releases{/id}","deployments_url":"https://api.github.com/repos/inliniac/suricata/deployments","created_at":"2012-08-14T08:30:06Z","updated_at":"2016-04-04T13:17:08Z","pushed_at":"2016-04-08T09:16:53Z","git_url":"git://github.com/inliniac/suricata.git","ssh_url":"git@github.com:inliniac/suricata.git","clone_url":"https://github.com/inliniac/suricata.git","svn_url":"https://github.com/inliniac/suricata","homepage":"http://suricata-ids.org/","size":58721,"stargazers_count":258,"watchers_count":258,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":234,"mirror_url":null,"open_issues_count":33,"forks":234,"open_issues":33,"watchers":258,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inliniac/suricata/pulls/1988"},"html":{"href":"https://github.com/inliniac/suricata/pull/1988"},"issue":{"href":"https://api.github.com/repos/inliniac/suricata/issues/1988"},"comments":{"href":"https://api.github.com/repos/inliniac/suricata/issues/1988/comments"},"review_comments":{"href":"https://api.github.com/repos/inliniac/suricata/pulls/1988/comments"},"review_comment":{"href":"https://api.github.com/repos/inliniac/suricata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inliniac/suricata/pulls/1988/commits"},"statuses":{"href":"https://api.github.com/repos/inliniac/suricata/statuses/7404d4858c7703c39c333fa8dfc00ee6cc82943a"}}}}