{"action":"created","comment":{"url":"https://api.github.com/repos/clearcontainers/runtime/pulls/comments/154129995","pull_request_review_id":80228746,"id":154129995,"diff_hunk":"@@ -0,0 +1,265 @@\n+# Setup to use SR-IOV with Clear Containers\n+\n+Single Root I/O Virtualization (SR-IOV) enables splitting a physical device into\n+virtual functions (VFs). This enables direct passthrough to virtual machines or\n+containers.  For Clear Containers, we have enabled a Container Network Model (CNM)\n+plugin and necessary changes in the runtime to detect virtual functions in a \n+container's network namespace to facilitate making use of SR-IOV for network \n+based devices.\n+\n+## Install the SR-IOV Docker\\* plugin\n+\n+In order to create a network with VFs associated with it which can be passed to\n+Clear Containers, it is necessary to install a SR-IOV Docker plugin. The \n+created network will be based on a physical function (PF) device, and can\n+create 'n' containers, where 'n' is the number of VFs associated with the \n+Physical Function (PF).\n+\n+To install the plugin, follow the [plugin installation instructions](https://github.com/clearcontainers/sriov).\n+\n+\n+## Host setup for SR-IOV\n+\n+You need to have a system with Intel VT-d support. Your kernel needs to have \n+Input-Output Memory Management Unit (IOMMU) and Virtual Function I/O (VFIO) \n+support. `CONFIG_VFIO_NOIOMMU` must to be disabled in the host kernel\n+configuration for SR-IOV. You will need to rebuild your host system's kernel in\n+order to disable `CONFIG_VFIO_NOIOMMU` in the kernel configuration.\n+You may also potentially need to add a PCI override for your Network Interface \n+Controller (NIC). The section below describes how to assess if changes are\n+needed, and how to make these changes.\n+\n+### IOMMU Groups and PCIe Access Control Services\n+\n+Run the following command to see how the IOMMU groups are setup on your \n+host system. This information details whether or not your NIC is setup \n+appropriately with respect to PCIe Access Control Services (ACS). If the PCI \n+bridge is within the same IOMMU group as your NIC, then this is an indication \n+that either your device doesn't support ACS or that it doesn't share this \n+capability appropriately by default.\n+\n+```\n+$ find /sys/kernel/iommu_groups/ -type l\n+```\n+\n+If all if all is setup properly, you will have the PCI for each ACS enabled \n+NIC port in its own IOMMU group. If you don't see any output when running the above\n+command, then you likely need to update your host's kernel configuration.\n+\n+For more details, see http://vfio.blogspot.com/2014/08/iommu-groups-inside-and-out.html\n+\n+### Updating the Host Kernel\n+\n+Check if your kernel is built with VFIO support by verifying that `CONFIG_VFIO_IOMMU_TYPE1`,\n+`CONFIG_VFIO` and `CONFIG_VFIO_PCI` are set in your kernel configuration. \n+In addition, `CONFIG_VFIO_NOIOMMU` should be disabled in your host kernel \n+configuration. If either of the above checks fail, you will need to build a \n+new kernel following steps 1 through 3 listed below.\n+\n+The directions below are provided as an example, and are based on Ubuntu 16.04. You\n+will need to do something equivalent for their distribution.\n+\n+1. Grab kernel sources\n+\n+   ```\n+   $ sudo apt-get install linux-source-4.10.0\n+   $ sudo apt-get install linux-headers-4.10.0\n+   $ cd /usr/src/linux-source-4.10.0/\n+   $ sudo tar -xvf linux-source-4.10.0.tar.bz2\n+   $ cd linux-source-4.10.0\n+   $ sudo apt-get install libssl-dev\n+   ```\n+\n+2. Check the `config` file and update if necessary","path":"docs/Using-SRIOV-and-Clear-Containers.md","position":73,"original_position":73,"commit_id":"fc9145c8f5f9f8fb87de8b45464cad744132e8b5","original_commit_id":"fc9145c8f5f9f8fb87de8b45464cad744132e8b5","user":{"login":"rcaballeromx","id":10066027,"avatar_url":"https://avatars1.githubusercontent.com/u/10066027?v=4","gravatar_id":"","url":"https://api.github.com/users/rcaballeromx","html_url":"https://github.com/rcaballeromx","followers_url":"https://api.github.com/users/rcaballeromx/followers","following_url":"https://api.github.com/users/rcaballeromx/following{/other_user}","gists_url":"https://api.github.com/users/rcaballeromx/gists{/gist_id}","starred_url":"https://api.github.com/users/rcaballeromx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcaballeromx/subscriptions","organizations_url":"https://api.github.com/users/rcaballeromx/orgs","repos_url":"https://api.github.com/users/rcaballeromx/repos","events_url":"https://api.github.com/users/rcaballeromx/events{/privacy}","received_events_url":"https://api.github.com/users/rcaballeromx/received_events","type":"User","site_admin":false},"body":"Split this step in two:\r\nTo verify the `config` file, enter the following command:\r\nTo update the `config` file, enter the following command:\r\nYou will also need to split the two commands and place them where appropriate.","created_at":"2017-11-30T16:34:05Z","updated_at":"2017-11-30T16:44:59Z","html_url":"https://github.com/clearcontainers/runtime/pull/810#discussion_r154129995","pull_request_url":"https://api.github.com/repos/clearcontainers/runtime/pulls/810","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/clearcontainers/runtime/pulls/comments/154129995"},"html":{"href":"https://github.com/clearcontainers/runtime/pull/810#discussion_r154129995"},"pull_request":{"href":"https://api.github.com/repos/clearcontainers/runtime/pulls/810"}},"in_reply_to_id":153955113},"pull_request":{"url":"https://api.github.com/repos/clearcontainers/runtime/pulls/810","id":152635552,"html_url":"https://github.com/clearcontainers/runtime/pull/810","diff_url":"https://github.com/clearcontainers/runtime/pull/810.diff","patch_url":"https://github.com/clearcontainers/runtime/pull/810.patch","issue_url":"https://api.github.com/repos/clearcontainers/runtime/issues/810","number":810,"state":"open","locked":false,"title":"docs: Add documentation for SRIOV","user":{"login":"amshinde","id":7132811,"avatar_url":"https://avatars0.githubusercontent.com/u/7132811?v=4","gravatar_id":"","url":"https://api.github.com/users/amshinde","html_url":"https://github.com/amshinde","followers_url":"https://api.github.com/users/amshinde/followers","following_url":"https://api.github.com/users/amshinde/following{/other_user}","gists_url":"https://api.github.com/users/amshinde/gists{/gist_id}","starred_url":"https://api.github.com/users/amshinde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amshinde/subscriptions","organizations_url":"https://api.github.com/users/amshinde/orgs","repos_url":"https://api.github.com/users/amshinde/repos","events_url":"https://api.github.com/users/amshinde/events{/privacy}","received_events_url":"https://api.github.com/users/amshinde/received_events","type":"User","site_admin":false},"body":"Most of the documentation has been moved from 2.x with\r\nsome cleanup and references to the 3.0 runtime.\r\n\r\nContributions-by: Archana Shinde <archana.m.shinde@intel.com>\r\n\r\nSigned-off-by: Archana Shinde <archana.m.shinde@intel.com>","created_at":"2017-11-14T22:28:01Z","updated_at":"2017-11-30T16:44:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c3f1625624380c0eddf44defa50d604778840ef","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/clearcontainers/runtime/pulls/810/commits","review_comments_url":"https://api.github.com/repos/clearcontainers/runtime/pulls/810/comments","review_comment_url":"https://api.github.com/repos/clearcontainers/runtime/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clearcontainers/runtime/issues/810/comments","statuses_url":"https://api.github.com/repos/clearcontainers/runtime/statuses/fc9145c8f5f9f8fb87de8b45464cad744132e8b5","head":{"label":"amshinde:sriov-docs","ref":"sriov-docs","sha":"fc9145c8f5f9f8fb87de8b45464cad744132e8b5","user":{"login":"amshinde","id":7132811,"avatar_url":"https://avatars0.githubusercontent.com/u/7132811?v=4","gravatar_id":"","url":"https://api.github.com/users/amshinde","html_url":"https://github.com/amshinde","followers_url":"https://api.github.com/users/amshinde/followers","following_url":"https://api.github.com/users/amshinde/following{/other_user}","gists_url":"https://api.github.com/users/amshinde/gists{/gist_id}","starred_url":"https://api.github.com/users/amshinde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amshinde/subscriptions","organizations_url":"https://api.github.com/users/amshinde/orgs","repos_url":"https://api.github.com/users/amshinde/repos","events_url":"https://api.github.com/users/amshinde/events{/privacy}","received_events_url":"https://api.github.com/users/amshinde/received_events","type":"User","site_admin":false},"repo":{"id":89974606,"name":"runtime","full_name":"amshinde/runtime","owner":{"login":"amshinde","id":7132811,"avatar_url":"https://avatars0.githubusercontent.com/u/7132811?v=4","gravatar_id":"","url":"https://api.github.com/users/amshinde","html_url":"https://github.com/amshinde","followers_url":"https://api.github.com/users/amshinde/followers","following_url":"https://api.github.com/users/amshinde/following{/other_user}","gists_url":"https://api.github.com/users/amshinde/gists{/gist_id}","starred_url":"https://api.github.com/users/amshinde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amshinde/subscriptions","organizations_url":"https://api.github.com/users/amshinde/orgs","repos_url":"https://api.github.com/users/amshinde/repos","events_url":"https://api.github.com/users/amshinde/events{/privacy}","received_events_url":"https://api.github.com/users/amshinde/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amshinde/runtime","description":"OCI (Open Containers Initiative) compatible runtime ","fork":true,"url":"https://api.github.com/repos/amshinde/runtime","forks_url":"https://api.github.com/repos/amshinde/runtime/forks","keys_url":"https://api.github.com/repos/amshinde/runtime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amshinde/runtime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amshinde/runtime/teams","hooks_url":"https://api.github.com/repos/amshinde/runtime/hooks","issue_events_url":"https://api.github.com/repos/amshinde/runtime/issues/events{/number}","events_url":"https://api.github.com/repos/amshinde/runtime/events","assignees_url":"https://api.github.com/repos/amshinde/runtime/assignees{/user}","branches_url":"https://api.github.com/repos/amshinde/runtime/branches{/branch}","tags_url":"https://api.github.com/repos/amshinde/runtime/tags","blobs_url":"https://api.github.com/repos/amshinde/runtime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amshinde/runtime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amshinde/runtime/git/refs{/sha}","trees_url":"https://api.github.com/repos/amshinde/runtime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amshinde/runtime/statuses/{sha}","languages_url":"https://api.github.com/repos/amshinde/runtime/languages","stargazers_url":"https://api.github.com/repos/amshinde/runtime/stargazers","contributors_url":"https://api.github.com/repos/amshinde/runtime/contributors","subscribers_url":"https://api.github.com/repos/amshinde/runtime/subscribers","subscription_url":"https://api.github.com/repos/amshinde/runtime/subscription","commits_url":"https://api.github.com/repos/amshinde/runtime/commits{/sha}","git_commits_url":"https://api.github.com/repos/amshinde/runtime/git/commits{/sha}","comments_url":"https://api.github.com/repos/amshinde/runtime/comments{/number}","issue_comment_url":"https://api.github.com/repos/amshinde/runtime/issues/comments{/number}","contents_url":"https://api.github.com/repos/amshinde/runtime/contents/{+path}","compare_url":"https://api.github.com/repos/amshinde/runtime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amshinde/runtime/merges","archive_url":"https://api.github.com/repos/amshinde/runtime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amshinde/runtime/downloads","issues_url":"https://api.github.com/repos/amshinde/runtime/issues{/number}","pulls_url":"https://api.github.com/repos/amshinde/runtime/pulls{/number}","milestones_url":"https://api.github.com/repos/amshinde/runtime/milestones{/number}","notifications_url":"https://api.github.com/repos/amshinde/runtime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amshinde/runtime/labels{/name}","releases_url":"https://api.github.com/repos/amshinde/runtime/releases{/id}","deployments_url":"https://api.github.com/repos/amshinde/runtime/deployments","created_at":"2017-05-02T00:25:22Z","updated_at":"2017-05-02T00:25:23Z","pushed_at":"2017-11-29T22:28:26Z","git_url":"git://github.com/amshinde/runtime.git","ssh_url":"git@github.com:amshinde/runtime.git","clone_url":"https://github.com/amshinde/runtime.git","svn_url":"https://github.com/amshinde/runtime","homepage":"","size":14179,"stargazers_count":0,"watchers_count":0,"language":"Go","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"clearcontainers:master","ref":"master","sha":"c3e0acaf859b0931dcd751b816171c6dd519037c","user":{"login":"clearcontainers","id":24325390,"avatar_url":"https://avatars1.githubusercontent.com/u/24325390?v=4","gravatar_id":"","url":"https://api.github.com/users/clearcontainers","html_url":"https://github.com/clearcontainers","followers_url":"https://api.github.com/users/clearcontainers/followers","following_url":"https://api.github.com/users/clearcontainers/following{/other_user}","gists_url":"https://api.github.com/users/clearcontainers/gists{/gist_id}","starred_url":"https://api.github.com/users/clearcontainers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clearcontainers/subscriptions","organizations_url":"https://api.github.com/users/clearcontainers/orgs","repos_url":"https://api.github.com/users/clearcontainers/repos","events_url":"https://api.github.com/users/clearcontainers/events{/privacy}","received_events_url":"https://api.github.com/users/clearcontainers/received_events","type":"Organization","site_admin":false},"repo":{"id":79110123,"name":"runtime","full_name":"clearcontainers/runtime","owner":{"login":"clearcontainers","id":24325390,"avatar_url":"https://avatars1.githubusercontent.com/u/24325390?v=4","gravatar_id":"","url":"https://api.github.com/users/clearcontainers","html_url":"https://github.com/clearcontainers","followers_url":"https://api.github.com/users/clearcontainers/followers","following_url":"https://api.github.com/users/clearcontainers/following{/other_user}","gists_url":"https://api.github.com/users/clearcontainers/gists{/gist_id}","starred_url":"https://api.github.com/users/clearcontainers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clearcontainers/subscriptions","organizations_url":"https://api.github.com/users/clearcontainers/orgs","repos_url":"https://api.github.com/users/clearcontainers/repos","events_url":"https://api.github.com/users/clearcontainers/events{/privacy}","received_events_url":"https://api.github.com/users/clearcontainers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/clearcontainers/runtime","description":"OCI (Open Containers Initiative) compatible runtime using Virtual Machines","fork":false,"url":"https://api.github.com/repos/clearcontainers/runtime","forks_url":"https://api.github.com/repos/clearcontainers/runtime/forks","keys_url":"https://api.github.com/repos/clearcontainers/runtime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clearcontainers/runtime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clearcontainers/runtime/teams","hooks_url":"https://api.github.com/repos/clearcontainers/runtime/hooks","issue_events_url":"https://api.github.com/repos/clearcontainers/runtime/issues/events{/number}","events_url":"https://api.github.com/repos/clearcontainers/runtime/events","assignees_url":"https://api.github.com/repos/clearcontainers/runtime/assignees{/user}","branches_url":"https://api.github.com/repos/clearcontainers/runtime/branches{/branch}","tags_url":"https://api.github.com/repos/clearcontainers/runtime/tags","blobs_url":"https://api.github.com/repos/clearcontainers/runtime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clearcontainers/runtime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clearcontainers/runtime/git/refs{/sha}","trees_url":"https://api.github.com/repos/clearcontainers/runtime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clearcontainers/runtime/statuses/{sha}","languages_url":"https://api.github.com/repos/clearcontainers/runtime/languages","stargazers_url":"https://api.github.com/repos/clearcontainers/runtime/stargazers","contributors_url":"https://api.github.com/repos/clearcontainers/runtime/contributors","subscribers_url":"https://api.github.com/repos/clearcontainers/runtime/subscribers","subscription_url":"https://api.github.com/repos/clearcontainers/runtime/subscription","commits_url":"https://api.github.com/repos/clearcontainers/runtime/commits{/sha}","git_commits_url":"https://api.github.com/repos/clearcontainers/runtime/git/commits{/sha}","comments_url":"https://api.github.com/repos/clearcontainers/runtime/comments{/number}","issue_comment_url":"https://api.github.com/repos/clearcontainers/runtime/issues/comments{/number}","contents_url":"https://api.github.com/repos/clearcontainers/runtime/contents/{+path}","compare_url":"https://api.github.com/repos/clearcontainers/runtime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clearcontainers/runtime/merges","archive_url":"https://api.github.com/repos/clearcontainers/runtime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clearcontainers/runtime/downloads","issues_url":"https://api.github.com/repos/clearcontainers/runtime/issues{/number}","pulls_url":"https://api.github.com/repos/clearcontainers/runtime/pulls{/number}","milestones_url":"https://api.github.com/repos/clearcontainers/runtime/milestones{/number}","notifications_url":"https://api.github.com/repos/clearcontainers/runtime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clearcontainers/runtime/labels{/name}","releases_url":"https://api.github.com/repos/clearcontainers/runtime/releases{/id}","deployments_url":"https://api.github.com/repos/clearcontainers/runtime/deployments","created_at":"2017-01-16T11:00:58Z","updated_at":"2017-11-30T15:03:19Z","pushed_at":"2017-11-30T16:41:08Z","git_url":"git://github.com/clearcontainers/runtime.git","ssh_url":"git@github.com:clearcontainers/runtime.git","clone_url":"https://github.com/clearcontainers/runtime.git","svn_url":"https://github.com/clearcontainers/runtime","homepage":"","size":10544,"stargazers_count":322,"watchers_count":322,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":151,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":38,"open_issues":151,"watchers":322,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clearcontainers/runtime/pulls/810"},"html":{"href":"https://github.com/clearcontainers/runtime/pull/810"},"issue":{"href":"https://api.github.com/repos/clearcontainers/runtime/issues/810"},"comments":{"href":"https://api.github.com/repos/clearcontainers/runtime/issues/810/comments"},"review_comments":{"href":"https://api.github.com/repos/clearcontainers/runtime/pulls/810/comments"},"review_comment":{"href":"https://api.github.com/repos/clearcontainers/runtime/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clearcontainers/runtime/pulls/810/commits"},"statuses":{"href":"https://api.github.com/repos/clearcontainers/runtime/statuses/fc9145c8f5f9f8fb87de8b45464cad744132e8b5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rcaballeromx"}}