From patchwork Thu Apr 13 18:15:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 126022 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 47CE342932; Thu, 13 Apr 2023 11:57:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE1A241138; Thu, 13 Apr 2023 11:57:46 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 9E84240A84 for ; Thu, 13 Apr 2023 11:57:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681379865; x=1712915865; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kiCh9CobKLJqDN7eq3AHz3kC08adfqoGfdbncaaVJtI=; b=jE3QTx3nMi+t8CsQNutto8Tw1Id2yug/yEWLHlKCQaRsmgA5vqgHzK2b 3YhAxQjb1YtVmmp1VsHeiJS4mUh3ngjhspoy2vRC29Q5c8sEEO20U+ivf EgCKI+tsssWfsYD8XWdcz8r3AEZ6WeqWdMExJbAPWpTSwzGQDC9g5w8wW f3WGenC6hX4v0RQerNO73VUBV8fTUyV5hkHWAtqZZdZBGh+iG9JyF7l6I OdjxYbZpiz86CJTNyF5rET8IZWSsuwiPhfBhZKmB3WkUU6i3UVRsF7euz lpGPUnS4eE+rmunEc7mjVo0rxG0k8xOwAwsedkPwMIHtEC/7BbYdtGIWR w==; X-IronPort-AV: E=McAfee;i="6600,9927,10678"; a="332849772" X-IronPort-AV: E=Sophos;i="5.98,341,1673942400"; d="scan'208";a="332849772" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2023 02:57:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10678"; a="833082367" X-IronPort-AV: E=Sophos;i="5.98,341,1673942400"; d="scan'208";a="833082367" Received: from unknown (HELO localhost.localdomain) ([10.239.252.96]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2023 02:57:44 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V1 1/2] test_plans/stats_checks: add a case Date: Thu, 13 Apr 2023 18:15:39 +0000 Message-Id: <20230413181540.51536-2-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230413181540.51536-1-songx.jiale@intel.com> References: <20230413181540.51536-1-songx.jiale@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 add a case to test pf negative xstats check. Signed-off-by: Jiale Song --- test_plans/stats_checks_test_plan.rst | 138 ++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) diff --git a/test_plans/stats_checks_test_plan.rst b/test_plans/stats_checks_test_plan.rst index 1b7d722f..e4731b95 100644 --- a/test_plans/stats_checks_test_plan.rst +++ b/test_plans/stats_checks_test_plan.rst @@ -281,3 +281,141 @@ Test Case: VF xstats Checks 3. Then run the same steps of PF xstats Checks, get same result. note: because one port forwarding packets, so check rx and tx both in port 0. + +Test Case: PF negative xstats check +=================================== +1. Blind the PF to vfio-pci:: + + ./usertools/dpdk-devbind.py -b vfio-pci {pf_pci} + +2. Launch testpmd with default mtu:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c f -n 4 -- -i --rxq=4 --txq=4 + testpmd> set fwd mac + testpmd> start + testpmd> clear port xstats all + +3. Set the mtu for the port where the data packet is sent:: + + ifconfig ens7 mtu 5018 + +4. Send jumbo frames:: + + sendp(Ether(dst="00:00:00:00:01:00", src="52:00:00:00:00:00")/IP()/Raw(load="X"*4980), iface="ens7") + +5. Check port 0 xstats:: + + Check rx port can not receive packet and rx_errors increased. + testpmd> show port xstats 0 + ###### NIC extended statistics for port 0 + rx_good_packets: 0 + tx_good_packets: 0 + rx_good_bytes: 0 + tx_good_bytes: 0 + rx_missed_errors: 0 + rx_errors: 1 + tx_errors: 0 + rx_mbuf_allocation_errors: 0 + rx_q0_packets: 0 + rx_q0_bytes: 0 + rx_q0_errors: 0 + tx_q0_packets: 0 + tx_q0_bytes: 0 + rx_unicast_packets: 0 + rx_multicast_packets: 0 + rx_broadcast_packets: 0 + rx_dropped_packets: 0 + rx_unknown_protocol_packets: 0 + tx_unicast_packets: 0 + tx_multicast_packets: 0 + tx_broadcast_packets: 0 + tx_dropped_packets: 0 + tx_link_down_dropped: 0 + rx_crc_errors: 0 + rx_illegal_byte_errors: 0 + rx_error_bytes: 0 + mac_local_errors: 0 + mac_remote_errors: 0 + rx_len_errors: 0 + tx_xon_packets: 0 + rx_xon_packets: 0 + tx_xoff_packets: 0 + rx_xoff_packets: 0 + rx_size_64_packets: 0 + rx_size_65_to_127_packets: 0 + rx_size_128_to_255_packets: 0 + rx_size_256_to_511_packets: 0 + rx_size_512_to_1023_packets: 0 + rx_size_1024_to_1522_packets: 0 + rx_size_1523_to_max_packets: 0 + rx_undersized_errors: 0 + rx_oversize_errors: 1 + rx_mac_short_pkt_dropped: 0 + rx_fragmented_errors: 0 + rx_jabber_errors: 0 + tx_size_64_packets: 0 + tx_size_65_to_127_packets: 0 + tx_size_128_to_255_packets: 0 + tx_size_256_to_511_packets: 0 + tx_size_512_to_1023_packets: 0 + tx_size_1024_to_1522_packets: 0 + tx_size_1523_to_max_packets: 0 + +6. Check port 1 xstats:: + + Check all statistics are 0 for tx port. + testpmd> show port xstats 1 + ###### NIC extended statistics for port 1 + rx_good_packets: 0 + tx_good_packets: 0 + rx_good_bytes: 0 + tx_good_bytes: 0 + rx_missed_errors: 0 + rx_errors: 0 + tx_errors: 0 + rx_mbuf_allocation_errors: 0 + rx_q0_packets: 0 + rx_q0_bytes: 0 + rx_q0_errors: 0 + tx_q0_packets: 0 + tx_q0_bytes: 0 + rx_unicast_packets: 0 + rx_multicast_packets: 0 + rx_broadcast_packets: 0 + rx_dropped_packets: 0 + rx_unknown_protocol_packets: 0 + tx_unicast_packets: 0 + tx_multicast_packets: 0 + tx_broadcast_packets: 0 + tx_dropped_packets: 0 + tx_link_down_dropped: 0 + rx_crc_errors: 0 + rx_illegal_byte_errors: 0 + rx_error_bytes: 0 + mac_local_errors: 0 + mac_remote_errors: 0 + rx_len_errors: 0 + tx_xon_packets: 0 + rx_xon_packets: 0 + tx_xoff_packets: 0 + rx_xoff_packets: 0 + rx_size_64_packets: 0 + rx_size_65_to_127_packets: 0 + rx_size_128_to_255_packets: 0 + rx_size_256_to_511_packets: 0 + rx_size_512_to_1023_packets: 0 + rx_size_1024_to_1522_packets: 0 + rx_size_1523_to_max_packets: 0 + rx_undersized_errors: 0 + rx_oversize_errors: 0 + rx_mac_short_pkt_dropped: 0 + rx_fragmented_errors: 0 + rx_jabber_errors: 0 + tx_size_64_packets: 0 + tx_size_65_to_127_packets: 0 + tx_size_128_to_255_packets: 0 + tx_size_256_to_511_packets: 0 + tx_size_512_to_1023_packets: 0 + tx_size_1024_to_1522_packets: 0 + tx_size_1523_to_max_packets: 0 +