Creating an OVS Bridge on the IPU

Getting Started with OVS Offload Software

Platform
Napatech IPU
Content Type
Getting Started
Capture Software Version
OVS Offload Software 1.0

Use this information to start the OVS on the IPU.

Before you begin

Make sure that you have:

About this task

The following scripts are included in the /opt/ipu_workload_ovs/bin directory of the OVS Offload Software package.
  • setup_ovs_bm.sh
  • start_ovs_bm.sh
These scripts are intended for the bare-metal environment and must be executed once after every reboot.
The provided scripts create an OVS bridge as shown in the following figure.
Page-1 Sheet.115 Host Host Sheet.116 PF0 PF0 Sheet.117 PF1 PF1 Sheet.118 br-int br-int Sheet.119 SoC SoC Sheet.120 PF7 PF7 Sheet.121 PF6 PF6 Sheet.122 Port 0 Port 0 Sheet.123 Port 1 Port 1 Sheet.124 PF0 PF0 Sheet.125 PF1 PF1 Sheet.126 SPF7 SPF7 Sheet.127 SPF6 SPF6

  • The default rule action=NORMAL is set.
  • The ovs-ofctl command can be used to add, delete and modify flow match actions on the bridge.
Note: The following prompts are used to indicate which part of the system to run the provided commands on.
  • soc#: The SoC on the IPU.
  • host#: The server where the IPU is installed.

Procedure

  1. On the IPU, run the following commands.
    soc# source /opt/ipu_workload_ovs/src/init_ovs.sh
    source init_ovs.sh should be executed in any new terminal session.
  2. Execute the scripts.
    soc# /opt/ipu_workload_ovs/bin/setup_ovs_bm.sh
    soc# /opt/ipu_workload_ovs/bin/start_ovs_bm.sh
    An output example of running setup_ovs_bm.sh:
    DDR 0 calibration success.
    DDR 1 calibration success.
    DDR 2 calibration success.
    DDR 3 calibration success.
    
    LTSSSM state on Host side is S_L0.
    PCIe Data Link Layer on Host side is up.
    PCIe link on Host side is up.
    
    LTSSSM state on SoC side is S_L0.
    PCIe Data Link Layer on SoC side is up.
    PCIe link on SoC side is up.
    
    ********************* Link status for phy port 0  *********************
    Link speed: 100000 Mbps
    Link duplex: full-duplex
    Link status: up
    QSFP present: yes
    
    ********************* Link status for phy port 1  *********************
    Link speed: 100000 Mbps
    Link duplex: full-duplex
    Link status: up
    QSFP present: yes
    Done
    An output example of running start_ovs_bm.sh:
    Preparing vhost-user-* path...
    Starting OvS DB server....
    Setting OvS DPDK Configuration...
    Staring OvS VSWITCHD Process....
    Configuring OvS Bridge...
    ovs-vsctl: no bridge named br-provider
    ovs-vsctl: no bridge named br-int
    2023-12-07T11:37:52Z|00001|vlog|INFO|opened log file /tmp/ovs-vswitchd_3.log
    2023-12-07T11:37:52Z|00002|ovs_numa|INFO|Discovered 16 CPU cores on NUMA node 0
    2023-12-07T11:37:52Z|00003|ovs_numa|INFO|Discovered 1 NUMA nodes and 16 CPU cores
    2023-12-07T11:37:52Z|00004|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock: connecting...
    2023-12-07T11:37:52Z|00005|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock: connected
    2023-12-07T11:37:52Z|00006|netdev_offload|INFO|netdev: Flow API Enabled
    2023-12-07T11:37:52Z|00007|tc|INFO|tc: Using policy 'none'
    2023-12-07T11:37:52Z|00008|dpdk|INFO|Using DPDK 20.11.0
    2023-12-07T11:37:52Z|00009|dpdk|INFO|DPDK Enabled - initializing...
    2023-12-07T11:37:52Z|00010|dpdk|INFO|No vhost-sock-dir provided - defaulting to /usr/local/var/run/openvswitch
    2023-12-07T11:37:52Z|00011|dpdk|INFO|IOMMU support for vhost-user-client disabled.
    …
    …
    2023-12-07T11:37:52Z|00060|dpdk|INFO|OFCFG: ------------group 1-----------
    2023-12-07T11:37:52Z|00061|dpdk|INFO|OFCFG: vlan_cfi_en: 0
    2023-12-07T11:37:52Z|00062|dpdk|INFO|OFCFG: qinq_cfi_en: 0
    2023-12-07T11:37:52Z|00063|dpdk|INFO|OFCFG: vxlan_flags_en: 0
    2023-12-07T11:37:52Z|00064|dpdk|INFO|OFCFG: ip_ttl_en: 1
    2023-12-07T11:37:52Z|00065|dpdk|INFO|OFCFG: tcp_flags_en: 0
    2023-12-07T11:37:52Z|00066|dpdk|INFO|OFCFG: --------------end-------------
    2023-12-07T11:37:52Z|00067|dpdk|INFO|EAL: No legacy callbacks, legacy socket not created
    2023-12-07T11:37:52Z|00068|dpdk|INFO|DPDK Enabled - initialized
    megaflows disabled
    Checking that OVS is initialized:
    true
    Displaying OVS version:
    ovs-vswitchd (Open vSwitch) 2.16.2
    DPDK 20.11.0
    Displaying DPDK version:
    "DPDK 20.11.0"
  3. Activate the OVS bridge.
    ip link set dev ovs-netdev up
    ip link set dev br-int up
  4. Verify the configuration.
    ip -br l
    An output example:
    …
    …
    ovs-netdev UP 12:b2:1c:5a:ac:f8 <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP>
    br-int     UP f0:00:00:00:00:20 <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP>
    The output example shows that the OVS interface ovs-netdev and the OVS bridge br-int are currently UP.
    Note: If ovs-netdev and br-int are not UP, running the scripts again may help after stopping the OVS as follows.
    soc# pkill ovs
    soc# /opt/ipu_workload_ovs/bin/setup_ovs_bm.sh
    soc# /opt/ipu_workload_ovs/bin/start_ovs_bm.sh