Ivan Khoronzhuk
83fcad0c98
net: ethernet: ti: cpsw: add .ndo to set per-queue rate
This patch allows to rate limit queues tx queues for cpsw interface.
The rate is set in absolute Mb/s units and cannot be more a speed
an interface is connected with.
The rate for a tx queue can be tested with:
ethtool -L eth0 rx 4 tx 4
echo 100 > /sys/class/net/eth0/queues/tx-0/tx_maxrate
echo 200 > /sys/class/net/eth0/queues/tx-1/tx_maxrate
echo 50 > /sys/class/net/eth0/queues/tx-2/tx_maxrate
echo 30 > /sys/class/net/eth0/queues/tx-3/tx_maxrate
tc qdisc add dev eth0 root handle 1: multiq
tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip\
dport 5001 0xffff action skbedit queue_mapping 0
tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip\
dport 5002 0xffff action skbedit queue_mapping 1
tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip\
dport 5003 0xffff action skbedit queue_mapping 2
tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip\
dport 5004 0xffff action skbedit queue_mapping 3
iperf -c 192.168.2.1 -b 110M -p 5001 -f m -t 60
iperf -c 192.168.2.1 -b 215M -p 5002 -f m -t 60
iperf -c 192.168.2.1 -b 55M -p 5003 -f m -t 60
iperf -c 192.168.2.1 -b 32M -p 5004 -f m -t 60
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-30 14:37:14 -05:00
..
2016-10-13 09:36:57 -04:00
2016-11-18 10:59:15 -05:00
2016-10-31 20:48:19 +01:00
2016-10-31 20:58:34 -04:00
2016-11-28 15:59:40 -05:00
2016-11-30 14:37:14 -05:00
2016-10-20 14:51:10 -04:00
2016-10-20 14:51:10 -04:00
2016-10-20 14:51:10 -04:00
2016-11-29 20:50:07 -05:00
2016-11-26 23:42:21 -05:00
2016-10-15 17:49:57 -04:00
2016-11-30 10:22:27 -05:00
2016-10-13 09:36:57 -04:00
2016-11-18 10:59:15 -05:00
2016-10-20 14:51:10 -04:00
2016-10-27 16:16:09 -04:00
2016-11-18 13:57:33 -05:00
2016-10-30 12:42:58 -04:00
2016-10-30 12:42:58 -04:00
2016-10-20 14:51:08 -04:00
2016-11-27 20:26:59 -05:00
2016-11-09 20:24:35 -05:00
2016-11-28 16:14:49 -05:00
2016-11-18 10:59:15 -05:00
2016-10-30 12:42:58 -04:00
2016-11-26 23:42:21 -05:00
2016-11-30 12:40:48 -05:00
2016-11-09 20:26:58 -05:00
2016-10-20 14:51:09 -04:00
2016-10-20 14:51:10 -04:00
2016-10-13 09:36:57 -04:00
2016-11-24 16:06:56 -05:00
2016-10-20 14:51:09 -04:00
2016-11-28 13:17:40 -05:00
2016-11-01 11:54:26 -04:00
2016-11-18 10:59:15 -05:00
2016-11-15 10:54:36 -05:00