From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A7F8AA00E6 for ; Wed, 17 Apr 2019 01:35:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8BEEC1B557; Wed, 17 Apr 2019 01:35:15 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 34A201B551 for ; Wed, 17 Apr 2019 01:35:14 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Apr 2019 16:35:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,359,1549958400"; d="scan'208";a="132004634" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga007.jf.intel.com with ESMTP; 16 Apr 2019 16:35:07 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 16 Apr 2019 16:35:07 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 16 Apr 2019 16:35:06 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.164]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.139]) with mapi id 14.03.0415.000; Wed, 17 Apr 2019 07:35:05 +0800 From: "Tu, Lijuan" To: "Xu, Yanjie" , "dts@dpdk.org" CC: "Xu, Yanjie" Thread-Topic: [dts] [PATCH] add telemetry test plan Thread-Index: AQHU9D+MuvWr4lx3UEiLDSkzaKPe56Y/cXVw Date: Tue, 16 Apr 2019 23:35:04 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA62FD3@SHSMSX101.ccr.corp.intel.com> References: <1555431431-169117-1-git-send-email-yanjie.xu@intel.com> In-Reply-To: <1555431431-169117-1-git-send-email-yanjie.xu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWVjOTViNzctOWMwYy00MjViLTgwZjMtMGM4NjA0N2VjZDMzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUEtQbUxGemhiNzZ3MERQTDBJVnB6R3dIcDBMMmVybis1VHRYdkQramJOeW80amNPOWtDWHFhQ0JUZUhuN0NUTiJ9 x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] add telemetry test plan X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "dts" Applied with copyright date changed. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xuyanjie > Sent: Tuesday, April 16, 2019 9:17 AM > To: dts@dpdk.org > Cc: Xu, Yanjie > Subject: [dts] [PATCH] add telemetry test plan >=20 > Signed-off-by: xuyanjie >=20 > diff --git a/test_plans/telemetry_test_plan.rst > b/test_plans/telemetry_test_plan.rst > new file mode 100644 > index 0000000..8c8898e > --- /dev/null > +++ b/test_plans/telemetry_test_plan.rst > @@ -0,0 +1,228 @@ > +.. Copyright (c) <2015-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. > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +DPDK Telemetry API Tests > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +This test for Telemetry API for Service Assurance can be run on linux > userspace. > +The application which initializes packet forwarding will act as the > +server, sending metrics to the requesting application which acts as the > client. > + > +In DPDK, applications can be used to initialize the ``telemetry`` as a v= irtual > device. > +To view incoming traffic on featured ports, the application should be > +run first (ie. after ports are configured).Once the application is > +running, the service assurance agent (for example the collectd plugin) > should be run to begin querying the API. > + > +A client connects their Service Assurance application to the DPDK > +application via a UNIX socket. Once a connection is established,a > +client can send JSON messages to the DPDK application requesting > +metrics via another UNIX client.This request is then handled and parsed > +if valid. The response is then formatted in JSON and sent back to the > +requesting client > + > +Hardwares:: > +------------ > +I40E driver NIC or ixgbe driver NIC > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Enable the telemetry API by modifying the following config option bef= ore > building DPDK:: > + > + Python >=3D 2.5 > + Jansson library for JSON serialization > + CONFIG_RTE_LIBRTE_TELEMETRY=3Dy and libjansson should be > available > + make install RTE_SDK=3D`pwd` T=3Dx86_64-native-linuxapp-gcc > + > +2. Configiure PF > + > + modprobe uio; > + insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko; > + > +3. Launch testpmd as the primary application with the ``telemetry`` > + ./app/testpmd --telemetry > + > +4. Launch the ``telemetry`` python script with a client filepath : > + > + python usertools/telemetry_client.py /var/run/some_client > + > +5. Build should include both make and mesion static/shared > + > + For meson build -return to DPDK directory and create a meson folder: > + cd build > + ninja > + This will compile DPDK via the meson build system > + For make build is normal build > + > +Test case: basic connection for testpmd and telemetry client:: > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D > + > +1. bind two ports and build > + > + $./usertools/dpdk-devbind.py --bind=3Digb_uio 18:00.0 18:00.1 > + > +2. Run Testpmd with 2 ports > + > + $ ./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 4 --telemetry -- > + -i > + > + For the building meson shared and make shared . tested command > should be used when run on ubuntu OS > + make share and meson version:: > + $ ./app/testpmd -c f -n 4 -d librte_mempool_ring.so -d > + librte_telemetry.so --telemetry --socket-mem=3D1024,1024 -- -i > + > + 3.Run Python terminal: > + python dpdk-telemetry-client.py > + enter 1/2/ : > + > + 4. check and verify any error show on testpmd > + > +Test case: Stats of 2 ports for testpmd and telemetry with same type > +nic > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1.bind two ports > + $./usertools/dpdk-devbind.py --bind=3Digb_uio 18:00.0 18:00.1 > + > +2. Run Testpmd with 2 ports > + > + $ ./x86_64-native-linuxapp-gcc/app/testpmd --telemetry -- -i > + > +3.Run Python terminal: > + > + python ./usertools/telemetry_client.py > + enter 1/2/ : > + > +4.check and very any error show on testpmd > + > +5.set rx/tx configration by testpmd > + > + testpmd-> stop > + testpmd> show port xstats all > + > +6. telemetry client ,enter 1/2 > + > +7. check the xstats all and the metrics be displayed on the client > +terminal in JSON format > + > + a. Ensure # of ports stats being returned =3D=3D # 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 =3D=3D 0) > + > +Test case: Stats of 2 ports for testpmd and telemetry with different > +type nic > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1.bind two ports > + $./usertools/dpdk-devbind.py --bind=3Digb_uio 18:00.0 88:00.1 > + > +2. Run Testpmd with 2 ports > + > + $ ./x86_64-native-linuxapp-gcc/app/testpmd --telemetry -- -i > + > +3.Run Python terminal: > + > + python ./usertools/telemetry_client.py > + enter 1/2/ : > + > +4.check and very any error show on testpmd > + > +5.set rx/tx configration by testpmd > + > + testpmd-> stop > + testpmd> show port xstats all > + > +6. telemetry client ,enter 1/2 > + > +7. check the xstats all and the metrics be displayed on the client > +terminal in JSON format > + > + a. Ensure # of ports stats being returned =3D=3D # 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 =3D=3D 0) > + > +Test case: Stats of 4 ports for testpmd and telemetry with same type > +nic > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1.bind two ports > + $./usertools/dpdk-devbind.py --bind=3Digb_uio 18:00.0 18:00.1 b1:00.0 > +b1:00.1 > + > +2. Run Testpmd with 2 ports > + > + $ ./x86_64-native-linuxapp-gcc/app/testpmd --telemetry -- -i > + > +3.Run Python terminal: > + > + python ./usertools/telemetry_client.py > + enter 1/2/ > + > +4.check and very any error show on testpmd > + > +5.set rx/tx configration by testpmd > + > + testpmd-> stop > + testpmd> show port xstats all > + > +6. telemetry client ,enter 1/2 > + > +7. check the xstats all and the metrics be displayed on the client > +terminal in JSON format > + > + a. Ensure # of ports stats being returned =3D=3D # 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 =3D=3D 0) > + > +Test case: Stats of 4 ports for testpmd and telemetry with different > +type nic > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1.bind two ports > + $./usertools/dpdk-devbind.py --bind=3Digb_uio 18:00.0 18.00.1 88:00.0 > +88:00.1 > + > +2. Run Testpmd with 2 ports > + > + $ ./x86_64-native-linuxapp-gcc/app/testpmd --telemetry -- -i > + > +3.Run Python terminal: > + > + python ./usertools/telemetry_client.py > + enter 1/2/ : > + > +4.check and very any error show on testpmd > + > +5.set rx/tx configration by testpmd > + > + testpmd-> stop > + testpmd> show port xstats all > + > +6. telemetry client ,enter 1/2 > + > +7. check the xstats all and the metrics be displayed on the client > +terminal in JSON format > + > + a. Ensure # of ports stats being returned =3D=3D # 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 =3D=3D 0) > \ No newline at end of file > -- > 2.7.4