Developer Guide

  • 2021.1
  • 11/03/2021
  • Public
Contents

Step 1: RTCP Setup

The RTCP workload requires the following setup steps.

Set Up the Hardware

Acquire the following recommended hardware configuration:
Units Needed
Equipment Specifications
1
Host system configured according to the Get Started Guide
1
Target board: Target system configured according to the Get Started Guide
1
Packet generator board: Target system configured according to the Get Started Guide
2
Network interface card with Intel® Ethernet Controller I210 series
1
CAT-5E Ethernet cable to connect the two boards
To set up the hardware:
  1. Install an Intel® Ethernet Controller I210 on the target board to be tuned.
  2. Install an Intel® Ethernet Controller I210 on the packet generator board.
  3. Use a CAT-5E Ethernet cable to connect the Intel® Ethernet Controller I210 on the target board to the Intel® Ethernet Controller I210 on the packet generator board.
  4. Make sure the host system can connect to the target board via SSH.

(Optional) Set Up a Sequential Network Between Host and Target

You can connect an Ubuntu 20.04 LTS machine (host) and target board with a sequential network connection with Ethernet cable (i.e., without a common network switch or router). You must set a static IP address on each machine (host and target).
  1. [Ubuntu host]
    Set up the host system:
    1. On the Ubuntu host, run
      ifconfig
      to get the interface name of the Ethernet network between the host system and target board (for example,
      enp0s31f6
      ). Make a note of the interface name for later reference.
      ifconfig
    2. Go to the following directory:
      cd /etc/netplan/
    3. Create a file named
      00-installer-config.yaml
      .
      sudo nano 00-installer-config.yaml
    4. Insert the following text in the file. Replace
      enp0s31f6
      with your interface. Use the address value shown below.
      network: ethernets: enp0s31f6: addresses: [192.168.1.3/24] version: 2
    5. Save and close the file.
    6. Reboot the system.
      reboot
    7. Run ifconfig to make sure there is now an interface with the address 192.168.1.3.
  2. [Target board]
    Set up the target board:
    1. In a terminal window, run
      ifconfig
      to get the interface name of the Ethernet network between host system and target board (for example, enp0s20f0u3u2). Make a note of the interface name for later reference.
      ifconfig
    2. Go to the following directory:
      cd /etc/systemd/network/
    3. Create a file named
      host_wired.network
      .
      vi host_wired.network
    4. Insert the following text in the file. Replace
      enp0s31f6
      with your interface name that is used for direct connection to the host system. Use the address value shown below.
      [Match] Name=enp0s31f6 [Network] Address=192.168.1.1/24
    5. Save and close the file.
    6. Open
      80-wired.network
      and change the name field to the name of your external card interface, that is NOT used for direct wired connection to the host or packet generator board (example:
      enp0u4
      ). You can use the
      ifconfig
      command to check the name.
      vi /lib/systemd/network/80-wired.network
      Change the name to
      null
      if you do not have any interfaces to external networks.
      Example before changes:
      [Match] Name=en eth KernelCommandLine=!nfsroot [Network] DHCP=yes [DHCP] RouteMetric=10 ClientIdentifier=mac
      Example after changes:
      [Match] Name=enp0u4 KernelCommandLine=!nfsroot [Network] DHCP=yes [DHCP] RouteMetric=10 ClientIdentifier=mac
      Save and close the file.
    7. Reboot the system.
  3. Confirm that the host system can connect to the target board via SSH.
    ssh root@192.168.1.1

Set Up the Network Between Target Board and Packet Generator Board

You must set a static IP address for the Intel® Ethernet Controller I210 on each board. In the following steps, you will do this by creating two files,
eth_wired.network
and
enp_wired.network
. Both files are needed because the system may change the name of the interface during application run.
To set up the network:
  1. [Target board]
    Set up the target board:
    1. Set up a password-less SSH connection from the target board to the packet generator board, for example, install an SSH key.
      Run ssh-keygen to generate a key pair and follow the instructions:
      ssh-keygen
      Check that the ssh folder exists on the packet generator board:
      ssh root@<packet-generator> 'mkdir -p ~/.ssh'
      Install the public key on the packet generator board:
      cat ~/.ssh/<key>.pub | ssh root@<packet-generator> 'cat >> ~/.ssh/authorized_keys'
    2. On the target board, run the following command to get the interface name of the Intel® Ethernet Controller I210 (for example,
      enp1s0
      ). Make a note of the interface name for later reference.
      ifconfig | grep -o '^[^ ]*' | xargs -n1 bash -c 'echo "$0: $(lspci -s $(ethtool -i $0 2>/dev/null | grep bus-info | grep -o "[^ ]*$") 2>/dev/null)"' | grep I210
    3. Go to the following directory:
      cd /etc/systemd/network/
    4. Create a file named
      eth_wired.network
      .
      vi eth_wired.network
    5. Insert the following text in the file. If you already have an eth0 device on this board, replace
      eth0
      in the file with
      ethX
      , where X is the next available number. Use the address value shown below.
      [Match] Name=eth0 [Network] Address=192.168.0.1/24
    6. Save and close the file.
    7. Create a file named
      enp_wired.network
      .
      vi enp_wired.network
    8. Insert the following text in the file. Replace
      enp1s0
      with your interface name from Step 1a. Use the address value shown below.
      [Match] Name=enp1s0 [Network] Address=192.168.0.1/24
    9. Save and close the file.
    10. Follow this step to turn off the DHCP service for all adapters except the external network. This allows the sample to get the static IP address for the Intel® Ethernet Controller I210:
      Skip this step if you have already completed the steps in (Optional) Set Up a Sequential Network Between Host and Target.
      Open
      80-wired.network
      and change the name field to the name of your external card interface (example:
      enp0s20f0u4
      ). You can use the
      ifconfig
      command to check the name.
      vi /lib/systemd/network/80-wired.network
      Example before changes:
      [Match] Name=en eth KernelCommandLine=!nfsroot [Network] DHCP=yes [DHCP] RouteMetric=10 ClientIdentifier=mac
      Example after changes:
      [Match] Name=enp0s20f0u4 KernelCommandLine=!nfsroot [Network] DHCP=yes [DHCP] RouteMetric=10 ClientIdentifier=mac
      Change the name to
      null
      if you do not have any adapters to external networks and have only a wired direct connection between the Ubuntu host and target board.
      Save and close the file.
    11. Reboot the system.
      reboot
  2. [Packet generator board]
    Set up the packet generator board:
    1. On the packet generator board, run the following command to get the interface name of the Intel® Ethernet Controller I210 (for example,
      enp1s0
      ). Make a note of the interface name for later reference.
      ifconfig | grep -o '^[^ ]*' | xargs -n1 bash -c 'echo "$0: $(lspci -s $(ethtool -i $0 2>/dev/null | grep bus-info | grep -o "[^ ]*$") 2>/dev/null)"' | grep I210
    2. Go to the following directory:
      cd /etc/systemd/network/
    3. Create a file named
      eth_wired.network
      .
      vi eth_wired.network
    4. Insert the following text in the file. If you already have an eth0 device on this board, replace
      eth0
      in the file with
      ethX
      , where X is the next available number. Use the address value shown below. For address, be sure to use
      192.168.0.2
      .
      [Match] Name=eth0 [Network] Address=192.168.0.2/24
    5. Save and close the file.
    6. Create a file named
      enp_wired.network
      .
      vi enp_wired.network
    7. Insert the following text in the file. Replace
      enp1s0
      with your interface name from Step 2a. Use the address value shown below. For address, be sure to use
      192.168.0.2
      .
      [Match] Name=enp1s0 [Network] Address=192.168.0.2/24
    8. Save and close the file.
    9. Follow this step to turn off the DHCP service for all adapters except the external network. This allows the sample to get the static IP address for the Intel® Ethernet Controller I210:
      Open
      80-wired.network
      and change the name field to the name of your external card interface (example:
      enp0s20f0u4
      ). You can use the
      ifconfig
      command to check the name.
      vi /lib/systemd/network/80-wired.network
      Example before changes:
      [Match] Name=en eth KernelCommandLine=!nfsroot [Network] DHCP=yes [DHCP] RouteMetric=10 ClientIdentifier=mac
      Example after changes:
      [Match] Name=enp0s20f0u4 KernelCommandLine=!nfsroot [Network] DHCP=yes [DHCP] RouteMetric=10 ClientIdentifier=mac
      Save and close the file.
    10. Reboot the system.
      reboot
  3. Confirm that you have a passwordless SSH connection from the target board to the packet generator board, and make sure that SSH can connect without any additional prompts. To confirm:
    1. Switch to the target board.
    2. On the target board, SSH to the packet generator board:
      ssh root@192.168.0.2
    3. If any prompts appear, such as yes/no questions, answer appropriately to establish a connection.
    4. Exit the connection:
      exit
    5. Repeat Steps 3a–3c until there are no additional prompts.

Confirm Real-Time Kernel

Confirm that the target system is running the real-time kernel.
  1. From your host system, connect to the target system:
    ssh <user>@<target>
  2. In the SSH session, run the following command to get the name of the current kernel:
    uname -r
  3. Confirm that the output contains
    intel-preempt-rt
    . Example output:
    5.4.52-rt31-intel-preempt-rt
  4. If the output does not contain
    intel-preempt-rt
    , reboot the target system and make sure to select the RT kernel.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.