From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 041F4A00C5; Thu, 7 May 2020 07:25:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8311D1D996; Thu, 7 May 2020 07:25:04 +0200 (CEST) Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by dpdk.org (Postfix) with ESMTP id 46B7A1D993 for ; Thu, 7 May 2020 07:25:03 +0200 (CEST) Received: by mail-il1-f194.google.com with SMTP id w6so226358ilg.1 for ; Wed, 06 May 2020 22:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oKZvXCRkDq5NIaQ6RTX5OjVpaGEGaE3E2ZS5VwCe29o=; b=fR2MZPD/RFhxmC/dt19IFHouDyVRvcOkGBlu1VM6cCffmreczEG0vkQ4tCZwWW/7Uw 0WXu6lbNeCb6WTWMAWWkA+2wiuYPNeaRHmroeRAF8ir3YWPyA7o5hKPVzTXYHpHdxEpJ Mzge4wwvYaDxV5QU9b5VNynFVOYSATR2mwo7qiZnUWzooojAL4nF0UzIwhxCza5Pu40d kFt8YwHUa2FPe9UCH5y+lH/axxgKkUAv/L5T7l8HJWN8hAKl8lebD7lxM/ykoDmKs72I t062uZfX+2GzlboVTxAvehhQaanrQ0BgaKEGpsb1Zte6VcB/ZRITYpad4Ml8C/z1M/2a UkTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oKZvXCRkDq5NIaQ6RTX5OjVpaGEGaE3E2ZS5VwCe29o=; b=I5Ft8RYyO2STCN4VSKMgHz8abS7ztoIaCnPsO56Erq8Oqr8/9rcVhX/8/PjQ2kcnFt 8AQCkP1PIoQXqNIor6LCJ0iMmzvujPtnVuDZLVVgHo25pr6e+Tvqr7ij7YJc3QayEULU djkNRRQoac9QZvHrVrov3v+7okDPIbqxTTkjxDFIH4sRap04qsO1Vwg9SUJl2+yz6vf0 2Ze1UlWrpUhhetBpg+b/4hz4KM6zWP+gC42ovduqO1cDGgGCEuPsXz61JhuYDyoV4Vi7 ow/WNTihgJu39jNJ29UKuZtdU45U2COMLBMLE89OzpFeIazKBZ2vrC4HpkLa8/r44Kmh UDdw== X-Gm-Message-State: AGi0PuYzndm36HLINS7rk8Rm/i+wYiDPW6uIYoLulhwxuX+wg6aicedn r9JBnYzomIFdE3oCKmV+w/wEbqFWJKOMyQs+KeE= X-Google-Smtp-Source: APiQypLSTHT33++3Hw2zIcOKMGCh5pWS9jkOFG+sP0eEhS9OrcivTLG6w0dXkjdykxvmnP9OxNSm5HUvXPggBiWhp0k= X-Received: by 2002:a92:485b:: with SMTP id v88mr12634249ila.271.1588829102490; Wed, 06 May 2020 22:25:02 -0700 (PDT) MIME-Version: 1.0 References: <20200506215847.7628-1-dharmik.thakkar@arm.com> <20200506215847.7628-3-dharmik.thakkar@arm.com> In-Reply-To: <20200506215847.7628-3-dharmik.thakkar@arm.com> From: Jerin Jacob Date: Thu, 7 May 2020 10:54:46 +0530 Message-ID: To: Dharmik Thakkar Cc: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , John McNamara , Marko Kovacevic , dpdk-dev , nd Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 3/5] doc: add cycles per packet in testpmd user guide X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, May 7, 2020 at 3:30 AM Dharmik Thakkar wrote: > > Update documentation for 'show fwd' testpmd runtime function to show > CPU cycles/packet example. > > Signed-off-by: Dharmik Thakkar > Reviewed-by: Honnappa Nagarahalli > Reviewed-by: Phil Yang > --- > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 51 +++++++++++++-------- > 1 file changed, 31 insertions(+), 20 deletions(-) > > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index a360ecccfd3f..2e565ccdbcd4 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -351,26 +351,37 @@ Example for the io forwarding engine, with some packet drops on the tx side:: > > testpmd> show fwd stats all > > - ------- Forward Stats for RX Port= 0/Queue= 0 -> TX Port= 1/Queue= 0 ------- > - RX-packets: 274293770 TX-packets: 274293642 TX-dropped: 128 > - > - ------- Forward Stats for RX Port= 1/Queue= 0 -> TX Port= 0/Queue= 0 ------- > - RX-packets: 274301850 TX-packets: 274301850 TX-dropped: 0 > - > - ---------------------- Forward statistics for port 0 ---------------------- > - RX-packets: 274293802 RX-dropped: 0 RX-total: 274293802 > - TX-packets: 274301862 TX-dropped: 0 TX-total: 274301862 > - ---------------------------------------------------------------------------- > - > - ---------------------- Forward statistics for port 1 ---------------------- > - RX-packets: 274301894 RX-dropped: 0 RX-total: 274301894 > - TX-packets: 274293706 TX-dropped: 128 TX-total: 274293834 > - ---------------------------------------------------------------------------- > - > - +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++ > - RX-packets: 548595696 RX-dropped: 0 RX-total: 548595696 > - TX-packets: 548595568 TX-dropped: 128 TX-total: 548595696 > - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > + ------- Forward Stats for RX Port= 0/Queue= 0 -> TX Port= 1/Queue= 0 ------- > + RX-packets: 43536504 TX-packets: 43536488 TX-dropped: 0 > + > + ------- Forward Stats for RX Port= 1/Queue= 0 -> TX Port= 0/Queue= 0 ------- > + RX-packets: 149738504 TX-packets: 149738504 TX-dropped: 0 > + > + ------- Forward Stats for RX Port= 1/Queue= 1 -> TX Port= 0/Queue= 1 ------- > + RX-packets: 149753052 TX-packets: 149753052 TX-dropped: 0 > + > + ---------------------- Forward statistics for port 0 ---------------------- > + RX-packets: 43538881 RX-dropped: 72 RX-total: 43538953 > + TX-packets: 299491753 TX-dropped: 0 TX-total: 299491753 > + ---------------------------------------------------------------------------- > + > + ---------------------- Forward statistics for port 1 ---------------------- > + RX-packets: 299493085 RX-dropped: 8357 RX-total: 299501442 > + TX-packets: 43539683 TX-dropped: 0 TX-total: 43539683 > + ---------------------------------------------------------------------------- > + > + +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++ > + RX-packets: 343031966 RX-dropped: 8429 RX-total: 343040395 > + TX-packets: 343031436 TX-dropped: 0 TX-total: 343031436 > + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > + > + CPU cycles/packet=14.28 (total cycles=4899533541 / total RX packets=343031966) at 200 MHz > + > +.. note:: > + > + Measuring CPU cycles/packet requires enabling CONFIG_RTE_TEST_PMD_RECORD_CORE_TX_CYCLES configuration option. IMO, it a very useful feature for CI/CD and development as we don't need to see any Traffic generator to see any regression. I think, enabling CONFIG_RTE_TEST_PMD_RECORD_CORE_TX_CYCLES configuration is overhead to use in all the environments. How about adding a "new forward" engine with and remove CONFIG_RTE_TEST_PMD_RECORD_CORE_TX_CYCLES. The new forward engine will have CONFIG_RTE_TEST_PMD_RECORD_CORE_TX_CYCLES code enabled. So the application can use the forward engine dynamically. aka the same build works for both cases. > + On aarch64 platforms, by default, the cycles are counted using generic counter which runs at a lower frequency than the CPU clock. > + To get the cycles/packet at CPU clock frequency, please scale the cycles/packet to CPU clock frequency. Alternatively, use the PMU based cycle counter. > > clear fwd > ~~~~~~~~~ > -- > 2.20.1 >