From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AC54241B8D; Tue, 31 Jan 2023 11:05:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 964D340DFB; Tue, 31 Jan 2023 11:05:13 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2058.outbound.protection.outlook.com [40.107.101.58]) by mails.dpdk.org (Postfix) with ESMTP id 539E64067B for ; Tue, 31 Jan 2023 11:05:12 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gjQ0iHB1zBn4gOzUE5x5HAT+0GMsprLPU+t9JHMWrnfdR6iC+zR1SlfPUe8MjrrseQjPTTQdXKfgKIbNrklaFh1ly2FnN5ECnRGmDrMdoqo7QXfq6SyIpsraCuaXeKSJYaezKsGaPE+tZ/0ffNvNODlGyH0buxSbVmWyGl5C+X+iWsAgrcAovnGggd88vXoy+3JNoxdvIoGQGVwDBIY6VuoZR1QsT/eh0Ss7Q7C+eQqBsKgBhwf1lf1J41bXyK8UYDxzIqWFjplTvcIdmXqA29h51ppm7hw0Ft+6dsPQDM43W6Ad9ULVzE1EqUxR0K7dMgbqUfDXzKmywSJb4rgwTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=R4fbTP3YV4AlDiGkd4wHUxArM9mcTke1CPhLCWftoZI=; b=aNuLpqZYP0jvivp5sVtoaZDazII+QaUCuXFy4hZqPvIthuzFwU9TRI09f+hmhHmzQiSsv6kYgXU3K2FxpPuKePKZjXLHPLXJ16Sww1PMTrLfc6t3TX1rNq8UtoMWYrn47oC7m35V/ZOyiPbBOgx5XVKPQduJlZwUhQFP/zRI5p2S90lJgJNNzEfVJtg9VFbl3f2oPMULYmbgzLX2aqop+LuGXdpR9ByZVY+Awu6dWCsX1fcARG0p447EtTIsL+h89YlD2eLhkfrZ3YiHJSg/LDxX//1oe8wB0tapuxzZE/5b4Cd53n3/wGBmqR+V0eiFERmjLeAoi5tZ31wHvlPqxQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R4fbTP3YV4AlDiGkd4wHUxArM9mcTke1CPhLCWftoZI=; b=TkElmHJd9f/1VoePF6P5PDph44Ziv6tCXFXFq0d8+misAgQ8JTe1eCQ328AZgWZbq7HypR8NQm0y4CdJYXWjAXXPh6YTTOovfX+vjX8yZIK6LBh7Cs+YvC++oIvgIILNqYY9gCkG+8x7SqR5Ndp9pYR8org/j6kYndXfjMBK/hM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by BL1PR12MB5352.namprd12.prod.outlook.com (2603:10b6:208:314::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Tue, 31 Jan 2023 10:05:10 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a%8]) with mapi id 15.20.6043.038; Tue, 31 Jan 2023 10:05:10 +0000 Message-ID: Date: Tue, 31 Jan 2023 10:05:03 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] net/gve: add support for basic stats Content-Language: en-US To: Joshua Washington Cc: Rushil Gupta , Stephen Hemminger , Junfeng Guo , qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, dev@dpdk.org, jeroendb@google.com, jrkim@google.com, Xiaoyun Li References: <20221124073335.3985214-1-junfeng.guo@intel.com> <20221207083948.22af7cae@hermes.local> <78fcfa68-120b-af64-fb42-aa2031d45592@amd.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0271.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:37a::7) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|BL1PR12MB5352:EE_ X-MS-Office365-Filtering-Correlation-Id: ace754d2-23df-4d54-17a7-08db0372a2d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ggd9PQQjEbO6jkfpqdwI1G628gp4N69QjdW/VidXzOsmfaqbW7k7YzKmRrv/IVt1cGCIssrTilTxJN5Z06g7Ax9z1Rcac0rz1sT6Yq2EPKIzKKwzMWoPxbTC9b0ik+5VZzlL214t08meWD34NrKXy/VOYFW3W8YnozI35luzUrleP4VDFkfl4kihMHNq6XNRemczTcL+7wLjDaZVBTryJJq6aMaw0IQThG6QpFLOMhv0R3ObcLjhP9MnuJ6WkLB1oQbe75OsCDNTQ9SsZZpdVmD4lkt9en8DEywZeXdxTAdsbDIlJysWAQJieYPXfEK4DEFM0gBcFaztHj66gTtXSdwy+idn5fQpBI5KiMNfhcdzMzit6vKuMjVs82E0srG+hpytlJqv7SRKJIxFOtFxPlmRUfoSasTAVkMmtO7wv8QKGI9MJyI86+wU9tV9GVe1qEIaH0C6fy+WCc80T6PjISslgliWIbv3EJxX9wCpVRGu9qWWKf6SPbbG1SBtux5ig8hUx0/rATI8FrUiTZndzOSii57CWCXkICOi+oY3PiqMSWaUbytKIf7iar3B/SCmMzUeyt5cD3THH5Jbu3KF8/uFkWVT9k6YXO7dmIt3W3Y3I3tlYX7NndhVR3TXo9cnHkRZByHUjlOJKNbPsSyuPGRqfoNalhAWgz+0PFR/YeBY271CyV9sAf+NdcXSHBKB1ID1X6BAzAF3fAwDXS/H9+ohWwymgwhZXKZzTKZ57HgcxiCqkse2QSvMlRZ1oCeCJ2EhUxy25hl/E29ljjenPg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(136003)(376002)(346002)(396003)(39860400002)(366004)(451199018)(5660300002)(186003)(44832011)(26005)(6512007)(54906003)(2616005)(7416002)(86362001)(31696002)(6486002)(478600001)(36756003)(6506007)(966005)(40140700001)(2906002)(53546011)(6666004)(66946007)(66556008)(66476007)(6916009)(4326008)(31686004)(38100700002)(66574015)(83380400001)(316002)(8676002)(8936002)(41300700001)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RmlGVzdRVko4K08zRjZBNEhtclhYcG9JLzRHRml1N3NaUWlkTk5keW8yUWRw?= =?utf-8?B?UGlSbjEzNmhrSDhRRWJhOGFmQ2hqZDlVQ3Z1ZnY3OC9NaXlNTkxEZURLdzdM?= =?utf-8?B?TjJYRGpabi91WGFzSXdiZXNzTHFDM1YyU0EvaEc5cFVzblY2UnhSNDR2VUJS?= =?utf-8?B?SEgzdG12REU4eXlFZHpMRzl3RjNnTzUxU0FhWUIxZTZkWlVRVmlIMm1QZ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1BYL0pianhYWjlSRE83NWcrNllNZEhHNEpwTGFJbEMv?= =?utf-8?B?cWh3QUlwaTl5MHF5bW1XaHNPQzNsbGZyakplR3RZc1gySXZtaktwR3ZmeWI0?= =?utf-8?Q?MB8wT4uhrJZCom5xcR+SDgDiN?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ace754d2-23df-4d54-17a7-08db0372a2d3 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2023 10:05:09.8142 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LrbOtEPQqyTXF77KTLIzrbrEqcd/RASBL2YdtEQVBlCJeUTPiPUuFagTOm10HzUV X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5352 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 1/31/2023 1:51 AM, Joshua Washington wrote: > Hello, > > I tested it out, and the updates to testpmd seem to work. > Hi Joshua, Thanks for testing, I will send a patch soon. But this was testpmd issue, do you have any objection with the net/gve patch, if not can you please record this with ack/review/tested-by tags, so I can proceed with it. > Before applying the second patch: >   ---------------------- Forward statistics for port 0 >  ---------------------- >   RX-packets: 0              RX-dropped: 0             RX-total: 0 >   TX-packets: 43769238       TX-dropped: 62634         TX-total: 43831872 >   > ---------------------------------------------------------------------------- > >   ---------------------- Forward statistics for port 1 >  ---------------------- >   RX-packets: 0              RX-dropped: 0             RX-total: 0 >   TX-packets: 43761119       TX-dropped: 70753         TX-total: 43831872 >   > ---------------------------------------------------------------------------- > >   +++++++++++++++ Accumulated forward statistics for all > ports+++++++++++++++ >   RX-packets: 0              RX-dropped: 0             RX-total: 0 >   TX-packets: 87530357       TX-dropped: 157302        TX-total: 87687659 >   > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > 62634 + 70753 = 133387 != 157302 > > After applying the second patch: >   ---------------------- Forward statistics for port 0 >  ---------------------- >   RX-packets: 0              RX-dropped: 0             RX-total: 0 >   TX-packets: 12590721       TX-dropped: 36638         TX-total: 12627359 >   > ---------------------------------------------------------------------------- > >   ---------------------- Forward statistics for port 1 >  ---------------------- >   RX-packets: 0              RX-dropped: 0             RX-total: 0 >   TX-packets: 12596255       TX-dropped: 31746         TX-total: 12628001 >   > ---------------------------------------------------------------------------- > >   +++++++++++++++ Accumulated forward statistics for all > ports+++++++++++++++ >   RX-packets: 0              RX-dropped: 0             RX-total: 0 >   TX-packets: 25186976       TX-dropped: 68384         TX-total: 25255360 >   > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > Thanks, > Josh > > On Wed, Jan 18, 2023 at 8:22 AM Ferruh Yigit > wrote: > > On 12/19/2022 7:38 PM, Joshua Washington wrote: > > Hello, > > > > As it turns out, this error actually propagates to the "total" > stats as > > well, which I assume is just calculated by adding TX-packets and > > TX-dropped. Here are the full stats from the example that Rushil > mentioned: > > > >   ---------------------- Forward statistics for port 0 > >  ---------------------- > >   RX-packets: 2453802        RX-dropped: 0             RX-total: > 2453802 > >   TX-packets: 34266881       TX-dropped: 447034        TX-total: > 34713915 > >   > > > ---------------------------------------------------------------------------- > > > >   ---------------------- Forward statistics for port 1 > >  ---------------------- > >   RX-packets: 34713915       RX-dropped: 0             RX-total: > 34713915 > >   TX-packets: 2453802        TX-dropped: 0             TX-total: > 2453802 > >   > > > ---------------------------------------------------------------------------- > > > >   +++++++++++++++ Accumulated forward statistics for all > > ports+++++++++++++++ > >   RX-packets: 37167717       RX-dropped: 0             RX-total: > 37167717 > >   TX-packets: 36720683       TX-dropped: 807630        TX-total: > 37528313 > >   > > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > > > It can be seen that the stats for the individual ports are consistent, > > but the TX-total and TX-dropped are not consistent with the stats for > > the individual ports, as I believe that the TX-total and RX-total > > accumulated stats should be equal. > > > > Hi Joshua, Rushil, > > As I checked for it, issue may be related to testpmd stats display, > > While displaying per port TX-dropped value, it only takes > 'ports_stats[pt_id].tx_dropped' into account, > but for accumulated TX-dropped results it takes both > 'ports_stats[pt_id].tx_dropped' & 'stats.oerrors' into account. > > If you can reproduce it easily, can you please test with following > change: > >  diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c >  index 134d79a55547..49322d07d7d6 100644 >  --- a/app/test-pmd/testpmd.c >  +++ b/app/test-pmd/testpmd.c >  @@ -2056,6 +2056,8 @@ fwd_stats_display(void) >                          fwd_cycles += fs->core_cycles; >          } >          for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) { >  +               uint64_t tx_dropped = 0; >  + >                  pt_id = fwd_ports_ids[i]; >                  port = &ports[pt_id]; > >  @@ -2077,8 +2079,9 @@ fwd_stats_display(void) >                  total_recv += stats.ipackets; >                  total_xmit += stats.opackets; >                  total_rx_dropped += stats.imissed; >  -               total_tx_dropped += ports_stats[pt_id].tx_dropped; >  -               total_tx_dropped += stats.oerrors; >  +               tx_dropped += ports_stats[pt_id].tx_dropped; >  +               tx_dropped += stats.oerrors; >  +               total_tx_dropped += tx_dropped; >                  total_rx_nombuf  += stats.rx_nombuf; > >                  printf("\n  %s Forward statistics for port %-2d %s\n", >  @@ -2105,8 +2108,8 @@ fwd_stats_display(void) > >                  printf("  TX-packets: %-14"PRIu64" TX-dropped: > %-14"PRIu64 >                         "TX-total: %-"PRIu64"\n", >  -                      stats.opackets, ports_stats[pt_id].tx_dropped, >  -                      stats.opackets + ports_stats[pt_id].tx_dropped); >  +                      stats.opackets, tx_dropped, >  +                      stats.opackets + tx_dropped); > >                  if (record_burst_stats) { >                          if (ports_stats[pt_id].rx_stream) > > > > > > On Mon, Dec 19, 2022 at 11:17 AM Rushil Gupta > > >> wrote: > > > >     Hi all > >     Josh just found out some inconsistencies in the Tx/Rx > statistics sum > >     for all ports. Not sure if we can screenshot here but it goes like > >     this: > >     Tx-dropped for port0: 447034 > >     Tx-dropped for port1: 0 > >     Accumulated forward statistics for all ports: 807630 > > > >     Please note that this issue is only with Tx-dropped (not > >     Tx-packets/Tx-total). > > > > > >     On Wed, Dec 7, 2022 at 8:39 AM Stephen Hemminger > >      > >> wrote: > >     > > >     > On Wed, 7 Dec 2022 15:09:08 +0000 > >     > Ferruh Yigit >> > >     wrote: > >     > > >     > > On 11/24/2022 7:33 AM, Junfeng Guo wrote: > >     > > > Add support for dev_ops of stats_get and stats_reset. > >     > > > > >     > > > Queue stats update will be moved into xstat [1], but the > basic > >     stats > >     > > > items may still be required. So we just keep the remaining > >     ones and > >     > > > will implement the queue stats via xstats in the coming > release. > >     > > > > >     > > > [1] > >     > > > https://elixir.bootlin.com/dpdk/v22.07/ > > >      > \ > >     > > >     source/doc/guides/rel_notes/deprecation.rst#L118 > >     > > > > >     > > > Signed-off-by: Xiaoyun Li > >     >> > >     > > > Signed-off-by: Junfeng Guo > >     >> > >     > > > >     > > <...> > >     > > > >     > > > +static int > >     > > > +gve_dev_stats_get(struct rte_eth_dev *dev, struct > >     rte_eth_stats *stats) > >     > > > +{ > >     > > > +   uint16_t i; > >     > > > + > >     > > > +   for (i = 0; i < dev->data->nb_tx_queues; i++) { > >     > > > +           struct gve_tx_queue *txq = > dev->data->tx_queues[i]; > >     > > > +           if (txq == NULL) > >     > > > +                   continue; > >     > > > + > >     > > > +           stats->opackets += txq->packets; > >     > > > +           stats->obytes += txq->bytes; > >     > > > +           stats->oerrors += txq->errors; > >     > > > >     > > Hi Junfeng, Qi, Jingjing, Beilei, > >     > > > >     > > Above logic looks wrong to me, did you test it? > >     > > > >     > > If the 'gve_dev_stats_get()' called multiple times (without > >     stats reset > >     > > in between), same values will be keep added to stats. > >     > > Some hw based implementations does this, because reading > from stats > >     > > registers automatically reset those registers but this > shouldn't > >     be case > >     > > for this driver. > >     > > > >     > > I expect it to be something like: > >     > > > >     > > local_stats = 0 > >     > > foreach queue > >     > >       local_stats += queue->stats > >     > > stats = local_stats > >     > > >     > The zero of local_stats is unnecessary. > >     > The only caller of the PMD stats_get is rte_ethdev_stats_get > >     > and it zeros the stats structure before calling the PMD. > >     > > >     > > >     > int > >     > rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats) > >     > { > >     >         struct rte_eth_dev *dev; > >     > > >     >         RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > >     >         dev = &rte_eth_devices[port_id]; > >     > > >     >         memset(stats, 0, sizeof(*stats)); > >     > ... > >     >         stats->rx_nombuf = dev->data->rx_mbuf_alloc_failed; > >     >         return eth_err(port_id, (*dev->dev_ops->stats_get)(dev, > >     stats)); > >     > > >     > If any PMD has extra memset in their stats get that could be > removed. > > > > > > > > -- > > > > Joshua Washington | Software Engineer | joshwash@google.com > > > > | (414) > 366-4423 > >   > > > > -- > > Joshua Washington | Software Engineer | joshwash@google.com >  | (414) 366-4423 >