cncf / cnf-testbed

ARCHIVED: 🧪🛏️Cloud-native Network Function (CNF) Testbed --> See LFN Cloud Native Telecom Initiative https://wiki.lfnetworking.org/pages/viewpage.action?pageId=113213592
https://wiki.lfnetworking.org/pages/viewpage.action?pageId=113213592
Apache License 2.0
162 stars 51 forks source link

RESOLVED [Edge Throughput] L2 networking issue causes data packets to disappear #61

Closed lixuna closed 5 years ago

lixuna commented 6 years ago

Problem:

Solution Found: Turn on VF trust in host for interfaces. See https://github.com/cncf/cnfs/issues/61#issuecomment-420459167


These tests are targeting the public service provider Packet.net on machine types publicly available.

Other labs, cloud providers and private networks could produce different results. ( example: fd.io CSIT lab using Intel x710 NICs works as expected)

Goal: Use high performance traffic from one host to another through VPP vSwitch on second host

Test configuration setup (goal)

image

Common host configuration


Tasks:

taylor commented 6 years ago

Testing iperf between two machines

Two physical machines running Ubuntu 18.04 LTS on Packet.net. Install iperf software.

Configuration and testing: Pktgen host

CNF Host

Result:

UDP packets seen on CNF host as expected

Ping and ARP ping

Using ping or arping work as expected

taylor commented 6 years ago

Testing iperf through VPP vSwitch on CNF Host to iperf listening to a tap interface

Configuration: Pktgen

CNF Host

Test:

On Pktgen host, run iperf in client mode on 1st interface sending UDP traffic to CNF host IP On CNF host, run iperf server listening on tap interface (created by VPP)

Create TAP on CNF Host:

ip tuntap add mode tap tap0
ip addr add 172.17.120.20/24 dev tap0
ip link set up tap0

vSwitch (Host VPP) Configuration:

create bridge-domain 1

tap connect tap0 hwaddr random

set int l2 bridge TwentyFiveGigabitEthernet5e/0/4 1
set int l2 bridge tapcli-0 1

set int state TwentyFiveGigabitEthernet5e/0/4 up
set int state tapcli-0 up

Results:

Conclusion: Could indicate that the problem is somewhere in receive side of DPDK when connected to Mellanox VF.

Additional related testing/information:

ARP request from Pktgen host to tap interface on CNF host

ARP request from CNF host to Pktgen host

taylor commented 6 years ago

Using a host bridge with virtual interface - no VPP / simple test

Configuration on CNF Host:

ip link add name br0 type bridge
ip link set br0 up
ip link set enp94s0f4 up
ip link set enp94s0f4 master br0
ip addr add 172.16.120.20/24 dev br0

# To see bridge
# bridge link

Testing On Pktgen Host run:

ping -I enp94s0f4 172.16.120.20
arping -i enp94s0f4 172.16.120.20

On CNF Host

ping -I br0 172.16.120.10
arping -i br0 172.16.120.10

Results:


After testing is complete the bridge can be removed with:

ip link set enp94s0f4 nomaster
ip link set enp94s0f4 down
ip lin delete br0 type bridge
taylor commented 6 years ago

Testing with host virtual interface inside of VPP

Using a host virtual interface in VPP on the CNF host

VPP configuration (/etc/vpp/setup.gate) on CNF Host:

create host-interface name enp94s0f4
set interface state host-enp94s0f4 up
set interface ip address host-enp94s0f4 172.16.120.20/24

Testing On Pktgen Host run:

ping -I enp94s0f4 172.16.120.20
arping -i enp94s0f4 172.16.120.20

On CNF Host

ping -I br0 172.16.120.10
arping -i br0 172.16.120.10

Results:

taylor commented 6 years ago

Two solutions:

  1. Turn on VF trust for the interfaces. See https://community.mellanox.com/docs/DOC-2473
  2. “Spoof” the mac address from the host in VPP (Only for verification. Not a good choice)

Option 1, turn on trust for VF

In the host

ip link set enp94s0f1 vf 1 trust on
ip link set enp94s0f1 vf 0 trust on

Option 2, (Only for verification) spoof mac address:

create host-interface name enp94s0f4 hw-addr <MAC address from enp94s0f4 in host>
set interface state host-enp94s0f4 up
set interface ip address host-enp94s0f4 172.16.120.20/24