From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 6D8967F0D for ; Tue, 11 Nov 2014 10:11:43 +0100 (CET) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Xo7gY-0002DL-KW; Tue, 11 Nov 2014 10:24:35 +0100 Message-ID: <5461D50B.6050201@6wind.com> Date: Tue, 11 Nov 2014 10:21:15 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: dev@dpdk.org References: <1415635166-1364-1-git-send-email-olivier.matz@6wind.com> In-Reply-To: <1415635166-1364-1-git-send-email-olivier.matz@6wind.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: jigsaw@gmail.com Subject: Re: [dpdk-dev] [PATCH 00/12] add TSO support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 09:11:43 -0000 This is the test report for the new TSO feature. Test done on testpmd on x86_64-native-linuxapp-gcc platform: Tester (linux) <----> DUT (DPDK on westmere) ixgbe6 port0 (ixgbe) Run testpmd on DUT: cd dpdk.org/ make install T=x86_64-native-linuxapp-gcc cd x86_64-native-linuxapp-gcc/ modprobe uio insmod kmod/igb_uio.ko python ../tools/dpdk_nic_bind.py -b igb_uio 0000:02:00.0 echo 0 > /proc/sys/kernel/randomize_va_space echo 1000 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages echo 1000 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages mount -t hugetlbfs none /mnt/huge ./app/testpmd -c 0x55 -n 4 -m 800 -- -i --port-topology=chained --enable-rx-cksum Disable all offload feature on Tester, and start capture: ethtool -K ixgbe6 rx off tx off tso off gso off gro off lro off ip l set ixgbe6 up tcpdump -n -e -i ixgbe6 -s 0 -w /tmp/cap We use the following scapy script for testing (note: vxlan was not tested because I have no i40e on my platform, but at least the test scripts are provided if someone wants to check it): class VXLAN(Packet): name = 'VXLAN' fields_desc = [ FlagsField('flags', default=1 << 3, size=8, names=['R', 'R', 'R', 'R', 'I', 'R', 'R', 'R']), XBitField('reserved1', default=0x000000, size=24), BitField('vni', None, size=24), XBitField('reserved2', default=0x00, size=8), ] overload_fields = { UDP: {'sport': 4789, 'dport': 4789}, } def mysummary(self): return self.sprintf("VXLAN (vni=%VXLAN.vni%)") bind_layers(UDP, VXLAN, dport=4789) bind_layers(VXLAN, Ether) def test_v4(iface, macdst): macsrc = get_if_hwaddr(iface) v4 = Ether(dst=macdst, src=macsrc)/IP(src=RandIP(), dst=RandIP()) # valid TCP packet p=v4/TCP(flags=0x10)/Raw(RandString(50)) sendp(p, iface=iface, count=5) # valid UDP packet p=v4/UDP()/Raw(RandString(50)) sendp(p, iface=iface, count=5) # bad IP checksum p=v4/TCP(flags=0x10)/Raw(RandString(50)) p[IP].chksum=0x1234 sendp(p, iface=iface, count=5) # bad TCP checksum p=v4/TCP(flags=0x10, chksum=0x1234)/Raw(RandString(50)) sendp(p, iface=iface, count=5) # large packet p=v4/TCP(flags=0x10)/Raw(RandString(1400)) sendp(p, iface=iface, count=5) def test_v6(iface, macdst): macsrc = get_if_hwaddr(iface) v6 = Ether(dst=macdst, src=macsrc)/IPv6(src=RandIP6(), dst=RandIP6()) # checksum TCP p=v6/TCP(flags=0x10)/Raw(RandString(50)) sendp(p, iface=iface, count=5) # checksum UDP p=v6/UDP()/Raw(RandString(50)) sendp(p, iface=iface, count=5) # bad TCP checksum p=v6/TCP(flags=0x10, chksum=0x1234)/Raw(RandString(50)) sendp(p, iface=iface, count=5) # large packet p=v6/TCP(flags=0x10)/Raw(RandString(1400)) sendp(p, iface=iface, count=5) def test_vxlan(iface, macdst): macsrc = get_if_hwaddr(iface) vxlan = Ether(dst=macdst, src=macsrc)/IP(src=RandIP(), dst=RandIP()) vxlan /= UDP()/VXLAN(vni=1234)/Ether(dst=macdst, src=macsrc) vxlan /= IP(src=RandIP(), dst=RandIP()) # valid packet p=vxlan/TCP(flags=0x10)/Raw(RandString(50)) sendp(p, iface=iface, count=5) # bad IP checksum p=vxlan/TCP(flags=0x10)/Raw(RandString(50)) p[IP].payload[IP].chksum=0x1234 # inner header sendp(p, iface=iface, count=5) # bad TCP checksum p=vxlan/TCP(flags=0x10, chksum=0x1234)/Raw(RandString(50)) sendp(p, iface=iface, count=5) # large TCP packet, no UDP checksum on outer p=vxlan/TCP(flags=0x10)/Raw(RandString(1400)) p[UDP].chksum = 0 sendp(p, iface=iface, count=5) test_v4("ixgbe6", "00:1B:21:8E:B2:30") test_v6("ixgbe6", "00:1B:21:8E:B2:30") test_vxlan("ixgbe6", "00:1B:21:8E:B2:30") Test 1: rxonly fwd engine ========================= Check that the NIC is able to decode the packet header and the bad checksum values. The test_vxlan does not work on ixgbe as it is not able to recognize vxlan packets. testpmd command lines: set fwd rxonly set verbose 1 start Start test_v4() in scapy. Result is: port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=92 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=92 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=92 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=92 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=92 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_IP_CKSUM_BAD PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_IP_CKSUM_BAD PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_IP_CKSUM_BAD PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_IP_CKSUM_BAD PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_IP_CKSUM_BAD PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_L4_CKSUM_BAD PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_L4_CKSUM_BAD PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_L4_CKSUM_BAD PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_L4_CKSUM_BAD PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=104 - nb_segs=1 - Receive queue=0x0 PKT_RX_L4_CKSUM_BAD PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=1454 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=1454 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=1454 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=1454 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x0800 - length=1454 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR test_v6 port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=124 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=124 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=124 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=124 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=124 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=112 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=112 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=112 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=112 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=112 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=124 - nb_segs=1 - Receive queue=0x0 PKT_RX_L4_CKSUM_BAD PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=124 - nb_segs=1 - Receive queue=0x0 PKT_RX_L4_CKSUM_BAD PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=124 - nb_segs=1 - Receive queue=0x0 PKT_RX_L4_CKSUM_BAD PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=124 - nb_segs=1 - Receive queue=0x0 PKT_RX_L4_CKSUM_BAD PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=124 - nb_segs=1 - Receive queue=0x0 PKT_RX_L4_CKSUM_BAD PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=1474 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=1474 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=1474 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=1474 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR port 0/queue 0: received 1 packets src=90:E2:BA:2B:0F:4C - dst=00:1B:21:8E:B2:30 - type=0x86dd - length=1474 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV6_HDR Test 2: csum fwd engine, use sw checksum ======================================== The goal of this test is to show that the csum forward engine is able to process checksum in software. # hw checksum and tso are disabled for port 0 tx_checksum set ip sw 0 tx_checksum set udp sw 0 tx_checksum set tcp sw 0 tx_checksum set sctp sw 0 tx_checksum set vxlan sw 0 tso set 0 0 # set the forward engine set verbose 1 set fwd csum start Start test_v4() in scapy. Result is: ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: flags= Start test_v6() in scapy, result is: ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: flags= Start test_vxlan() in scapy, result is: ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: flags= Check the capture file (test2-cap-sw-cksum.cap) Test 3: csum fwd engine, use hw checksum ======================================== The goal of this test is to show that the csum forward engine is able to process checksum in hardware. # enable hw cksum in csumonly test, disable tso tx_checksum set ip hw 0 tx_checksum set udp hw 0 tx_checksum set tcp hw 0 tx_checksum set sctp hw 0 # set the forward engine set verbose 1 set fwd csum start Start test_v4() in scapy. Result is: ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=20 m->l4_len=0 tx: flags=PKT_TX_IP_CKSUM PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=20 m->l4_len=0 tx: flags=PKT_TX_IP_CKSUM PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=20 m->l4_len=0 tx: flags=PKT_TX_IP_CKSUM PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=20 m->l4_len=0 tx: flags=PKT_TX_IP_CKSUM PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=20 m->l4_len=0 tx: flags=PKT_TX_IP_CKSUM PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM Start test_v6() in scapy, result is: ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=40 m->l4_len=0 tx: flags=PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=40 m->l4_len=0 tx: flags=PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=40 m->l4_len=0 tx: flags=PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=40 m->l4_len=0 tx: flags=PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=40 m->l4_len=0 tx: flags=PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: flags=PKT_TX_TCP_CKSUM Start test_vxlan() in scapy, result is: ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_CKSUM Check the capture file (test3-cap-hw-cksum.cap) Note that the outer UDP checksum is wrong when not 0. This is normal as the software cannot calculate the checksum of the inner layer because the checksum of the inner layer will be modified by hardware. Test 4: csum fwd engine, use TSO ================================ The goal of this test is to verify that TSO is working properly. # enable hw checksum tx_checksum set ip hw 0 tx_checksum set udp hw 0 tx_checksum set tcp hw 0 tx_checksum set sctp hw 0 # enable TSO tso set 800 0 # set fwd engine and start set verbose 1 set fwd csum start Start test_v4() in scapy, result is: ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=20 m->l4_len=0 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=20 m->l4_len=0 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=20 m->l4_len=0 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=20 m->l4_len=0 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=20 m->l4_len=0 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG Start test_v6() in scapy, result is: ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=40 m->l4_len=0 tx: m->tso_segsz=800 tx: flags=PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=40 m->l4_len=0 tx: m->tso_segsz=800 tx: flags=PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=40 m->l4_len=0 tx: m->tso_segsz=800 tx: flags=PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=40 m->l4_len=0 tx: m->tso_segsz=800 tx: flags=PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=17 l4_len=0 tx: m->l2_len=14 m->l3_len=40 m->l4_len=0 tx: m->tso_segsz=800 tx: flags=PKT_TX_UDP_CKSUM ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=86dd l3_len=40 l4_proto=6 l4_len=20 tx: m->l2_len=14 m->l3_len=40 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_TCP_SEG Start test_vxlan() in scapy, result is: ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG ----------------- rx: l2_len=14 ethertype=800 l3_len=20 l4_proto=6 l4_len=20 rx: outer_l2_len=14 outer_ethertype=800 outer_l3_len=20 tx: m->l2_len=64 m->l3_len=20 m->l4_len=20 tx: m->tso_segsz=800 tx: flags=PKT_TX_IP_CKSUM PKT_TX_TCP_SEG Check the capture file (test4-cap-tso.cap) Note that the outer UDP checksum is wrong when not 0. This is normal as the software cannot calculate the checksum of the inner layer because the checksum of the inner layer will be modified by hardware.