Skip to content

Commit

Permalink
ovs-hw-offload: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zshi-redhat committed Apr 28, 2020
1 parent 8cfb817 commit d9451b5
Showing 1 changed file with 32 additions and 49 deletions.
81 changes: 32 additions & 49 deletions enhancements/network/ovs-hardware-offload.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Enable OpenFlow hardware offload for OVN datapath

### Non-Goals

Replace OpenFlow software based solution
Using hardware offload for any part of the OpenShift control plane

## Proposal

Expand Down Expand Up @@ -90,22 +90,14 @@ Offload with connection track feature.

- OpenvSwitch package version 2.13.

- Mellanox SR-IOV VF-LAG provides hardware link-aggregation (LAG) for hardware
offloaded ports. It allows offloading of OVS rules to a linux `bond` network
device that combines two idential and hardware offload capable Physical
Functions (PFs). In order to use SR-IOV VF-LAG, a bond interface needs to be
created and used as geneve endpoint of OVS bridge. With the SR-IOV VF LAG
capability, the NIC PFs can receive the rules that the OVS tries to offload to
the linux bond net device and offload them to the hardware e-switch.

#### RHCOS

- RHEL 8.3 be used as RHCOS image base for fully support of OVS Hardware Offload
with connection track feature.

#### OpenvSwitch

- OpenvSwitch package [version 2.13](https://github.com/openshift/ovn-kubernetes/pull/122) is currently used in OpenShift.
- To use OVS Hardware Offload with link redundency, a bond interface needs to
be created and used as geneve endpoint of OVS bridge. Mellanox SR-IOV VF-LAG
provides hardware link-aggregation (LAG) for hardware offloaded ports. It
allows offloading of OVS rules to a linux `bond` network device that combines
two idential and hardware offload capable Physical Functions (PFs). With the
SR-IOV VF LAG capability, the NIC PFs can receive the rules that the OVS tries
to offload to the linux bond net device and offload them to the hardware
e-switch.

#### OVN-Kubernetes

Expand Down Expand Up @@ -151,54 +143,45 @@ Operator) supports advertising VF resource to kubelet.
#### Machine Config Operator (MCO) [optional]

- MCO will be used to create linux bond interface on two identical PFs that
are capable of doing OVS hardware offload and create vlan interfaces on bond
interface. The supported bond modes are `Active-Backup`, `Active-Active`
and `LACP`. This is not required if OVS Hardware Offload is used on PF
device directly.

### User Stories

#### Story 1

Workflow of creating a SR-IOV pod using OVS hardware offload:
- [optional] Deploy a baremetal cluster with API network on bonded PFs
- Enable OVS hardware offload for OpenvSwitch instances via CNO
- Install SR-IOV Operator from Operator Hub
- Provision PFs to desired number of VFs via SR-IOV Operator
- Create a pod specifying cluster network with customized net-attach-def
are capable of doing OVS hardware offload. The supported bond modes are
`Active-Backup`, `Active-Active` and `LACP`. This is not required if OVS
Hardware Offload is used on PF device directly.

### Implementation Details/Notes/Constraints

- When enabling OVS Hardware Offload with SR-IOV VF LAG, PFs should first be
provisioned with desired number of VFs, then configure PFs to `switchdev`
mode, linux bond interface shall be created after above two steps. Since linux
bond configuration can be applied via ignition file, it's important that SR-IOV
Operator (installed in day 2) makes sure `switchdev` configurations are applied
before linux bond configuration, this probably requires a node rebooting to
guarantee the order.
- SR-IOV Operator should first provision PFs with desired number of VFs,
then configure PFs to `switchdev` mode.

- When enabling OVS Hardware Offload with SR-IOV VF LAG, MCO needs to apply
linux bond configuration. It's important that SR-IOV Operator (installed day 2)
makes sure `switchdev` configurations are applied before linux bond
configuration, this probably requires a node rebooting to guarantee the order
if linux bond configuration is applied upfront.

- When enabling OVS `hw-offload` option for OpenvSwitch daemon, it is required
that ovsdb is created first.

### Risks and Mitigations

RHEL-8.3 is not used as base image for RHCOS when 4.6 gets released. RHEL-8.3
contains kernel and driver changes to fully support OVS Hardware Offload with
connection track feature.
RHEL-8.3 contains kernel and driver changes to fully support OVS Hardware
Offload with connection track feature. If RHEL-8.3 is not used for RHCOS in
4.6, OVS Hardware Offload feature will not be fully available.

### Test Plan

- The changes in each relevant component must pass full e2e suite.
- OVS hardware offload functional tests must pass on supported NICs.
- Origin e2e tests mast pass on bare metal with OVS Hardware Offload enabled
in OpenvSwitch daemon.
- OVS hardware offload function must work on supported NICs.

### Graduation Criteria

Tech Preview:
- MCO supports configuring bond and vlan interfaces
- Cluster Network Operator has API definition to enable OVS hardware offload
- OVN-Kubernetes can configure VF and associated representor
- Document how to use customized net-attach-def with Multus
- SR-IOV Operator has API definition to configure `switchdev` device type
To Tech Preview:
- Bare metal cluster can be brought up when hardware offload is enabled.
- A mixed of pods using offload and not using offload can co-exist on
different nodes and communicate with each other.
- Network policies can be applied to block pod-to-pod, service-to-service
and pod-to-service traffic.

### Upgrade / Downgrade Strategy

Expand Down

0 comments on commit d9451b5

Please sign in to comment.