Configuring 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 load the virtio drivers and configure the network for the virtio devices on the IPU.

Before you begin

Make sure that you have:

About this task

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, load the virtio_net driver if it is not loaded.
    Check whether the virtio_net driver is loaded.
    soc# lsmod | grep virtio
    An output example:
    virtio_net             65536  0
    net_failover           24576  1 virtio_net
    If virtio_net is not listed, run the following commands.
    soc# modprobe virtio
    soc# modprobe virtio_pci
    soc# modprobe virtio_net
  2. On the IPU, check the virtio devices.
    soc# ip -br link
    After the virtio_net driver is loaded, the virtio devices are recognized as Linux kernel network devices. This is an output example with the bard-metal FPGA image on the IPU.
    …
    …
    ens6f3 DOWN 00:e8:ca:11:bf:7d <BROADCAST,MULTICAST>
    ens6f4 DOWN 00:e8:ca:11:bf:7c <BROADCAST,MULTICAST>
    ens6f5 DOWN 00:e8:ca:11:bf:7b <BROADCAST,MULTICAST>
    ens6f6 DOWN 00:e8:ca:11:bf:7a <BROADCAST,MULTICAST>
    ens6f7 DOWN 00:e8:ca:11:bf:79 <BROADCAST,MULTICAST>
    Network device names may vary depending on the kernel version and network configuration. Physical function 7 has a MAC address ending with :79 and physical function 6 has a MAC address ending with :7a. In this case, ens6f7 and ens6f6, respectively.
  3. On the IPU, create namespaces.
    Namespaces can be used to isolate network configuration for each physical function and simplify OVS testing. To create 2 namespaces on the same IPv4 subnet as the host, run commands as follows.
    soc# ip netns add soc7
    soc# ip link set ens6f7 netns soc7 
    soc# ip netns exec soc7 ip addr add 192.168.1.37/24 dev ens6f7 
    soc# ip netns exec soc7 ip link set ens6f7 up
    
    soc# ip netns add soc6
    soc# ip link set ens6f6 netns soc6 
    soc# ip netns exec soc6 ip addr add 192.168.1.36/24 dev ens6f6 
    soc# ip netns exec soc6 ip link set ens6f6 up
    Two namespaces are configured as follows:
    Namespace Kernel net device name IP address
    soc7 ens6f7 192.168.1.37
    soc6 ens6f6 192.168.1.36
  4. On the host, check IP addresses.
    To check the IP address of the PF7 interface, run the following command.
    host# ip netns exec soc7 ip addr
    An output example:
    1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    9: ens6f7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 00:e8:ca:11:bf:79 brd ff:ff:ff:ff:ff:ff
        altname enp21s0f7
        inet 192.168.1.37/24 scope global ens6f7
           valid_lft forever preferred_lft forever
        inet6 fe80::2e8:caff:fe11:bf79/64 scope link
           valid_lft forever preferred_lft forever
    The following command is to check the IP address of the PF6 interface.
    host# ip netns exec soc6 ip addr
    An output example:
    1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    8: ens6f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
        link/ether 00:e8:ca:11:bf:7a brd ff:ff:ff:ff:ff:ff
        altname enp21s0f6
        inet 192.168.1.36/24 scope global ens6f6
           valid_lft forever preferred_lft forever
        inet6 fe80::2e8:caff:fe11:bf7a/64 scope link
           valid_lft forever preferred_lft forever
  5. On the host, ping between one namespace of the IPU and another namespace of the host to test the connectivity.
    For example:
    host# ip netns exec soc7 ping 192.168.1.36
    host# ip netns exec soc7 ping 192.168.1.10