Page MenuHomePhabricator

add MTU option when configure limiter traffic-policy
Open, Requires assessmentPublicFEATURE REQUEST

Description

Hi,

I ran into problem when trigger TCP traffic in limiter traffic policy settings

My configuration:

set traffic-policy limiter 10M default bandwidth '10mbit'
set traffic-policy limiter 10M default burst '100kb'
set interfaces ethernet eth0 traffic-policy in '10M'

Test with iperf3:

iperf3 -c 2.2.2.1 -t 100 -i 1 -b 10m
Connecting to host 2.2.2.1, port 5201
[  4] local 2.2.2.2 port 49480 connected to 2.2.2.1 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  83.4 KBytes   683 Kbits/sec   17   2.78 KBytes       
[  4]   1.00-2.00   sec   341 KBytes  2.79 Mbits/sec   93   2.78 KBytes       
[  4]   2.00-3.00   sec   456 KBytes  3.74 Mbits/sec  118   2.78 KBytes       
[  4]   3.00-4.00   sec   381 KBytes  3.12 Mbits/sec  118   2.78 KBytes       
[  4]   4.00-5.00   sec   458 KBytes  3.75 Mbits/sec  124   2.78 KBytes       
[  4]   5.00-6.00   sec   381 KBytes  3.12 Mbits/sec  122   2.78 KBytes       
[  4]   6.00-7.00   sec   459 KBytes  3.76 Mbits/sec  122   2.78 KBytes       
[  4]   7.00-8.00   sec   459 KBytes  3.76 Mbits/sec  122   2.78 KBytes       
[  4]   8.00-9.00   sec   380 KBytes  3.11 Mbits/sec  120   2.78 KBytes       
[  4]   9.00-10.00  sec   459 KBytes  3.76 Mbits/sec  120   2.78 KBytes       
[  4]  10.00-11.00  sec   380 KBytes  3.11 Mbits/sec  116   2.78 KBytes

It turns out that it's caused by MTU value of tc rule in limiter traffic policy when offloading is enabled, default MTU is 2kb, but the packet size between ip stack and nic could be 65536 bytes in maximum, it means that tc with 2k bytes mtu will drop most of packet exceeding this limit.

it's nice to have mtu option in limiter configuration to adjust. this is my according post in forum: https://forum.vyos.io/t/traffic-policy-limiter-trouble-with-tcp-on-1-2-x/4484

best regards.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

Event Timeline

pasik added a subscriber: pasik.Dec 12 2019, 8:39 PM