From 8673474efc2cbfc596f632ffc331ee2aa85f2551 Mon Sep 17 00:00:00 2001 From: Peng Liu Date: Wed, 13 Nov 2019 12:13:52 +0800 Subject: [PATCH] Add guide for high performance multicast --- ...high-performance-multicast-with-sriov.adoc | 100 ++++++++++++++++++ .../multiple-networks/configuring-sr-iov.adoc | 2 + 2 files changed, 102 insertions(+) create mode 100644 modules/nw-configuring-high-performance-multicast-with-sriov.adoc diff --git a/modules/nw-configuring-high-performance-multicast-with-sriov.adoc b/modules/nw-configuring-high-performance-multicast-with-sriov.adoc new file mode 100644 index 0000000000..dab140a229 --- /dev/null +++ b/modules/nw-configuring-high-performance-multicast-with-sriov.adoc @@ -0,0 +1,100 @@ +// Module included in the following assemblies: +// +// * networking/multiple-networks/configuring-sr-iov.adoc + += Configuring performance multicast + +Openshift SDN supports multicast between Pods on the default network. This is best used for low-bandwidth coordination or service discovery, and not a high-bandwidth solution. For applications of streaming media, such as IPTV and +multipoint videoconferencing, you can utilize SR-IOV to provide near-native +performance. + +When using additional SR-IOV interfaces for multicast: + +* Multicast packages must be sent or received by a Pod through the additional SR-IOV +interface. +* The physical network which connects the SR-IOV interfaces decides the +multicast routing and topology, which is not controlled by Openshift. + += Using an SR-IOV interface for multicast + +The follow procedure creates an example SR-IOV interface for multicast. + +.Prerequisites + +* Install the OpenShift Command-line Interface (CLI), commonly known as `oc`. +* You must log in to the cluster with a user that has the `cluster-admin` role. + +.Procedure +. Create a SriovNetworkNodePolicy CR + ++ +[source,yaml] +---- +apiVersion: sriovnetwork.openshift.io/v1 +kind: SriovNetworkNodePolicy +metadata: + name: policy-example + namespace: openshift-sriov-network-operator +spec: + resourceName: example + nodeSelector: + feature.node.kubernetes.io/network-sriov.capable: "true" + numVfs: 4 + nicSelector: + vendor: "8086" + pfName: ['ens803f0'] + rootDevices: ['0000:86:00.0'] +---- + +. Create a SriovNetwork CR ++ +[source,yaml] +---- +apiVersion: sriovnetwork.openshift.io/v1 +kind: SriovNetwork +metadata: + name: net-example + namespace: openshift-sriov-network-operator +spec: + networkNamespace: default + ipam: | + { + "type": "host-local", <1> + "subnet": "10.56.217.0/24", + "rangeStart": "10.56.217.171", + "rangeEnd": "10.56.217.181", + "routes": [ + {"dst": "224.0.0.0/5"}, + {"dst": "232.0.0.0/5"} + ], + "gateway": "10.56.217.1" + } + resourceName: example +---- +<1> Make sure to provision the following default routes through your DHCP server +224.0.0.0/5, 232.0.0.0/5, if you choose to use DHCP as IPAM. This is to override +the static multicast route set by Openshift-SDN. + +. User can now create a Pod with multicast application ++ +[source,yaml] +---- +apiVersion: v1 +kind: Pod +metadata: + name: testpmd + namespace: default + annotations: + k8s.v1.cni.cncf.io/networks: nic1 +spec: + containers: + - name: example + image: rhel7:latest + securityContext: + capabilities: + add: ["NET_ADMIN"] <1> + command: [ "sleep", "infinity"] +---- +<1> The NET_ADMIN capability is only required if your application needs to +assign the multicast IP address to the SR-IOV interface. Otherwise, it can be +omitted. diff --git a/networking/multiple-networks/configuring-sr-iov.adoc b/networking/multiple-networks/configuring-sr-iov.adoc index 859f54671b..ecbcfdc6e5 100644 --- a/networking/multiple-networks/configuring-sr-iov.adoc +++ b/networking/multiple-networks/configuring-sr-iov.adoc @@ -125,3 +125,5 @@ include::modules/nw-multus-add-pod.adoc[leveloffset=+1] include::modules/nw-sriov-add-pod-runtimeconfig.adoc[leveloffset=+1] include::modules/nw-sriov-topology-manager.adoc[leveloffset=+1] + +include::modules/nw-configuring-high-performance-multicast-with-sriov.adoc[leveloffset=+1]