Skip to content

Commit 87fc1f8

Browse files
authored
Merge pull request #63405 from rohennes/TELCODOCS-1187-SRIOV-VFs-DayTwo
TELCODOCS-1187: Day 2 operations for VFs with NMState
2 parents 02eaf40 + 4793ac5 commit 87fc1f8

File tree

3 files changed

+119
-5
lines changed

3 files changed

+119
-5
lines changed

modules/nw-sriov-dual-nic-con.adoc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99
{product-title} can be deployed on a server with a dual port network interface card (NIC).
1010
You can partition a single, high-speed dual port NIC into multiple virtual functions (VFs) and enable SR-IOV.
1111

12-
[NOTE]
13-
====
14-
Currently, it is not possible to assign virtual functions (VF) for system services such as OVN-Kubernetes and assign other VFs created from the same physical function (PF) to pods connected to the SR-IOV Network Operator.
15-
====
16-
1712
This feature supports the use of bonds for high availability with the Link Aggregation Control Protocol (LACP).
1813

1914
[NOTE]
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/k8s_nmstate/k8s-nmstate-updating-node-network-config.adoc
4+
5+
:_mod-docs-content-type: REFERENCE
6+
[id="virt-example-vf-host-services_{context}"]
7+
= Example: Node network configuration policy for virtual functions (Technology Preview)
8+
9+
Update host network settings for Single Root I/O Virtualization (SR-IOV) network virtual functions (VF) in an existing cluster by applying a `NodeNetworkConfigurationPolicy` manifest.
10+
11+
:FeatureName: Updating host network settings for SR-IOV network VFs
12+
include::snippets/technology-preview.adoc[leveloffset=+1]
13+
14+
You can apply a `NodeNetworkConfigurationPolicy` manifest to an existing cluster to complete the following tasks:
15+
16+
* Configure QoS or MTU host network settings for VFs to optimize performance.
17+
* Add, remove, or update VFs for a network interface.
18+
* Manage VF bonding configurations.
19+
20+
[NOTE]
21+
====
22+
To update host network settings for SR-IOV VFs by using NMState on physical functions that are also managed through the SR-IOV Network Operator, you must set the `externallyManaged` parameter in the relevant `SriovNetworkNodePolicy` resource to `true`. For more information, see the _Additional resources_ section.
23+
====
24+
25+
The following YAML file is an example of a manifest that defines QoS policies for a VF.
26+
This file includes samples values that you must replace with your own information.
27+
28+
[source,yaml]
29+
----
30+
apiVersion: nmstate.io/v1
31+
kind: NodeNetworkConfigurationPolicy
32+
metadata:
33+
name: qos <1>
34+
spec:
35+
nodeSelector: <2>
36+
node-role.kubernetes.io/worker: "" <3>
37+
desiredState:
38+
interfaces:
39+
- name: ens1f0 <4>
40+
description: Change QOS on VF0 <5>
41+
type: ethernet <6>
42+
state: up <7>
43+
ethernet:
44+
sr-iov:
45+
total-vfs: 3 <8>
46+
vfs:
47+
- id: 0 <9>
48+
max-tx-rate: 200 <10>
49+
----
50+
51+
<1> Name of the policy.
52+
<2> Optional: If you do not include the `nodeSelector` parameter, the policy applies to all nodes in the cluster.
53+
<3> This example applies to all nodes with the `worker` role.
54+
<4> Name of the physical function (PF) network interface.
55+
<5> Optional: Human-readable description of the interface.
56+
<6> The type of interface.
57+
<7> The requested state for the interface after configuration.
58+
<8> The total number of VFs.
59+
<9> Identifies the VF with an ID of `0`.
60+
<10> Sets a maximum transmission rate, in Mbps, for the VF. This sample value sets a rate of 200 Mbps.
61+
62+
The following YAML file is an example of a manifest that creates a VLAN interface on top of a VF and adds it to a bonded network interface.
63+
It includes samples values that you must replace with your own information.
64+
65+
[source,yaml]
66+
----
67+
68+
apiVersion: nmstate.io/v1
69+
kind: NodeNetworkConfigurationPolicy
70+
metadata:
71+
name: addvf <1>
72+
spec:
73+
nodeSelector: <2>
74+
node-role.kubernetes.io/worker: "" <3>
75+
maxUnavailable: 3
76+
desiredState:
77+
interfaces:
78+
- name: ens1f0v1 <4>
79+
type: ethernet
80+
state: up
81+
- name: ens1f0v1.477 <5>
82+
type: vlan
83+
state: up
84+
vlan:
85+
base-iface: ens1f0v1 <6>
86+
id: 477
87+
- name: bond0 <7>
88+
description: Add vf <8>
89+
type: bond <9>
90+
state: up <10>
91+
link-aggregation:
92+
mode: active-backup <11>
93+
options:
94+
primary: ens1f1v0.477 <12>
95+
port: <13>
96+
- ens1f1v0.477
97+
- ens1f0v0.477
98+
- ens1f0v1.477 <14>
99+
----
100+
<1> Name of the policy.
101+
<2> Optional: If you do not include the `nodeSelector` parameter, the policy applies to all nodes in the cluster.
102+
<3> This example applies to all nodes with the `worker` role.
103+
<4> Name of the VF network interface.
104+
<5> Name of the VLAN network interface.
105+
<6> The VF network interface to which the VLAN interface is attached.
106+
<7> Name of the bonding network interface.
107+
<8> Optional: Human-readable description of the interface.
108+
<9> The type of interface.
109+
<10> The requested state for the interface after configuration.
110+
<11> The bonding policy for the bond.
111+
<12> The primary attached bonding port.
112+
<13> The ports for the bonded network interface.
113+
<14> In this example, this VLAN network interface is added as an additional interface to the bonded network interface.

networking/k8s_nmstate/k8s-nmstate-updating-node-network-config.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ include::modules/virt-example-bridge-nncp.adoc[leveloffset=+2]
5454

5555
include::modules/virt-example-vlan-nncp.adoc[leveloffset=+2]
5656

57+
include::modules/virt-example-vf-host-services.adoc[leveloffset=+2]
58+
59+
[role="_additional-resources"]
60+
.Additional resources
61+
* xref:../../networking/hardware_networks/configuring-sriov-device.adoc#configuring-sriov-device[Configuring an SR-IOV network device]
62+
5763
include::modules/virt-example-bond-nncp.adoc[leveloffset=+2]
5864

5965
include::modules/virt-example-ethernet-nncp.adoc[leveloffset=+2]

0 commit comments

Comments
 (0)