Skip to content

packet drop after dscp remark #304

@shizhenzhao

Description

@shizhenzhao

I am simulating the following network. The link capacity of (h1 s1) and (h2 s2) are 30 Mbps, and the link capacity of all the other links are all 10 Mbps.
s1 lo: s1-eth1:h1-eth0 s1-eth2:s2-eth1 s1-eth3:s3-eth1 s1-eth4:s4-eth1
s2 lo: s2-eth1:s1-eth2 s2-eth2:h2-eth0 s2-eth3:s3-eth2 s2-eth4:s4-eth2
s3 lo: s3-eth1:s1-eth3 s3-eth2:s2-eth3
s4 lo: s4-eth1:s1-eth4 s4-eth2:s2-eth4
h1 h1-eth0:s1-eth1
h2 h2-eth0:s2-eth2

I use iperf to send udp traffic from h1 to h2:
h2 iperf -u -s -p 5566 -i 1 > server.log &
h1 iperf -u -c 10.0.0.2 -b 26M -p 5566 -t 5 --tos 0x08 > client.log

I want 8.5Mbps of the iperf traffic to go through the link (s1, s2), and split the rest of the traffic evenly between the path (s1, s4, s2) and (s1, s3, s2). We realized this routing mechanism using DSCP remark. Specifically, we set up a meter rule in s1 with rate=8500 and prec_level=1. And then, we forward the traffic with dscp=2 to the link (s1, s2), and split the traffic with dscp=4 between the path (s1, s4, s2) and (s1, s3, s2).

I was expecting no traffic loss in this case. However, iperf results showed about 27% packet loss. I checked the packet counters of s1/s2/s3/s4, and found the in packet num to s2/s3/s4 are smaller than the out packet num from s1.

My initial guess is that the switch or port buffer size is too small. I tried

  1. set the max_queue_size of a link as a large number: This only makes things worse, because not setting max_queue_size means infinite queue size.
  2. Increase N_PKT_BUFFERS from 256 to 2^12 in dp_buffers.c: I thought this may increase the switch buffer size. But unfortunately, it does not affect iperf results.

To reproduce this issue. Download and unzip test.zip first. (I am running the test in Ubuntu 16.04)
$ ryu-manager
$ sudo python exper3.py
$ sudo ./exper3.sh
Then, in mininet
$ h2 iperf -u -s -p 5566 -i 1 > server.log &
$ h1 iperf -u -c 10.0.0.2 -b 26M -p 5566 -t 5 --tos 0x08 > client.log
test.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions