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 B1620A04FF; Tue, 3 May 2022 21:55:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5A22E40C35; Tue, 3 May 2022 21:55:41 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2045.outbound.protection.outlook.com [40.107.220.45]) by mails.dpdk.org (Postfix) with ESMTP id 3DB1240691; Tue, 3 May 2022 21:55:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WXdf9kn6h6CKR8RFRrWqe6GpjGEoDcDtULp7m1ZXQ/Y5F73iz42qLLaJf/gXywLLVdqOFssvz1c2YeALhMb1Oq/mJMAlM8GaXKat69CteRSntcyHZJlFyJEv9FowKYeJrj7fjKU29k/t9NVDYDAe+QZ6zFrT76VslAu3C1xZPBQxaFcMSfBNSNpPYI4gj/K0Btg0Luuwp+oseL1ddCf7eLmHFFqPXzHLUbYdxVGll5P5JBt01tXIDZbz9xlqprauac+oo8RcTiHEipzsUbZvQciLM2FvVd68Q8hYQoUeUC6ZmFbd0oUQdXCFDIFQ08HCWu36H7Xd8Zlebm5XoAsH1g== 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=SYfeQV3GeE0FoCmpjowsc7aLwY54sGI8dapqudZ8Gfo=; b=cie0UQyJXh2x0kK5i1VoFPljQykR8yuNaj9FSoewiIlv7t3v3bh5l2HYTurJ+BT48G1hDPCT0owfxomHC92R0YbdpSVAV1EAMsXe4kTG5GfNCawl0q41WQQJ6CS6Muv0Lypd/i5hJKIqOVSwC4tXSo+84gZY2fsN7WSTo7QbFcHaID4W0cQuvJovBoApdE1J0oh897dC3ni1DH5LWPsM22jLHNQygKy5/vELhsfS7b8JuwV59SJ2hQb8TriKE0wsW6ORTf2F8UVt61EZmpFuNgDvm6ktktiSFApIvsxE24+PPhupPaD2cHtlFWMwKFLRVrPdo32R+73c+mcTq7CPVA== 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=SYfeQV3GeE0FoCmpjowsc7aLwY54sGI8dapqudZ8Gfo=; b=g0CHUks3fttbSZxWdgWycx8XxMbSfr/UrIkz7mwbiKb2jcNee+rJVdUkiMEUBkufaV5JrHP6xOb3mS/0odYBktcgy9oJl3ifFJNefFLhOUBosIubiX6FbHiOSb11hs1UFNon+CXbk+6xTwM05iYP2Mp8VC81L5xRZ7jkEuOkHfU= Received: from SA0PR11CA0141.namprd11.prod.outlook.com (2603:10b6:806:131::26) by DM6PR02MB5388.namprd02.prod.outlook.com (2603:10b6:5:7a::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.13; Tue, 3 May 2022 19:55:35 +0000 Received: from SN1NAM02FT0061.eop-nam02.prod.protection.outlook.com (2603:10b6:806:131:cafe::4a) by SA0PR11CA0141.outlook.office365.com (2603:10b6:806:131::26) 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:55:35 +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 SN1NAM02FT0061.mail.protection.outlook.com (10.97.4.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5206.12 via Frontend Transport; Tue, 3 May 2022 19:55:34 +0000 Received: from xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) 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:55:33 +0100 Received: from smtp.xilinx.com (172.21.105.197) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Tue, 3 May 2022 20:55:33 +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.116.8] (port=54675) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1nlycP-0007fO-HS; Tue, 03 May 2022 20:55:33 +0100 Message-ID: <04de7df6-3d4a-21e5-7be5-15f2ef88be16@xilinx.com> Date: Tue, 3 May 2022 20:55:32 +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> <924d7398-6c78-6318-52f3-d671edfc8aad@xilinx.com> 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: 7b0918cd-b1a0-4b95-3e80-08da2d3ee351 X-MS-TrafficTypeDiagnostic: DM6PR02MB5388: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: 9XnDp/s6F6j3vFvhc4Be1F3nAYLXU1dIZ9HP0BYYkkt8/16OmmFOMQwCbjcVjipkiHg41p/7R0WJvZMQFBD0tb/23K+aUXT+9XQqsC2KPdkYFcLeo/4GGxkE957uES1ov9T3UWqn3R6CooufNZJRIi5DfqEg1iDqAuVT7Z+hDtcCSTv07zayS0j19XT86Y5tLtnqtBednI78HtOHM/hYmzs1jNVvIlFWx/6MqdSUYT1RBvR/3QwE1CNRYRx6w9wunSyXfQZ+lkfFwxQrDqpEcFHbZJxDnGFFPnvGpZi/vWCcP9KvI3jiKLCNXCn3kiRKmQq0xTy67MaW5qd5cTZ94EEzAg103xhMhAJ+cGaBQGXw7/LkM74kOdlPge9LkhONqcBp0N2RJgdcPBdUbqVXOgnmJ3YDbVwSGAtwzvW6gbqiGU6RhzZTzSTlX6IbOwXpmJ3BgRSKGdsZys0iT1JoWJGG4b/ciJFvNUTa8HJ4mOjOxh0kumI0vDlI2qrwFwCCaPA8yNjbCSjCd9XMSpLQtAtjSpnGDdid+s2ypI5vIMIAUIOUFV6EmKjcENjiwwyJMiUvoB28FGc95GtTOj9Vb7wiyQ6z+ZalghQjW5A7D3Bj23t7N6f+9asEedeQ9NKLa/krqvY3kN5bbXDNBSFbjc2Y1jezl47CKsOnm3Mki/MIPsuH1KK3dY79HCGKJ3k1gedbeBtXLWowt/pxfGlj34FB1hwOs/GnKQv++Lawe3U= 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)(40470700004)(46966006)(36840700001)(44832011)(186003)(5660300002)(36756003)(316002)(2906002)(70206006)(36860700001)(9786002)(4326008)(8676002)(83380400001)(8936002)(70586007)(54906003)(110136005)(31686004)(336012)(2616005)(426003)(31696002)(40460700003)(508600001)(82310400005)(356005)(7636003)(26005)(53546011)(47076005)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2022 19:55:34.8665 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b0918cd-b1a0-4b95-3e80-08da2d3ee351 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: SN1NAM02FT0061.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB5388 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 8:14 PM, Long Li wrote: >> Subject: Re: [Patch v2] net/netvsc: report correct stats values >> >> 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? > > Yes, hn_vf_stats_get() fills in the stats from the slave PMD. txq->stats values are from the master PMD. Those values are different and accounted separated from the values from the slave PMD. I see, since this is a little different than what most of the PMDs do, can you please put a little more info to the commit log? Or perhaps can add some comments to the code. And still 'stats->rx_nombuf' change is not required right? If so can you remove it in the next version?