From patchwork Mon Sep 19 16:16:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yaqi Tang X-Patchwork-Id: 116436 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02A9EA00C3; Mon, 19 Sep 2022 18:16:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED73741148; Mon, 19 Sep 2022 18:16:21 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id B911D40141 for ; Mon, 19 Sep 2022 18:16:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663604179; x=1695140179; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=V1IAtoSN88by4itgTDqe28+dssO2+ZA/e33K2z+I2D0=; b=iZVNeHhrMEV9A5lu7CtkrInThi3TPa7iSGVB5/v7W9MDSN8c+JQu7yqX njtWFFacfjpdBNfOG0YICoFNP3k7gKnsUZp2VaTk977HSH6sXQwZzqD82 yEmCcWDab45FGBDLjWVl6Oyjxn40OEhhRGVaN8N751IrM6QZ6JVRcdkOu oyGnzZcoSHMdl3iJlNjiVZNqH1ZCS/7LRCDCpLdVtH3OxxfnqcOblSzNQ lVa+yeaWxg5Fvpobeyy+ukztEJh+cTA78aKUxDLfvnT/20ksBjVG4JFDJ U/MJQsjKg7xh0cKzee30MVjJXbzXELC5fgoup6V1I1DzlA/7Qtr4z4BPG w==; X-IronPort-AV: E=McAfee;i="6500,9779,10475"; a="286488484" X-IronPort-AV: E=Sophos;i="5.93,328,1654585200"; d="scan'208";a="286488484" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2022 09:16:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,328,1654585200"; d="scan'208";a="649208651" Received: from dpdk-yaqi.sh.intel.com ([10.67.119.213]) by orsmga008.jf.intel.com with ESMTP; 19 Sep 2022 09:16:18 -0700 From: Yaqi Tang To: dts@dpdk.org Cc: Yaqi Tang Subject: [dts][PATCH V4 2/3] test_plans/ice_iavf_rx_timestamp: ice iavf support rx timestamp Date: Mon, 19 Sep 2022 16:16:08 +0000 Message-Id: <20220919161609.269836-3-yaqi.tang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220919161609.269836-1-yaqi.tang@intel.com> References: <20220919161609.269836-1-yaqi.tang@intel.com> MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org The IAVF driver is able to enable rx timestamp offload. Signed-off-by: Yaqi Tang --- .../ice_iavf_rx_timestamp_test_plan.rst | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 test_plans/ice_iavf_rx_timestamp_test_plan.rst diff --git a/test_plans/ice_iavf_rx_timestamp_test_plan.rst b/test_plans/ice_iavf_rx_timestamp_test_plan.rst new file mode 100644 index 00000000..fb99eb55 --- /dev/null +++ b/test_plans/ice_iavf_rx_timestamp_test_plan.rst @@ -0,0 +1,168 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2022 Intel Corporation + +============================= +ICE IAVF Support Rx Timestamp +============================= + +Description +=========== +The VF driver is able to enable rx timestamp offload, the 64 bits timestamp is able +to extracted from the flexible Rx descriptor and be stored in mbuf's dynamic field. +The received packets have timestamp values, and the timestamp values are incremented. + +.. note:: + + Require kernel support rx timestamp offload function in VF. + +Prerequisites +============= + +Topology +-------- +DUT port 0 <----> Tester port 0 + +Hardware +-------- +Supported NICs: IntelĀ® Ethernet 800 Series E810-XXVDA4/E810-CQ + +Software +-------- +dpdk: http://dpdk.org/git/dpdk +scapy: http://www.secdev.org/projects/scapy/ + +General Set Up +-------------- +1. Compile DPDK:: + + # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static + # ninja -C -j 110 + +2. Get the pci device id and interface of DUT and tester. + For example, 0000:3b:00.0 and 0000:3b:00.1 is pci device id, + ens785f0 and ens785f1 is interface:: + + # ./usertools/dpdk-devbind.py -s + + 0000:3b:00.0 'Device 159b' if=ens785f0 drv=ice unused=vfio-pci + 0000:3b:00.1 'Device 159b' if=ens785f1 drv=ice unused=vfio-pci + +3. Generate 1 VF on PF0, set mac address for this VF:: + + # echo 1 > /sys/bus/pci/devices/0000:3b:00.0/sriov_numvfs + # ip link set ens785f0 vf 0 mac 00:11:22:33:44:55 + + +4. Bind the DUT port to dpdk:: + + # ./usertools/dpdk-devbind.py -b vfio-pci + +Test Case +========= +Common Steps +------------ +All the packets in this test plan use below settings: +dst mac: 00:11:22:33:44:55 +ipv4 src: 192.168.0.2 +ipv4 dst: 192.168.0.3 +ipv6 src: 2001::2 +ipv6 dst: 2001::3 +sport: 1026 +dport: 1027 +count: 3 + +1. Check driver is IAVF:: + + testpmd> show port info all + +2. Set fwd engine:: + + testpmd> set fwd rxonly + +3. Set verbose:: + + testpmd> set verbose 1 + +4. Start testpmd:: + + testpmd> start + +5. Send ether packets, record the timestamp values and check the timestamp values are incremented:: + + >>> sendp([Ether(dst="")/("X"*480)], iface="",count=) + +6. Send ipv4 packets, record the timestamp values and check the timestamp values are incremented:: + + >>> sendp([Ether(dst="")/IP(src="",dst="")/("X"*480)], iface="",count=) + +7. Send ipv6 packets, record the timestamp values and check the timestamp values are incremented:: + + >>> sendp([Ether(dst="")/IPv6(src="",dst="")/("X"*480)], iface="",count=) + +8. Send ipv4-udp packets, record the timestamp values and check the timestamp values are incremented:: + + >>> sendp([Ether(dst="")/IP(src="",dst="")/UDP(sport=, dport=)/("X"*480)], iface="",count=) + +9. Send ipv6-udp packets, record the timestamp values and check the timestamp values are incremented:: + + >>> sendp([Ether(dst="")/IPv6(src="",dst="")/UDP(sport=, dport=)/("X"*480)], iface="",count=) + +10. Send ipv4-tcp packets, record the timestamp values and check the timestamp values are incremented:: + + >>> sendp([Ether(dst="")/IP(src="",dst="")/TCP(sport=, dport=)/("X"*480)], iface="",count=) + +11. Send ipv6-tcp packets, record the timestamp values and check the timestamp values are incremented:: + + >>> sendp([Ether(dst="")/IPv6(src="",dst="")/TCP(sport=, dport=)/("X"*480)], iface="",count=) + +12. Send ipv4-sctp packets, record the timestamp values and check the timestamp values are incremented:: + + >>> sendp([Ether(dst="")/IP(src="",dst="")/SCTP(sport=, dport=)/("X"*480)], iface="",count=) + +13. Send ipv6-sctp packets, record the timestamp values and check the timestamp values are incremented:: + + >>> sendp([Ether(dst="")/IPv6(src="",dst="")/SCTP(sport=, dport=)/("X"*480)], iface="",count=) + +Test Case 1: Without timestamp, check no timestamp +-------------------------------------------------- +This case is designed to check no timestamp value while testpmd not enable rx timestamp. + +Test Steps +~~~~~~~~~~ +1. Start testpmd with different command line:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c f -n 4 -a 3b:01.0 -- -i --rxq=16 --txq=16 + +2. Send packets as common steps, check no timestamp value. + +Test Case 2: Single queue With timestamp, check timestamp +--------------------------------------------------------- +This case is designed to check single queue has timestamp values and the timestamp values are incremented. + +Test Steps +~~~~~~~~~~ +1. Start testpmd with different command line:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c f -n 4 -a 3b:01.0 -- -i --enable-rx-timestamp + +2. Send packets as common steps, check single queue has timestamp values and the timestamp values are incremented. + + testpmd> port 0/queue 0: received 3 packets + src=00:00:00:02:00:00 - dst=00:11:22:33:44:55 - type=0x9000 - length=494 - nb_segs=1 - timestamp 1663602166832732634 - hw ptype: L2_ETHER - sw ptype: L2_ETHER - l2_len=14 - Receive queue=0x0 + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN + src=00:00:00:02:00:00 - dst=00:11:22:33:44:55 - type=0x9000 - length=494 - nb_segs=1 - timestamp 1663602166832881817 - hw ptype: L2_ETHER - sw ptype: L2_ETHER - l2_len=14 - Receive queue=0x0 + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN + src=00:00:00:02:00:00 - dst=00:11:22:33:44:55 - type=0x9000 - length=494 - nb_segs=1 - timestamp 1663602166833010250 - hw ptype: L2_ETHER - sw ptype: L2_ETHER - l2_len=14 - Receive queue=0x0 + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN + +Test Case 3: Multi queues With timestamp, check timestamp +--------------------------------------------------------- +This case is designed to check multi queues have timestamp values and the timestamp values are incremented. + +Test Steps +~~~~~~~~~~ +1. Start testpmd with different command line:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c f -n 4 -a 3b:01.0 -- -i --rxq=16 --txq=16 --enable-rx-timestamp + +2. Send packets as common steps, check multi queues have timestamp values and the timestamp values are incremented.