Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
/ sriov Public archive

Simple standalone Docker Plugin implementation to demonstrate Clear Containers with SRIOV

License

Notifications You must be signed in to change notification settings

clearcontainers/sriov

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DISCONTINUATION OF PROJECT

This project will no longer be maintained by Intel.

Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.

Intel no longer accepts patches to this project.

If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the open source software community, please create your own fork of this project.

sriov

Simple standalone Docker Plugin implementation to demonstrate Clear Containers with SRIOV

For more details about Clear Containers https://github.com/clearcontainers https://clearlinux.org/clear-containers

This plugin supports Docker containers with runc or Clear Containers as the OCI runtime. The plugin is responsible for assigning a SRIOV Virtual Function (VF) into the container namespace.

In the case of runc containers, the VF is directly usable by the container.

In the case of clear containers, if clear containers detect a VF in the namespace, the runtime will unbind the VF from the host, bind it to VFIO and assign it to the clear container using PCI device pass thro. The clear container runtime which support SRIOV can be found at https://github.com/clearcontainers/runtime

How to use this plugin

  1. Build this plugin.

     go build
    
  2. Ensure that your plugin is discoverable https://docs.docker.com/engine/extend/plugin_api/#/plugin-discovery

     sudo cp sriov.json /etc/docker/plugins
    
  3. Start the plugin

     sudo ./sriov &
    
  4. Identify the network interface name of the SRIOV NIC Physical Function (PF) that is connected to the physical network of interest.

  5. Try plugin with Docker runc containers

     #Create a virtual network on physical network b2b with vlanid 100
     sudo docker network create -d sriov --internal --opt pf_iface=eth0 --opt vlanid=100 vfnet
    
     #Create container on the network vfnet
     sudo docker run --net=vfnet -itd busybox top
    
     #Check that your containers are running
     sudo docker ps
    
     #Cleanup
     sudo docker stop $(sudo docker ps -a -q)
     sudo docker rm $(sudo docker ps -a -q)
     sudo docker network rm vfnet
    
  6. Try plugin with Docker Clear containers For Clear Containers, the steps to create network and container are essentially the same. However, before we create Clear Container using SRIOV, host OS needs to boot with intel_iommu=on and have vfio-pci module loaded.

Releases

No releases published

Packages

No packages published

Languages