From: Olivier MATZ <olivier.matz@6wind.com>
To: dev@dpdk.org
Subject: Re: [dpdk-dev] [RFC 00/16] enhance checksum offload API
Date: Thu, 22 Jan 2015 00:41:03 +0100 [thread overview]
Message-ID: <54C0390F.3040004@6wind.com> (raw)
In-Reply-To: <1421883395-27235-1-git-send-email-olivier.matz@6wind.com>
[-- Attachment #1: Type: text/plain, Size: 4712 bytes --]
Test done on testpmd on x86_64-native-linuxapp-gcc
platform:
Tester (linux) <----> DUT (DPDK)
ixgbe6 port0 (i40e or 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 attached scapy script (dpdk-cksum-test.py) for testing.
In each attached capture file, odd packets are generated by scapy and
even ones are generated by the dpdk (except for TSO where several tx
packet corresponds to one rx packet).
In some conditions, the checksum cannot be calculated, for instance when
inner checksum is done in hw and outer checksum in sw, or if it is not
supported by hardware.
Notes:
- case 6 is not present for ixgbe (inner + outer)
- case 5 is not present for i40e (tso)
- some strange behavior to be analyzed for first packets of tso on ixgbe
- ipip tunnel is not working in case 6 of i40e
----------------------------------------------
case 1) calculate checksum of out_ip (was case A in [1])
mb->l2_len = len(out_eth)
mb->l3_len = len(out_ip)
mb->ol_flags |= PKT_TX_IPV4 | PKT_TX_IP_CSUM
set out_ip checksum to 0 in the packet
Testpmd commands:
stop
csum parse_tunnel off 0
csum set ip hw 0
csum set tcp sw 0
csum set udp sw 0
csum set sctp sw 0
tso set 0 0
set fwd csum
set verbose 1
start
----------------------------------------------
case 2) calculate checksum of out_ip and out_udp
mb->l2_len = len(out_eth)
mb->l3_len = len(out_ip)
mb->ol_flags |= PKT_TX_IPV4 | PKT_TX_IP_CSUM | PKT_TX_UDP_CKSUM
set out_ip checksum to 0 in the packet
set out_udp checksum to pseudo header using rte_ipv4_phdr_cksum()
Testpmd commands:
stop
csum parse_tunnel off 0
csum set ip hw 0
csum set tcp hw 0
csum set udp hw 0
csum set sctp hw 0
tso set 0 0
set fwd csum
set verbose 1
start
----------------------------------------------
case 3) calculate checksum of in_ip
mb->l2_len = len(out_eth + out_ip + out_udp + vxlan + in_eth)
mb->l3_len = len(in_ip)
mb->ol_flags |= PKT_TX_IPV4 | PKT_TX_IP_CSUM
set in_ip checksum to 0 in the packet
Testpmd commands:
stop
csum parse_tunnel on 0
csum set ip hw 0
csum set tcp sw 0
csum set udp sw 0
csum set sctp sw 0
csum set outer-ip sw 0
tso set 0 0
set fwd csum
set verbose 1
start
----------------------------------------------
case 4) calculate checksum of in_ip and in_tcp (was case B.2 in [1])
mb->l2_len = len(out_eth + out_ip + out_udp + vxlan + in_eth)
mb->l3_len = len(in_ip)
mb->ol_flags |= PKT_TX_IPV4 | PKT_TX_IP_CSUM | PKT_TX_TCP_CKSUM
set in_ip checksum to 0 in the packet
set in_tcp checksum to pseudo header using rte_ipv4_phdr_cksum()
Testpmd commands:
stop
csum parse_tunnel on 0
csum set ip hw 0
csum set tcp hw 0
csum set udp hw 0
csum set sctp hw 0
csum set outer-ip sw 0
tso set 0 0
set fwd csum
set verbose 1
start
----------------------------------------------
case 5) segment inner TCP
mb->l2_len = len(out_eth + out_ip + out_udp + vxlan + in_eth)
mb->l3_len = len(in_ip)
mb->l4_len = len(in_tcp)
mb->ol_flags |= PKT_TX_IPV4 | PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM |
PKT_TX_TCP_SEG;
set in_ip checksum to 0 in the packet
set in_tcp checksum to pseudo header without including the IP
payload length using rte_ipv4_phdr_cksum()
Testpmd commands:
stop
csum parse_tunnel on 0
csum set ip hw 0
csum set tcp hw 0
csum set udp hw 0
csum set sctp hw 0
csum set outer-ip sw 0
tso set 500 0
set fwd csum
set verbose 1
start
----------------------------------------------
case 6) calculate checksum of out_ip, in_ip, in_tcp (was case C in [1])
mb->outer_l2_len = len(out_eth)
mb->outer_l3_len = len(out_ip)
mb->l2_len = len(out_udp + vxlan + in_eth)
mb->l3_len = len(in_ip)
mb->ol_flags |= PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IP_CKSUM | \
PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM;
set out_ip checksum to 0 in the packet
set in_ip checksum to 0 in the packet
set in_tcp checksum to pseudo header using rte_ipv4_phdr_cksum()
Testpmd commands:
stop
csum parse_tunnel on 0
csum set ip hw 0
csum set tcp hw 0
csum set udp hw 0
csum set sctp hw 0
csum set outer-ip hw 0
tso set 0 0
set fwd csum
set verbose 1
start
[-- Attachment #2: i40e_case1.cap --]
[-- Type: application/vnd.tcpdump.pcap, Size: 60080 bytes --]
[-- Attachment #3: i40e_case2.cap --]
[-- Type: application/vnd.tcpdump.pcap, Size: 60080 bytes --]
[-- Attachment #4: i40e_case3.cap --]
[-- Type: application/vnd.tcpdump.pcap, Size: 60080 bytes --]
[-- Attachment #5: i40e_case4.cap --]
[-- Type: application/vnd.tcpdump.pcap, Size: 60080 bytes --]
[-- Attachment #6: i40e_case6.cap --]
[-- Type: application/vnd.tcpdump.pcap, Size: 60080 bytes --]
[-- Attachment #7: ixgbe_case1.cap --]
[-- Type: application/vnd.tcpdump.pcap, Size: 60080 bytes --]
[-- Attachment #8: ixgbe_case2.cap --]
[-- Type: application/vnd.tcpdump.pcap, Size: 60080 bytes --]
[-- Attachment #9: ixgbe_case3.cap --]
[-- Type: application/vnd.tcpdump.pcap, Size: 60080 bytes --]
[-- Attachment #10: ixgbe_case4.cap --]
[-- Type: application/vnd.tcpdump.pcap, Size: 60080 bytes --]
[-- Attachment #11: ixgbe_case5.cap --]
[-- Type: application/vnd.tcpdump.pcap, Size: 63856 bytes --]
next prev parent reply other threads:[~2015-01-21 23:41 UTC|newest]
Thread overview: 109+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-21 23:36 Olivier Matz
2015-01-21 23:36 ` [dpdk-dev] [RFC 01/16] mbuf: remove PKT_TX_IPV4_CSUM Olivier Matz
2015-01-21 23:36 ` [dpdk-dev] [RFC 02/16] mbuf: enhance the API documentation of offload flags Olivier Matz
2015-01-21 23:36 ` [dpdk-dev] [RFC 03/16] i40e: call i40e_txd_enable_checksum only for offloaded packets Olivier Matz
2015-01-21 23:36 ` [dpdk-dev] [RFC 04/16] i40e: remove the use of PKT_TX_UDP_TUNNEL_PKT flag Olivier Matz
2015-01-23 8:06 ` Liu, Jijiang
2015-01-23 8:47 ` Zhang, Helin
2015-01-23 9:06 ` Olivier MATZ
2015-01-21 23:36 ` [dpdk-dev] [RFC 05/16] mbuf: remove " Olivier Matz
2015-01-21 23:36 ` [dpdk-dev] [RFC 06/16] ethdev: add outer IP offload capability flag Olivier Matz
2015-01-21 23:36 ` [dpdk-dev] [RFC 07/16] i40e: advertise outer IPv4 checksum capability Olivier Matz
2015-01-21 23:36 ` [dpdk-dev] [RFC 08/16] testpmd: replace tx_checksum command by csum Olivier Matz
2015-01-21 23:36 ` [dpdk-dev] [RFC 09/16] testpmd: move csum_show in a function Olivier Matz
2015-01-23 11:03 ` Liu, Jijiang
2015-01-23 17:53 ` Olivier MATZ
2015-01-21 23:36 ` [dpdk-dev] [RFC 10/16] testpmd: add csum parse_tunnel command Olivier Matz
2015-01-21 23:36 ` [dpdk-dev] [RFC 11/16] testpmd: rename vxlan in outer_ip in csum commands Olivier Matz
2015-01-23 11:21 ` Liu, Jijiang
2015-01-23 17:49 ` Olivier MATZ
2015-01-21 23:36 ` [dpdk-dev] [RFC 12/16] testpmd: introduce parse_ipv* in csum fwd engine Olivier Matz
2015-01-21 23:36 ` [dpdk-dev] [RFC 13/16] testpmd: use a structure to store offload info " Olivier Matz
2015-01-21 23:36 ` [dpdk-dev] [RFC 14/16] testpmd: introduce parse_vxlan " Olivier Matz
2015-01-21 23:36 ` [dpdk-dev] [RFC 15/16] testpmd: support gre tunnels " Olivier Matz
2015-01-21 23:36 ` [dpdk-dev] [RFC 16/16] testpmd: support ipip tunnel in csum forward engine Olivier Matz
2015-01-21 23:41 ` Olivier MATZ [this message]
2015-01-22 10:00 ` [dpdk-dev] [RFC 00/16] enhance checksum offload API Thomas Monjalon
2015-01-22 1:01 ` Stephen Hemminger
2015-01-23 9:52 ` Olivier MATZ
2015-01-23 7:54 ` Liu, Jijiang
2015-01-30 13:15 ` [dpdk-dev] [PATCH 00/20] enhance tx " Olivier Matz
2015-01-30 13:15 ` [dpdk-dev] [PATCH 01/20] mbuf: remove PKT_TX_IPV4_CSUM Olivier Matz
2015-01-30 13:15 ` [dpdk-dev] [PATCH 02/20] mbuf: enhance the API documentation of offload flags Olivier Matz
2015-01-30 13:15 ` [dpdk-dev] [PATCH 03/20] i40e: call i40e_txd_enable_checksum only for offloaded packets Olivier Matz
2015-01-30 13:15 ` [dpdk-dev] [PATCH 04/20] i40e: remove the use of PKT_TX_UDP_TUNNEL_PKT flag Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 05/20] mbuf: remove " Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 06/20] testpmd: replace tx_checksum command by csum Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 07/20] testpmd: move csum_show in a function Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 08/20] testpmd: add csum parse_tunnel command Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 09/20] testpmd: rename vxlan in outer_ip in csum commands Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 10/20] testpmd: introduce parse_ipv* in csum fwd engine Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 11/20] testpmd: use a structure to store offload info " Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 12/20] testpmd: introduce parse_vxlan " Olivier Matz
2015-02-02 1:49 ` Liu, Jijiang
2015-01-30 13:16 ` [dpdk-dev] [PATCH 13/20] testpmd: support gre tunnels " Olivier Matz
2015-02-02 3:04 ` Liu, Jijiang
2015-01-30 13:16 ` [dpdk-dev] [PATCH 14/20] testpmd: support ipip tunnel in csum forward engine Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 15/20] ethdev: add outer IP offload capability flag Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 16/20] i40e: advertise outer IPv4 checksum capability Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 17/20] testpmd: add a warning if outer ip cksum requested but not supported Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 18/20] testpmd: fix TSO when using outer checksum offloads Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 19/20] i40e: fix offloading of outer checksum for ip in ip tunnels Olivier Matz
2015-01-30 13:16 ` [dpdk-dev] [PATCH 20/20] i40e: add debug logs for tx context descriptors Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 00/20] enhance tx checksum offload API Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 01/20] mbuf: remove PKT_TX_IPV4_CSUM Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 02/20] mbuf: enhance the API documentation of offload flags Olivier Matz
2015-02-10 5:38 ` Zhang, Helin
2015-02-10 16:54 ` Olivier MATZ
2015-02-11 7:15 ` Liu, Jijiang
2015-02-11 15:15 ` Olivier MATZ
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 03/20] i40e: call i40e_txd_enable_checksum only for offloaded packets Olivier Matz
2015-02-10 6:03 ` Zhang, Helin
2015-02-10 17:06 ` Olivier MATZ
2015-02-11 5:32 ` Zhang, Helin
2015-02-11 17:13 ` Olivier MATZ
2015-02-13 2:25 ` Zhang, Helin
2015-02-13 8:41 ` Olivier MATZ
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 04/20] i40e: remove the use of PKT_TX_UDP_TUNNEL_PKT flag Olivier Matz
2015-02-10 6:40 ` Zhang, Helin
2015-02-10 17:08 ` Olivier MATZ
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 05/20] mbuf: remove " Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 06/20] testpmd: replace tx_checksum command by csum Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 07/20] testpmd: move csum_show in a function Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 08/20] testpmd: add csum parse_tunnel command Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 09/20] testpmd: rename vxlan in outer_ip in csum commands Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 10/20] testpmd: introduce parse_ipv* in csum fwd engine Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 11/20] testpmd: use a structure to store offload info " Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 12/20] testpmd: introduce parse_vxlan " Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 13/20] testpmd: support gre tunnels " Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 14/20] testpmd: support ipip tunnel in csum forward engine Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 15/20] ethdev: add outer IP offload capability flag Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 16/20] i40e: advertise outer IPv4 checksum capability Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 17/20] testpmd: add a warning if outer ip cksum requested but not supported Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 18/20] testpmd: fix TSO when using outer checksum offloads Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 19/20] i40e: fix offloading of outer checksum for ip in ip tunnels Olivier Matz
2015-02-04 9:25 ` [dpdk-dev] [PATCH v2 20/20] i40e: add debug logs for tx context descriptors Olivier Matz
2015-02-09 1:10 ` [dpdk-dev] [PATCH v2 00/20] enhance tx checksum offload API Liu, Jijiang
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 " Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 01/20] mbuf: remove PKT_TX_IPV4_CSUM Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 02/20] mbuf: enhance the API documentation of offload flags Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 03/20] i40e: call i40e_txd_enable_checksum only for offloaded packets Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 04/20] i40e: remove the use of PKT_TX_UDP_TUNNEL_PKT flag Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 05/20] mbuf: remove " Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 06/20] testpmd: replace tx_checksum command by csum Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 07/20] testpmd: move csum_show in a function Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 08/20] testpmd: add csum parse_tunnel command Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 09/20] testpmd: rename vxlan in outer_ip in csum commands Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 10/20] testpmd: introduce parse_ipv* in csum fwd engine Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 11/20] testpmd: use a structure to store offload info " Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 12/20] testpmd: introduce parse_vxlan " Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 13/20] testpmd: support gre tunnels " Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 14/20] testpmd: support ipip tunnel in csum forward engine Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 15/20] ethdev: add outer IP offload capability flag Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 16/20] i40e: advertise outer IPv4 checksum capability Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 17/20] testpmd: add a warning if outer ip cksum requested but not supported Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 18/20] testpmd: fix TSO when using outer checksum offloads Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 19/20] i40e: fix offloading of outer checksum for ip in ip tunnels Olivier Matz
2015-02-13 9:22 ` [dpdk-dev] [PATCH v3 20/20] i40e: add debug logs for tx context descriptors Olivier Matz
2015-02-15 6:22 ` [dpdk-dev] [PATCH v3 00/20] enhance tx checksum offload API Liu, Jijiang
2015-02-16 18:23 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54C0390F.3040004@6wind.com \
--to=olivier.matz@6wind.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).