iperf
iperf copied to clipboard
enh: Add support for SO_PRIORITY socket option.
This functionality is needed to test mutliqueue support of Ethernet drivers.
Here is one use case example how this functionality can be tested:
On the server side:
# create mqprio queue discipline on lan2 interface
tc qdisc add dev lan2 parent root handle 100 mqprio num_tc 4 map 0 1 2 3 queues 1@0 1@1 1@2 1@3 hw 0
iperf3 -s &
# collect queue stats
tc -s qdisc show dev lan2
On the client side:
# start tcp reverse stream with socket priority 2
iperf3 -c 172.17.0.1 -b100M -l1472 -t100 -R --sock-prio 2
On the server side:
# collect queue stats
tc -s qdisc show dev lan2
qdisc mqprio 100: root tc 4 map 0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0
queues:(0:0) (1:1) (2:2) (3:3)
Sent 35748478 bytes 23639 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc fq_codel 0: parent 100:4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: parent 100:3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
**Sent 17628922 bytes 11649 pkt** (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: parent 100:2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: parent 100:1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
Sent 18119556 bytes 11990 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
new_flows_len 0 old_flows_len 0
At this point we should be able to see increasing counters on "qdisc fq_codel 0: parent 100:3 ..."
json variable is lest. Will send new version soon.
Hi @bmah888, can you please give me some feedback for this PR :)