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 695C0A00C2; Thu, 24 Nov 2022 18:26:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5270B42DD3; Thu, 24 Nov 2022 18:26:51 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id DFA034113C for ; Thu, 24 Nov 2022 18:26:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NX8FrE4coU6PJoqW2+RJ99PE1+78X0W0qGegivBrIALwG9VrGVcLzPntXil268p4CqkCiVVMti1kcq0jwAQnn2ofYdbrKjGTbGB2NFTLUaVvItgz7ZRfy9/ObCkOsC84vp91d93HnovL10FWT93lP/uB5lzNzyxV2HcZLJlguxtTCVt4vU8hDJNszsFv0hV+HugJoYEm91zCuDQhb7Lb+tBtCvNmnaCsNIbNuiI93PeQR/B7vbw6jcXjYWjYNKCpGC0LhT7PP/f1P05dMQ4XubqU3oALRcxaB6r3xxhSTvWm5iaT1I1ZJXmlWqeuoknps0IaEp9hz/uu2T0gD65KHQ== 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=Av8n3VITrunUfKDXRc182LZFOHVNDzexIyypW6jwQKI=; b=Sk7WsfFiRiK+f4dxuBFhSlboNZZ+t7wx4wDya7LMVr/ONPZ4ODgZuGocS4u/pWkFixhbkp0wiICSCDjUP2f9rELq+VSo/o2XbHTVdGTIFE1SukoHPvSwxWve6yEUw2Dvgqh5V2A0Ji58HFWLEp38wrJGsY242Iy0tOkYoC9rSEfsv9h9xDfwRwBopN472Nl2q+6toKn/YLmAjEttnACwkSKaoU9qr8r67CB/M/cYV+46QR/vXDcq1TovBfE9nO1nvoikwXXm3AAUV6o9Z4140oO71aTXCx8OGK35W02kF6vBouLchYAir5foXPLuXwgvywU1s9XZuEL4o7CpRMYnLQ== 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=Av8n3VITrunUfKDXRc182LZFOHVNDzexIyypW6jwQKI=; b=x0njPTPpWdmqD/5Ys2GYzFqB0g2b9UYQUH10Dp5rD6xILKgbWCfZ/IANB349Ic7wQM5UGsfaEJRP7Lo6owYaD/4MEuAqaYpyMeO7rsGeovugd6ZJlRezUGZ+l6siwwWFWX4mI53jd5c1TQCXx1X6CNfuSSZS+kxq2dOeBj+OLSw= 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 CH0PR12MB5235.namprd12.prod.outlook.com (2603:10b6:610:d2::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19; Thu, 24 Nov 2022 17:26:07 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::b482:d5bd:c7d0:3842]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::b482:d5bd:c7d0:3842%8]) with mapi id 15.20.5857.019; Thu, 24 Nov 2022 17:26:07 +0000 Message-ID: <12af66b4-0715-a0f0-a401-664632189e80@amd.com> Date: Thu, 24 Nov 2022 17:26:01 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH] net/gve: add support for basic stats Content-Language: en-US To: Stephen Hemminger , Junfeng Guo Cc: qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, dev@dpdk.org, jeroendb@google.com, rushilg@google.com, jrkim@google.com, Xiaoyun Li References: <20221124073335.3985214-1-junfeng.guo@intel.com> <20221124085926.46430390@hermes.local> From: Ferruh Yigit In-Reply-To: <20221124085926.46430390@hermes.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0233.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:315::19) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH0PR12MB5235:EE_ X-MS-Office365-Filtering-Correlation-Id: ad704c45-b075-4e3e-6150-08dace40f8ac X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UMw+ipioJQuy6fCRcYcnAVJZ1sK7NOLdvFGzebThbOcsEtMg1RRh0kE5myHyVbAEB2KGq7QYNFgJJ3ouL0RTGn78G8aRTKvM8BCP/EOxrRv5fD0ww/n4m8z0PQFaTXCtLree/1pI81gb4mmLafSDUZgpJGfourEBfRZWSav2Awd3wx1n8HWQXAYwjd35DTHYoW88phBOPCnKbVROoQbtdkPqRm83+ktajop5LNFQFWSp3fYIrZDpnsBj273iOsDEssb/YMw/TbYM4+08gsSpndLMzGUTDmWa9IdFQ55zVO+WYt7sPezK0DA8ldzLl2sYt0DQ1LihnbCvdyml5y7p3t/7qJ1j4Avf+Rv2yYYe3u1TNrgV2kr2vsGYC+rxaqA09oSl37d4Tm/s0HcxBC3ceZwyKNdXzoJZ5FglXQcK3S8R+EggzhZzjzrZ9dI2U1Qan6QlDqKXtzA/8y2Z0GtxqjmqReY4ypigqRkp5IxTJPIac/ow3JTNRy3dQivhDr/uWAThHfQwYakIK3ajCj6FkE9sUK+tAd+qwo+YsrtVOFkWx26nDZ1BWZLSwSF77QwcY3GhSmPru0/Z65yYB0n68EoQF0g6qtIqN1veUTNRu4oFmR7oqUByb9ipAITF3KHa3lCzZVy8FzvGnYVuPpzjRTR6FpWFIaYum4xqRKGzJ00s3ZbJB/s57FiTMZ/72vOpAIE9Bvp16QHTRju20rMlmAhqc/t5pd2x6mHeUl3SRaU= 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:(13230022)(4636009)(366004)(451199015)(36756003)(31696002)(86362001)(6486002)(6666004)(110136005)(6506007)(26005)(498600001)(53546011)(6512007)(44832011)(5660300002)(66476007)(8936002)(4326008)(66556008)(8676002)(2906002)(7416002)(66946007)(38100700002)(186003)(2616005)(83380400001)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?T3BXejNjNWJYN0c1bnl3R1MvK2NDaGRqUiszRkR3MUFGS0RKTEcxSnpjMG1h?= =?utf-8?B?RitWNVBlSWlvZEVHa09ZUllGUityVSttUzlJVyt3M3BNM2NPU0s3M09jV2dz?= =?utf-8?B?RUQxOGgyTzkvY3FPYnVLT0crYnJqeTgrTkhxa1VOVTZRWE8rNUFsVldhTjNm?= =?utf-8?B?VTU3cUc5OXZEdUZoYStUUktSYjhWa1hyUzJld0s0M3lRb3BrRTFseXdxRThG?= =?utf-8?B?NVZrMGpWVXd6eUxXQ2FHbEk3NHlXM2oyL3JyWmhzZ2tKMEMybHhLc3ZueS84?= =?utf-8?B?bTJCVWpxUzZOdmZLTkRn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?= =?utf-8?Q?8QAFqQRX2eCTc7fNpPs4TwaaI?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad704c45-b075-4e3e-6150-08dace40f8ac X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2022 17:26:07.3183 (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: F9se6SAS3g4jdu+/P+ER2Xf1LO8AOfvyXVwdAlo4pLj0dJaAojDTtMrSQeg2SNpe X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5235 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 11/24/2022 4:59 PM, Stephen Hemminger wrote: > On Thu, 24 Nov 2022 15:33:35 +0800 > Junfeng Guo wrote: > >> +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; >> + } >> + >> + for (i = 0; i < dev->data->nb_rx_queues; i++) { >> + struct gve_rx_queue *rxq = dev->data->rx_queues[i]; >> + if (rxq == NULL) >> + continue; >> + >> + stats->ipackets += rxq->packets; >> + stats->ibytes += rxq->bytes; >> + stats->ierrors += rxq->errors; >> + stats->rx_nombuf += rxq->no_mbufs; >> + } >> + >> + return 0; >> +} >> + > > The driver should be filling in the per-queue stats as well. > q_ipackets, q_opackets, q_ibytes, q_obytes, q_errors Hi Stephen, Queue stats moved to xstats, and there is a long term goal to move all queue stats from basic stats to xstats for all PMDs, and remove interim 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' flag. That is why request to new PMDs is to not introduce queue stats in basic stats, but in xstats.