Multi Channel DMA for PCI Express* Intel® FPGA IP Design Example User Guide

ID 683517
Date 2/06/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

3.5.2.6.7. Test Procedure by Using Name Space Environment

Use the following script to create name spaces and execute the commands.

  1. Stop the network manager by using following command:
    systemctl stop NetworkManager.service
  2. Create the name spaces:
    ip netns add <VM name>
    For example:
    ip netns add vm0
    ip netns add vm1
    ip netns add vm2
    ip netns add vm3
    
  3. Assign the interface to name space:
    Command:
    ip link set <interface> netns <namespace>
    ip link set ifc_mcdma0 netns vm0
    ip link set ifc_mcdma1 netns vm1                                                
    ip link set ifc_mcdma2 netns vm2
    ip link set ifc_mcdma3 netns vm3
    
  4. Bring up the interface:

    Command: ip netns exec vm0 ifconfig <interface> up

    Example:
    ip netns exec vm0 ifconfig ifc_mcdma0 up
    ip netns exec vm1 ifconfig ifc_mcdma1 up
    ip netns exec vm2 ifconfig ifc_mcdma2 up
    ip netns exec vm3 ifconfig ifc_mcdma3 up
    
  5. Assigning the IP address:

    Command: ip netns exec <namespace> ip addr add <ipaddr> dev <interfacename>

    Example:
    ip netns exec vm1 ip addr add 1.1.1.11/24 dev ifc_mcdma1
    ip netns exec vm0 ip addr add 1.1.1.10/24 dev ifc_mcdma0
    ip netns exec vm2 ip addr add 1.1.1.12/24 dev ifc_mcdma2
    ip netns exec vm3 ip addr add 1.1.1.13/24 dev ifc_mcdma3
    
  6. Ping from one interface to another interface:
    Command: ip netns exec <namespace> ping <ip address>
    Example:
    ip netns exec vm0 ping 1.1.1.11
    Note: Observing the pkt-loss currently with TCP and UDP traffic overtime after starting the traffic. This leads to hanging and closing of the iperf or netperf connections.