From patchwork Thu Sep 22 23:03:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 116653 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 D6C94A0543; Thu, 22 Sep 2022 16:51:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9865640156; Thu, 22 Sep 2022 16:51:20 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 0ECAA400D7 for ; Thu, 22 Sep 2022 16:51:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663858279; x=1695394279; h=from:to:cc:subject:date:message-id; bh=SQrwwdaf166AuoSveJzwM2OczxMEAIxRXfW6RrGz3rw=; b=TBWs4dqXJjOHGEXXpQhnJBIzepZIL+c2di8GdEw+CgNrLYEp09CMh6/8 vdBzo8H2Be30al2KbX0AQ71AU/xcvYmmCf7lGujPzkxNfPriavzskwJ3u uOOcI6pOmJvpqvk0q91zC1XWsutTK8SiV/kXLxDWiwiABmFwG9Lj5kPvu +r1yEgMTif0GBwK/CBrxUgj1myn/4f4OO0jmlG7p4fGXixFKrjcnJ0r4O 4q1U7mtfkMf+/t96iyAkQW6ExvoQQMNZghwaf/UXZo4hTKd1p06sEwSQJ kfA9MCzJI1jgjSB1BUYmuyS5FPCwVCJIWCTNjOEaZ9uezzs7h+Pm1YjcG g==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="301163945" X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="301163945" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 07:51:17 -0700 X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="597459480" Received: from unknown (HELO localhost.localdomain) ([10.239.252.93]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 07:51:16 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Subject: [dts][PATCH V4 1/2] test_plans/telemetry:add cases to check laser power in dpdk Date: Fri, 23 Sep 2022 07:03:51 +0800 Message-Id: <20220922230352.14237-1-zhiminx.huang@intel.com> X-Mailer: git-send-email 2.17.1 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 customer need to get the laser power values in dpdk. so a new telemtry command /ethdev/module_eeprom to show module EEPROM for each port in dpdk22.07. we add new test cases to check laser power value. 1.check the laser power values same as that of 'ethtool -m'. 2.check different/same optical modules have different/same laser power values. Signed-off-by: Zhimin Huang Acked-by: Peng, Yuan --- v4: -optimized code in testcase. v3: -detail subject and comments. -add some descriptions related to ethtool version. test_plans/telemetry_test_plan.rst | 74 +++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/test_plans/telemetry_test_plan.rst b/test_plans/telemetry_test_plan.rst index 16568cd3..b1ac5844 100644 --- a/test_plans/telemetry_test_plan.rst +++ b/test_plans/telemetry_test_plan.rst @@ -200,4 +200,76 @@ Test case: Stats of 4 ports for testpmd and telemetry with different type nic a. Ensure # of ports stats being returned == # of ports b. Ensure packet counts (eg rx_good_packets) is 0 c. Ensure extended NIC stats are shown (depends on PMD used for testing, refer to ixgbe/i40e tests for PMD xstats) - d. Ensure extended NIC stats are 0 (eg: rx_q0_packets == 0) \ No newline at end of file + d. Ensure extended NIC stats are 0 (eg: rx_q0_packets == 0) + +Test case: read nic Laser Power via dpdk +======================================== + +1.Bind ports to dpdk:: + + ./usertools/dpdk-devbind.py --bind=vfio-pci 18:00.0 18.00.1 + +2.Launch the dpdk testpmd with teltmetry:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd --telemetry -- -i + +3.Launch the telemetry client:: + + python ./usertools/dpdk-telemetry.py + +4.Excute command in telemtry client:: + + --> /ethdev/module_eeprom, + +5.check the testpmd and telemetry show info same as 'ethtool -m':: + + ethtool -m ens25f1 | grep 'Laser output power' + Laser output power : 0.6703 mW / -1.74 dBm + +.. note:: + + refer to command 'ethtool -m' of ethtool v5.4 + +Test case: check Laser Power in different optical modules +========================================================= + +1.set port 0 and port 1 with diffent optical modules + +2.Launch the dpdk testpmd with teltmetry:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd --telemetry -- -i + +3.Launch the telemetry client:: + + python ./usertools/dpdk-telemetry.py + +4.Excute command in telemtry client:: + + --> /ethdev/module_eeprom,0 + --> /ethdev/module_eeprom,1 + +5.check port 0 and port 1 have different Laser Power + +Test case: check Laser Power in same optical modules +==================================================== + +1.set port 0 and port 1 with same optical modules + +2.Launch the dpdk testpmd with teltmetry:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd --telemetry -- -i + +3.Launch the telemetry client:: + + python ./usertools/dpdk-telemetry.py + +4.Excute command in telemtry client:: + + --> /ethdev/module_eeprom,0 + --> /ethdev/module_eeprom,1 + +5.check port 0 and port 1 have same Laser Power + +.. note:: + + the laser power will change slightly with the voltage and temperature