Skip to content

revisit sriov support #213

@sunya-ch

Description

@sunya-ch
spec:
  subnet: "172.34.0.0/16"
  ipam: |
    {
      "type": "multi-nic-ipam",
      "hostBlock": 8,
      "interfaceBlock": 2,
      "vlanMode": "l2"
    }
  multiNICIPAM: true
  plugin:
    cniVersion: "0.3.0"
    type: sriov
    args:
      numVfs: "2"
      isRdma: "true"

Sample MultiNicNetwork

How it works?

Requires sriov-operator to operate configuration

Controller automatically generate NetworkAttachmentDefinition (NAD)

The important function is GetConfig function

It does the following steps:

    1. create a new SriovNetworkPolicy (new resource name generated from MultiNicNetwork name) if the resourceName is not defined in args.
      • The policy is created from the provided args including priority, mtu, numVfs, isRdma, needVhostNet
      • The policy will automatically add the rootDevices field from the network address defined in spec.masterNets if exists
    1. create SriovNetwork --> this SriovNetwork will be operated by sriov operator and generate a different NAD
    1. render NAD from the sriovnet and add resource name from the step in annotations.

The key is step 1 and step 3.

Note that, step 2 might not require the creation to the API server. Need to check whether sriov operator does anything else more than just creating a NAD.

The functionalities of Muti-NIC CNI for SR-IoV use case is that,

  1. Auto generate sriovnetwork policy and corresponding NAD by list of network addresses (single point of definition)
  2. Apply Multi-NIC IPAM to compute host-interface range CIDR which allow applying L3 policy on each interface

Tasks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions