Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Commit e2e153d

Browse files
committed
Smart Edge Open 22.04 release
1 parent eae70a8 commit e2e153d

33 files changed

+1340
-694
lines changed

_data/navbars/reference-implementations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright (c) 2022 Intel Corporation
33
title: "Reference Implementations"
44
path: /docs/reference-implementations
5-
order: 7
5+
order: 7

_includes/doc.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
{% endif %}
3838
{% endfor %}
3939
{% assign navbars = navigations | sort:"order" %}
40+
4041
<!-- Start Comment -->
4142
{% comment %}
4243
{% for navbar in navbars %}
@@ -51,8 +52,6 @@ <h5>{{ navbar.title }}</h5>
5152
{% assign doc_url = nav.path | append:"/" %}
5253
<li class="{% if doc_url == repo_path %}uk-active{% endif %}"><a href="{{ nav.path }}">{{ nav.title }}</a></li>
5354
{% endfor %}
54-
</ul>
55-
{% endfor %}
5655
{% endcomment %}
5756
<!-- End Comment -->
5857

@@ -122,6 +121,8 @@ <h5>{{ navbar.title }}</h5>
122121
{% endif %}
123122
{% endfor %}
124123
</ul>
124+
</ul>
125+
{% endfor %}
125126
</div>
126127
</div>
127128
</div>

assets/css/custom.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/networking/sriov-network-operator.md

Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
SPDX-License-Identifier: Apache-2.0
33
Copyright (c) 2019-2020 Intel Corporation
44
```
5+
56
# SR-IOV Network Operator
67

78
- [SR-IOV Network Operator](#sr-iov-network-operator)
@@ -19,18 +20,22 @@ Copyright (c) 2019-2020 Intel Corporation
1920
- [Reference](#reference)
2021

2122
## Overview
23+
2224
Edge deployments consist of both network functions and applications. Cloud-native solutions such as Kubernetes* typically expose only one interface to the application or network function pods. These interfaces are typically bridged interfaces. This means that network functions like Base station or Core network User plane functions and applications such as CDN are limited by the default interface. To address this, two key networking features must be enabled:
2325

2426
1. Enable a Kubernetes like orchestration environment to provision more than one interface to the application and network function pods.
2527
2. Enable the allocation of dedicated hardware interfaces to application and network function pods.
2628

2729
### Overview of SR-IOV CNI
30+
2831
The Single Root I/O Virtualization (SR-IOV) feature provides the ability to partition a single physical PCI resource into virtual PCI functions that can be allocated to application and network function pods. The SR-IOV CNI plugin enables the Kubernetes pod to be attached directly to an SR-IOV virtual function (VF) using the standard SR-IOV VF driver in the container host’s kernel.
2932

3033
### Overview of SR-IOV Device Plugin
34+
3135
The Intel SR-IOV Network device plugin discovers and exposes SR-IOV network resources as consumable extended resources in Kubernetes. This works with SR-IOV VFs in both Kernel drivers and DPDK drivers. When a VF is attached with a kernel driver, the SR-IOV CNI plugin can be used to configure this VF in the pod. When using the DPDK driver, a VNF application configures this VF as required.
3236

3337
### Overview of SR-IOV Network Operator
38+
3439
To enable SR-IOV device resource allocation and CNI, Intel® Smart Edge Open uses the SR-IOV Network Operator which wraps SR-IOV CNI and SR-IOV Device Plugin to one simple component. Operator uses custom resources like `SriovNetworkNodePolicy` and `SriovNetwork` to configure SR-IOV plugins and [Multus](./multus.md) CNI.
3540

3641
## SR-IOV Network Operator configuration and usage
@@ -40,40 +45,53 @@ SR-IOV Network Operator is deployed using Makefiles and it requires additional p
4045
Images for Operator are downloaded from Openshift repository and stored in local registry.
4146

4247
### Configuration
48+
4349
#### SR-IOV Network Operator
4450

45-
The SR-IOV NIC's are preconfigured, i.e. currently the list of network interfaces is hard coded (for supported HW platform).
51+
The SR-IOV NICs are preconfigured, i.e. the list of network interfaces (for supported HW platform), in 2 ways:
52+
53+
1) Automatically: By using the [SR-IOV NICs Detection Application](https://github.com/smart-edge-open/docs/blob/main/components/networking/sriov-detection-app.md). In order to use it:
54+
55+
- Find the relevant platform In `platform_profiles` directory.
56+
- In the relevant sub directory configure `all.yml` file according to the instructions in [How to edit the configuration YAML file](https://github.com/smart-edge-open/docs/blob/main/components/networking/sriov-detection-app.md#how-to-edit-the-configuration-yaml-file)
57+
- Make sure that the number of NICs in `sriov_nics` variable is identical to the number of PFs in `criteriaLists` variable.
58+
59+
2) Manually: The SR-IOV NIC's are preconfigured, i.e. currently the list of network interfaces is hard coded (for supported HW platform).
4660
Users who are installing the DEK on a system with a different NIC's must update manually the list above with the related interface names in the ESP provisioning configuration file (before Smart Edge Open deployment):
4761

4862
- generate a custom configuration file with `./dek_provision.py --init-config > custom.yml`
49-
- edit generated file and set `cvl_sriov_nics` under `group vars: all:`, e.g.
50-
51-
```yaml
52-
profiles:
53-
- name: SEO_DEK
54-
[...]
55-
group_vars:
56-
groups:
57-
all:
58-
cvl_sriov_nics:
59-
Debian:
60-
c0p0: "<interface name>"
61-
c0p1: "<interface name>"
62-
c1p0: "<interface name>"
63-
c1p1: "<interface name>"
64-
```
63+
- edit generated file and disable automatic interface detection by setting the flag: `sriov_network_detection_application_enable` to false under under `group vars: all
64+
- edit generated file and set `sriov_nics` under `group vars: all:`, e.g.
65+
66+
```yaml
67+
profiles:
68+
- name: SEO_DEK
69+
[...]
70+
group_vars:
71+
groups:
72+
all:
73+
sriov_network_detection_application_enable: false
74+
sriov_nics:
75+
c0p0: "<interface name>"
76+
c0p1: "<interface name>"
77+
c1p0: "<interface name>"
78+
c1p1: "<interface name>"
79+
```
6580
6681
During deployment users can use a flag (in the same yml file) which allows for enabling and disabling the NIC's configuration: "sriov_network_operator_configure_enable".
6782
6883
Each NIC interface in the list above is a physical function of a SR-IOV NIC and configured in the same yml file in:
84+
6985
- The related VF's in the next section: "sriov_network_node_policies".
7086
- The routing data in the section: "sriov_networks".
7187
7288
SR-IOV Network Operator provides two custom resources to configure SR-IOV network devices and network attachments:
7389
7490
#### SR-IOV Network Node Policy
91+
7592
Specifies SR-IOV network device configuration by e.g. creating VFs from given NIC interface/PCI address or its priority and defines Config Map for SR-IOV Device plugin. To apply resource to the Operator just simply use command: `kubectl apply -f sample-policy.yml`.
7693
Sample Policy can look like:
94+
7795
```yaml
7896
apiVersion: sriovnetwork.openshift.io/v1
7997
kind: SriovNetworkNodePolicy
@@ -90,13 +108,16 @@ spec:
90108
deviceID: "159b"
91109
rootDevices: ["0000:31:00.0"]
92110
```
111+
93112
> **NOTE:** After applying it, Operator will create 4 VFs from given Interface and create Config Map for SR-IOV Device plugin with defined `intel_sriov_netdevice` as allocable resource and mapped from given interface.
94113

95-
> **NOTE:** If `SriovNetworkNodePolicy` should be applied only on specific node, `kubernetes.io/hostname: "<hostname>"` should be added to `nodeSelector` field.
114+
> **NOTE:** If `SriovNetworkNodePolicy` should be applied only on specific node, `kubernetes.io/hostname: "<hostname>"` should be added to `nodeSelector` field.
96115

97116
#### SR-IOV Network
117+
98118
It defines and configures Network attachment for Multus/SR-IOV CNI. To apply resource to the Operator just simply use command: `kubectl apply -f sample-network.yml`.
99119
Sample network can look like:
120+
100121
```yaml
101122
apiVersion: sriovnetwork.openshift.io/v1
102123
kind: SriovNetwork
@@ -116,9 +137,11 @@ spec:
116137
"gateway": "192.168.2.1"
117138
}
118139
```
140+
119141
> **NOTE:** After applying it, Operator will create Network Attachment Definition for Multus/SR-IOV CNI plugin with defined `sriov-seo` network, which applies to `intel_sriov_netdevice` allocable resource in `default` namespace.
120142

121143
### Usage
144+
122145
To create a pod with an attached SR-IOV device, add the network annotation (`sriov-seo`) to the pod definition and request access to the SR-IOV capable device (`intel.com/intel_sriov_netdevice`):
123146

124147
```yaml
@@ -158,10 +181,13 @@ To verify that the additional interface was configured, run `ip a` in the deploy
158181
inet 192.168.2.2/24 brd 192.168.2.255 scope global net1
159182
valid_lft forever preferred_lft forever
160183
```
184+
161185
> **NOTE**: Interface `net1` is SR-IOV net device.
162186

163187
## Limitations
188+
164189
It was observed that on Ubuntu 20.04, configuring SR-IOV devices via `SriovNetworkNodePolicy` using `pfNames` on CLV NIC can cause some problems. To avoid this issue it is recommended to use `rootDevices`(see [example above](#sr-iov-network-node-policy)) instead of `pfNames`. To get PCI address of devices `lshw -c network -businfo` command can be used, i.g:
190+
165191
```bash
166192
$ lshw -c network -businfo
167193
Bus info Device Class Description
@@ -173,13 +199,16 @@ pci@0000:31:00.1 eno12409 network Intel Corporation
173199
pci@0000:b1:00.0 ens5f0 network Intel Corporation
174200
pci@0000:b1:00.1 ens5f1 network Intel Corporation
175201
```
202+
176203
There is also observed that on Ubuntu 20.04 with only one type of SR-IOV NIC which is CLV, there can be lack of label on the node: `feature.node.kubernetes.io/network-sriov.capable: "true"`. To properly apply CLV SR-IOV NIC configuration via `SriovNetworkNodePolicy` using `nodeSelector` use entries like `kubernetes.io/hostname: "<hostname>"` (`<hostname>` should be replaced by node hostname) or `sriov-network-operator-node: "yes"`. Using [example above](#sr-iov-network-node-policy) `feature.node.kubernetes.io/network-sriov.capable: "true"` can be replaced with given examples.
177204

178205
## Reference
206+
179207
For further details:
180-
- Multus: https://github.com/k8snetworkplumbingwg/multus-cni
181-
- SR-IOV CNI: https://github.com/k8snetworkplumbingwg/sriov-cni
182-
- SR-IOV Network Device Plugin: https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin
183-
- SR-IOV Network Operator: https://github.com/k8snetworkplumbingwg/sriov-network-operator
184-
- SR-IOV network node policy [(`SriovNetworkNodePolicy`)](#sr-iov-network-node-policy): https://docs.openshift.com/container-platform/4.7/networking/hardware_networks/configuring-sriov-device.html
185-
- Ethernet network device [(`SriovNetwork`)](#sr-iov-network): https://docs.openshift.com/container-platform/4.7/networking/hardware_networks/configuring-sriov-net-attach.html
208+
209+
- Multus: <https://github.com/k8snetworkplumbingwg/multus-cni>
210+
- SR-IOV CNI: <https://github.com/k8snetworkplumbingwg/sriov-cni>
211+
- SR-IOV Network Device Plugin: <https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin>
212+
- SR-IOV Network Operator: <https://github.com/k8snetworkplumbingwg/sriov-network-operator>
213+
- SR-IOV network node policy [(`SriovNetworkNodePolicy`)](#sr-iov-network-node-policy): <https://docs.openshift.com/container-platform/4.7/networking/hardware_networks/configuring-sriov-device.html>
214+
- Ethernet network device [(`SriovNetwork`)](#sr-iov-network): <https://docs.openshift.com/container-platform/4.7/networking/hardware_networks/configuring-sriov-net-attach.html>

0 commit comments

Comments
 (0)