From: "Liu, Yong" <yong.liu@intel.com>
To: Xueqin Lin <xueqin.lin@intel.com>, dts@dpdk.org
Subject: Re: [dts] [PATCH] TX preparation test plan
Date: Mon, 27 Feb 2017 09:22:33 +0800 [thread overview]
Message-ID: <58B37F59.1050002@intel.com> (raw)
In-Reply-To: <1487814892-7793-1-git-send-email-xueqin.lin@intel.com>
Xueqin, some comments below.
Thanks,
Marvin
On 02/23/2017 09:54 AM, Xueqin Lin wrote:
> ---
> test_plans/tx_preparation_test_plan.rst | 166 ++++++++++++++++++++++++++++++++
> 1 file changed, 166 insertions(+)
> create mode 100644 test_plans/tx_preparation_test_plan.rst
>
> diff --git a/test_plans/tx_preparation_test_plan.rst b/test_plans/tx_preparation_test_plan.rst
> new file mode 100644
> index 0000000..6db07b1
> --- /dev/null
> +++ b/test_plans/tx_preparation_test_plan.rst
> @@ -0,0 +1,166 @@
> +.. Copyright (c) <2017>, Intel Corporation
> + All rights reserved.
> +
> + Redistribution and use in source and binary forms, with or without
> + modification, are permitted provided that the following conditions
> + are met:
> +
> + - Redistributions of source code must retain the above copyright
> + notice, this list of conditions and the following disclaimer.
> +
> + - Redistributions in binary form must reproduce the above copyright
> + notice, this list of conditions and the following disclaimer in
> + the documentation and/or other materials provided with the
> + distribution.
> +
> + - Neither the name of Intel Corporation nor the names of its
> + contributors may be used to endorse or promote products derived
> + from this software without specific prior written permission.
> +
> + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
> + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
> + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
> + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
> + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
> + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
> + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
> + OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> +==========================
> +TX preparation forwarding
> +==========================
> +
> +The support of TX preparation forwarding feature consists in:
> +- Do necessary preparations of packet burst to be safely transmitted
> + on device for desired HW offloads:
> + Set/reset checksum field according to the hardware requirements.
> + Check HW constraints (number of segments per packet, etc).
> +- Provide information about max segments of TSO and non-TSO packets
> + accepted by device.
> +
> +APPLICATION (CASE OF USE):
> +- Application should initialize burst of packets to send, set required
> + tx offload flags and required fields, like l2_len, l3_len, l4_len and
> + tso_segsz.
> +- Application passes burst to check required conditions to send packets
> + through the NIC.
> +- The result can be used to send valid packets and restore invalid packets
> + if function fails.
> +
> +Prerequisites
> +=============
> +Support igb_uio, test txprep forwarding features on e1000, i40e, ixgbe and
> +fm10k drivers.Send packets from test platform through the interface eth1 to
> +the tested port 0, then testpmd sends back packet using same port and uses
> +tcpdump to capture packet information.
> +Test DUT
> +eth1 <---> port 0
> +
> +Turn off all hardware offloads on tester machine::
> + ethtool -K eth1 rx off tx off tso off gso off gro off lro off
> +
> +Launch the ``testpmd`` with the following arguments, set ``--txqflags=0`` to
> +let TX checksum offloads and TSO mode in the “Full Featured” TX path::
> + ./testpmd -c 0x6 -n 4 -- -i --txqflags=0 --port-topology=chained
> +
> +Set the ``csum`` forwarding mode::
> + testpmd> set fwd csum
> +
> +Set the verbose level to 1 to display informations for each received packet::
> + testpmd> set verbose 1
> +
> +Test Case: TX preparation forwarding of non-TSO packets
> +=======================================================
> +Set TSO turned off::
> + testpmd> tso set 0 0
> +Start the packet forwarding::
> + testpmd> start
> +
> +Send few IP/TCP/UDP packets from test machine to DUT. Check IP/TCP/UDP
> +checksum correctness in captured packet, such as correct as below::
> + 03:06:36.569730 3c:fd:fe:9d:64:30 > 90:e2:ba:63:22:e8, ethertype IPv4
> + (0x0800), length 104: (tos 0x0, ttl 64, id 1, offset 0, flags [none],
> + proto TCP (6), length 90)
> + 127.0.0.1.ftp-data > 127.0.0.1.http: Flags [.], cksum 0x1998 (correct),
> + seq 0:50, ack 0, win 8192, length 50: HTTP
> + 03:06:36.569816 90:e2:ba:63:22:e8 > 02:00:00:00:00:00, ethertype IPv4
> + (0x0800), length 104: (tos 0x0, ttl 64, id 1, offset 0, flags [none],
> + proto TCP (6), length 90)
> + 127.0.0.1.ftp-data > 127.0.0.1.http: Flags [.], cksum 0x1998 (correct),
> + seq 0:50, ack 1, win 8192, length 50: HTTP
> +
> +
> +Test Case: TX preparation forwarding of TSO packets
> +====================================================
> +
> +Set TSO turned on::
> + testpmd> tso set 800 0
> + TSO segment size for non-tunneled packets is 800
> +
> +Start the packet forwarding::
> + testpmd> start
> +
> +Send few IP/TCP packets from test machine to DUT. Check IP/TCP checksum
> +correctness in captured packet and verify correctness of HW TSO offload
> +for large packets. One large TCP packet (1400 bytes + headers) segmented
> +to two fragments (800 and 600 bytes + headers), checksums are also ok::
> + 15:44:14.478255 00:00:00:00:00:00 > ff:ff:ff:ff:ff:ff, ethertype IPv4
> + (0x0800), length 1454: (tos 0x0, ttl 64, id 1, offset 0, flags [none],
> + proto TCP (6), length 1440, bad cksum 1234 (->7755)!)
> + 127.0.0.1.20 > 127.0.0.1.80: Flags [.], cksum 0x1234 (incorrect ->
> + 0xc5f2), seq 0:1400, ack 1, win 8192, length 1400
> + 15:44:14.478350 00:1e:67:57:03:09 > 02:00:00:00:00:00, ethertype
> + IPv4 (0x0800), length 854: (tos 0x0, ttl 64, id 1, offset 0, flags
> + [none], proto TCP (6), length 840)
> + 127.0.0.1.20 > 127.0.0.1.80: Flags [.], cksum 0x498b (correct), seq
> + 0:800, ack 1, win 8192, length 800
> + 15:44:14.478374 00:1e:67:57:03:09 > 02:00:00:00:00:00, ethertype IPv4
> + (0x0800), length 654: (tos 0x0, ttl 64, id 2, offset 0, flags [none],
> + proto TCP (6), length 640)
> + 127.0.0.1.20 > 127.0.0.1.80: Flags [.], cksum 0x0ab6 (correct), seq
> + 800:1400, ack 1, win 8192, length 600
> +
Suggest to add some hints for transmitted packet and captured packet.
Please try to send jumbo frame and tso value with more realistic value
like 1460.
> +Note: TSO turned on case unsupports UDP packet.
> +
Could you add some description about what will happened after
transmission UDP packets when TSO enabled?
> +Packet::
> + ########
> + # IPv4 #
> + ########
> +
> + # checksum TCP
> + p=Ether()/IP()/TCP(flags=0x10)/Raw(RandString(50))
> +
> + # bad IP checksum
> + p=Ether()/IP(chksum=0x1234)/TCP(flags=0x10)/Raw(RandString(50))
> +
> + # bad TCP checksum
> + p=Ether()/IP()/TCP(flags=0x10, chksum=0x1234)/Raw(RandString(50))
> +
> + # large packet
> + p=Ether()/IP()/TCP(flags=0x10)/Raw(RandString(1400))
> +
> + # bad checksum and large packet
> + p=Ether()/IP(chksum=0x1234)/TCP(flags=0x10,chksum=0x1234)/
> + Raw(RandString(1400))
> +
> +
> + ########
> + # IPv6 #
> + ########
> +
> + # checksum TCP
> + p=Ether()/IPv6()/TCP(flags=0x10)/Raw(RandString(50))
> +
> + # checksum UDP
> + p=Ether()/IPv6()/UDP()/Raw(RandString(50))
> +
> + # bad TCP checksum
> + p=Ether()/IPv6()/TCP(flags=0x10, chksum=0x1234)/Raw(RandString(50))
> +
> + # large packet
> + p=Ether()/IPv6()/TCP(flags=0x10)/Raw(RandString(1400))
> +
prev parent reply other threads:[~2017-02-27 1:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 1:54 Xueqin Lin
2017-02-27 1:22 ` Liu, Yong [this message]
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=58B37F59.1050002@intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
--cc=xueqin.lin@intel.com \
/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).