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 84492459D8; Thu, 19 Sep 2024 21:04:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 71302433D6; Thu, 19 Sep 2024 21:04:22 +0200 (CEST) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id A0944433D2 for ; Thu, 19 Sep 2024 21:04:20 +0200 (CEST) Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-2d87176316eso1787782a91.0 for ; Thu, 19 Sep 2024 12:04:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1726772660; x=1727377460; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=wbUdeoXkPw2jhgv53AdPhiLZ+mQW6DSAPvMxQAfHYqg=; b=2mpmomMCxQRxRXxjdOzPLAk7pXfM1hdYbhZjKvnj3Jz+TSwTFnL5xag3lbSPUCLLXY qHAf7IaS+WtI8WkgVJSCp/W5rJAR0XaXUzppuD3piB6Kw+o2GLpCz9cOTd4PcQt2LtH6 k0DJxDLPznyp3E+AdTdodIYph59B1a7Bu4Vw4E5yoEc9KcwyBbwA1hS8YJ+KGiypUah2 fL4fHO+i1VZQ9aH2pd7b9REQMmQPrIwLskLXb0nd3G7Q0bau/GiAdAJPTj0l5VJQ6JX2 trRrwQvCi/2RNwNoNvAk1amQj2oV/pcEUJPobkfmRzXVTglkemGYFCc5FG5yehyKZedq XM5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726772660; x=1727377460; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wbUdeoXkPw2jhgv53AdPhiLZ+mQW6DSAPvMxQAfHYqg=; b=scKfLR3L6R1kTUyj9BrZYnRhI7Y7/KAgBlG0ToQMEVKqTfZkGNSH/MqqD12WJWS/QN PwfngTXxTloXrwaD2PDCOnVzRcQJnOyXGpATUGUcHIKD1P3x/3JTAveRWRrpV+TiW/ZW F+60Nx0FOv+9+YDBXYne1J3P4sDr3RqeVQ1qWSFCB3aafyLRhrjAXCCpuA3XBFrFW7mC 7KEORl76VHohipas3l6Rc5t+doUhqvIs/lktJfTq9J24Wf6V/FlJwcYO4H2YPIuutwyG 7X6mdnTg/wdHhrknz2zbiYAPuw+mAa/a+jrBeyFCNTgsGXYSgstmoootZ2Kom85H/+bL NM9Q== X-Gm-Message-State: AOJu0YwTt295mtbAYsMv1fbjSAHG1dOMurM/BXw2ACn6LU7uAfIy3cyb ynuJ8VC46oIrH19pg97b1m5bd93bQREso3ft7nHrS4FPtHbvTjdjeyssCI5HtS68nCiw2cMiW4k 4 X-Google-Smtp-Source: AGHT+IG40xHg3tzib8X6E73Hd8y683ZEGtucJErRRtTYrs8dCnloJLV4/+km78O56Yun2IweGrCKAw== X-Received: by 2002:a17:90a:300c:b0:2da:6e46:ad48 with SMTP id 98e67ed59e1d1-2dd7ece1056mr970503a91.1.1726772659620; Thu, 19 Sep 2024 12:04:19 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dd6ef93b3asm2297560a91.54.2024.09.19.12.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2024 12:04:19 -0700 (PDT) Date: Thu, 19 Sep 2024 12:04:17 -0700 From: Stephen Hemminger To: "WanRenyong" Cc: , Subject: Re: [PATCH v3 19/19] net/xsc: add dev basic stats ops Message-ID: <20240919120417.3eb8cfa9@hermes.local> In-Reply-To: <20240918060936.1231758-20-wanry@yunsilicon.com> References: <20240918060936.1231758-20-wanry@yunsilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Wed, 18 Sep 2024 14:09:36 +0800 "WanRenyong" wrote: > > +static int > +xsc_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) > +{ > + struct xsc_ethdev_priv *priv = TO_XSC_ETHDEV_PRIV(dev); > + uint32_t rxqs_n = priv->num_rq; > + uint32_t txqs_n = priv->num_sq; > + uint32_t i, idx; > + struct xsc_rxq_data *rxq; > + struct xsc_txq_data *txq; > + > + memset(stats, 0, sizeof(struct rte_eth_stats)); Memset here is unnecessary already done in ethdev.