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 335BCA00BE; Tue, 3 May 2022 21:04:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF98340C35; Tue, 3 May 2022 21:04:00 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2040.outbound.protection.outlook.com [40.107.220.40]) by mails.dpdk.org (Postfix) with ESMTP id 06C3140691; Tue, 3 May 2022 21:03:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KgMF1wsoHqLlnSf//xVmZWYnma/Q0IGb0lqFls44rGUH0REsgMo4qCyIJTHool7uzR+tOnS5hJc+2dUPpRgzAkrEb1GLyjqr5K4Ao8Ge7vmaVfEnaELufQ0kdbjacztqehrXjK3Ns1Gd2cX3TdYkQm6BTe3uDUV1N7T1zhaiIX33v1RJJoAcb2rDFDvpDv6+gSGlZoSALMC0KO6ZNtYFryadlfWpgFkSXN+jIG6Arm08Aj2XdXThwVG+6dmXhfJxJ8PR+hIGoAXMKqDvn51IzPZ4fd8hKkxLU7Y/TJogopSePjZH3GNgJpgUBSHg72pc2qdtJtLXPSwwJTuBJjUY2w== 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=ZOgiAS3oBYVAXguEEMPnrcC83PLyPYzvvtP5M5047kE=; b=XhkyFeuwP5pctxCbMd+8Q7X+JEBvYLyqtK8U0kLccvdNnZsb01REIfx2DmJgQs9Gcm9gOSerXLT+kT1f85ZBEVKbjrFivSWtF54T80NceSoRywxuzRTiNA7Ny9YGm72dEPHUVyrX+nuFja7b/R8cH7qDBg0spyTI7UmiIW2S47RsD7UwZBD0V0M1IJtkdmOevuaAAdItCLDQ0fprSKy4Wd6yLxM/wooy5N50yq2tolVXU4Oo8F+gh8LFMMdvQL6ZdJcQvt118ynd4VzanzPcWmygvtUUPjeRl7vAdm2s5hmaLNzhgK14V8cYo/FDcsh0H87K7/HrDltbUvAMICwNwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=microsoft.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZOgiAS3oBYVAXguEEMPnrcC83PLyPYzvvtP5M5047kE=; b=HYoIFle5k9Xcl+w2RU5COFEkvBtqpdXHWORzL7vX4EoFG9kUBm/u+1p2DpA9V7iCEjuWGwe3amNHyRROE88aH+UUeFCvn0O7IDceIsCGjAbId+FDcFJfWmI6a/XtYyIPrXTchgrPLOSPmVH0dOUVp2CoMtbEzIaD3E5BJmmjjwE= Received: from BN9PR03CA0620.namprd03.prod.outlook.com (2603:10b6:408:106::25) by DM5PR02MB2268.namprd02.prod.outlook.com (2603:10b6:3:51::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Tue, 3 May 2022 19:03:57 +0000 Received: from BN1NAM02FT050.eop-nam02.prod.protection.outlook.com (2603:10b6:408:106:cafe::25) by BN9PR03CA0620.outlook.office365.com (2603:10b6:408:106::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.24 via Frontend Transport; Tue, 3 May 2022 19:03:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch01.xlnx.xilinx.com; Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by BN1NAM02FT050.mail.protection.outlook.com (10.13.2.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5227.15 via Frontend Transport; Tue, 3 May 2022 19:03:57 +0000 Received: from xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Tue, 3 May 2022 20:03:56 +0100 Received: from smtp.xilinx.com (172.21.105.197) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Tue, 3 May 2022 20:03:56 +0100 Envelope-to: longli@microsoft.com, stephen@networkplumber.org, longli@linuxonhyperv.com, dev@dpdk.org, sthemmin@microsoft.com, stable@dpdk.org Received: from [10.71.119.91] (port=53413) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1nlxoS-0005ZY-3r; Tue, 03 May 2022 20:03:56 +0100 Message-ID: <924d7398-6c78-6318-52f3-d671edfc8aad@xilinx.com> Date: Tue, 3 May 2022 20:03:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [Patch v2] net/netvsc: report correct stats values Content-Language: en-US To: Long Li , Stephen Hemminger CC: "longli@linuxonhyperv.com" , "dev@dpdk.org" , Stephen Hemminger , "stable@dpdk.org" References: <1648143948-17821-1-git-send-email-longli@linuxonhyperv.com> <7f51e773-6ded-b736-fb02-5e3b391353b9@xilinx.com> <20220426154524.49502217@hermes.local> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c16c5980-b6a7-46ed-8d09-08da2d37ad16 X-MS-TrafficTypeDiagnostic: DM5PR02MB2268:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BK9HpSVNLNrARUVxH4rprsZH9fJv7CHFaJ4+d/cOmxtLDxVFcxjfonblN78AsOB5BSByZLyXXgVX634K+QHgVtulR4LaOs5e2L+Groi4JPxq/P5NJZqJfqpUFvlJzto8fzYaKyaQt89MqERHBdFb9Ut50pYodDEPbedwTuEUU9Ix9QxSodo4Ysznu/NQs8tzF2rL/UWwhnsqW6/7RkbGEhTZvGl+SgX5K4UC2Yj1FOLis9fpl8HD6Q+uJAtxFMscBKD6+ff/vu5HjcpcJA1QgmVmlmojYzrlPyY2b1N4oSMT0733uWQW/X9N97B+Ms6LHrEc3p5zS/3nv73VCIspyIIREvvEFpT7kiI91QnGYsxJ1hAaVOL0iJiqXR78snFjS1PrUnhYdRDQ3hLh5/RvrIKb7oMDXTyrtp+kaA6cDP5IqmPpIvMYxtOSk4SAnYxPtmqM7LiO7OYgURK6PudaUoOWizrU9cLo+qJFFZVfipkITiCbQWFVdMLCgtnzWl7XdOCUUimmsCpQjXwIot7nm57ngST93al7jkli14PqFKG7PBpI6FMyHTqXqu2FKxR0ZMT7bDsRc4wF8els2wzL467sMgIGcy770jLFRPwA5tZk+LbSOasOGRBh8SDKfn/+g5wZSR2/YG8MrZGg0jj0ntBbNfV3lbUA68k1+LxYdVYfGs/KVNpvr+MQXxNikekFEBeBdQ7KScDIf4wz9C2x7TnPsIcgGZGWF0wjD8aGifM= X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(54906003)(53546011)(31696002)(5660300002)(4326008)(2616005)(336012)(426003)(36756003)(186003)(316002)(70206006)(356005)(70586007)(7636003)(9786002)(8676002)(47076005)(44832011)(82310400005)(508600001)(2906002)(36860700001)(8936002)(31686004)(110136005)(26005)(40460700003)(83380400001)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2022 19:03:57.5015 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c16c5980-b6a7-46ed-8d09-08da2d37ad16 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT050.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB2268 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 5/3/2022 7:18 PM, Long Li wrote: >> Subject: Re: [Patch v2] net/netvsc: report correct stats values >> >> On Tue, 26 Apr 2022 22:56:14 +0100 >> Ferruh Yigit wrote: >> >>>> if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) { >>>> - stats->q_opackets[i] = txq->stats.packets; >>>> - stats->q_obytes[i] = txq->stats.bytes; >>>> + stats->q_opackets[i] += txq->stats.packets; >>>> + stats->q_obytes[i] += txq->stats.bytes; >>> >>> This is per queue stats, 'stats->q_opackets[i]', in next iteration of >>> the loop, 'i' will be increased and 'txq' will be updated, so as far >>> as I can see the above change has no affect. >> >> Agree, that is why it was just assignment originally. > > The condition here is a little different. NETVSC is a master device with another PMD running as a slave. When reporting stats values, it needs to add the values from the slave PMD. The original code just overwrites the values from its slave PMD. Where the initial values are coming from, 'hn_vf_stats_get()'? If 'hn_vf_stats_get()' fills the stats, what are the values kept in 'txq->stats.*' in above updated loop?