Skip to content

Commit

Permalink
Add introduction for this plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcat committed Jun 30, 2016
1 parent f189961 commit 0e0e363
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions plugins/main/sriov/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# SR-IOV CNI plugin

NIC with [SR-IOV](http://blog.scottlowe.org/2009/12/02/what-is-sr-iov/) capabilities works by introducing the idea of physical functions (PFs) and virtual functions (VFs).

PF is used by host.Each VFs can be treated as a separate physical NIC and assigned to one container, and configured with separate MAC, VLAN and IP, etc.

## Enable SR-IOV

Given Intel ixgbe NIC on CentOS, Fedora or RHEL:
Expand All @@ -9,6 +13,16 @@ Given Intel ixgbe NIC on CentOS, Fedora or RHEL:
options ixgbe max_vfs=8,8
```

## Network configuration reference

* `name` (string, required): the name of the network
* `type` (string, required): "sriov"
* `master` (string, required): name of the PF
* `vf` (int, optional): VF index, default value is 0
* `vlan` (int, optional): VLAN ID for VF device
* `mac` (string, optional): mac address for VF device
* `ipam` (dictionary, required): IPAM configuration to be used for this network.

## Usage

Given the following network configuration:
Expand All @@ -35,14 +49,15 @@ EOF

```
# CNI_PATH=$CNI_PATH CNI_ARGS="IP=10.55.206.46" ./priv-net-run.sh ifconfig
eth0 Link encap:Ethernet HWaddr A6:9A:3B:00:63:16
eth0 Link encap:Ethernet HWaddr 66:D8:02:77:AA:AA
inet addr:10.55.206.46 Bcast:0.0.0.0 Mask:255.255.255.192
inet6 addr: fe80::a49a:3bff:fe00:6316/64 Scope:Link
inet6 addr: fe80::64d8:2ff:fe77:aaaa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:90 (90.0 b)
RX bytes:530 (530.0 b) TX bytes:988 (988.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
Expand Down

0 comments on commit 0e0e363

Please sign in to comment.