From Fedora Project Wiki
Description
This test is intended to test fragmentation offload on virtual machine
How to test
- boot a virtual machine
- log into this virtual machine, and disable gso function of nic, only enable tso. if you check the function of gso, just disable tso and enable gso
- ethtool -K eth0 gso off
- ethtool -K etho tso on
- check if success to setup tso/gso on guest
ethtool -k eth0
- listen tcp packets on host
nc -l 5334 |tee /tmp/frag_offload.dd >/dev/null
- use dd to create a 10M file on guest
dd if=/dev/urandom of=/tmp/frag_offload.dd bs=10M count=1
- use tcpdump capture the packets on data link layer on guest
tcpdump -e port 5334 1 >/tmp/frag_offload.tcpdump 2>/dev/null
- sent the 10M file to host
cat /tmp/frag_offlaod.dd |nc $hostIP 5334
- check if there exists some packet larger than MTU
- compute md5sum of /tmp/frag_offload.dd on host and the virtual machine, and check if they are same
md5sum /tmp/frag_offload.dd
Expected Results
- should be successful to setup tso/gso on guest
- there should exist some packet larger than MTU
- md5sum should be the same