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 29CDE45E33; Wed, 4 Dec 2024 23:19:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17EC7410D4; Wed, 4 Dec 2024 23:19:47 +0100 (CET) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id 441684029B for ; Wed, 4 Dec 2024 23:19:45 +0100 (CET) Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-2ee86a1a92dso227171a91.1 for ; Wed, 04 Dec 2024 14:19:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1733350784; x=1733955584; 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=IbWV1bVJwYjpw1tPnWugesVgBYeKCSLl1KqRuv8ICIs=; b=x00jZExsqKYnIyaU0Lv2Gh2AMIi1ZAndcnxCToWzqbe6dZGp3gzCPuSqTnLdpx2StE 87wrd+RfJ8phOtSGyK4uPtEotoCpO28fsmDqbMlvZwJS6f2C5pTx+es88QcVS3Y8Tg4b 2jSPQZYdRxY7nW/jQYlaE2lbfqOi1U8iMsNHngvT0fcAMDe8AQ2mJtN4yZU/LzRb04jy fnspvOy8umnLjgc4bVt7SR0j4sEZPaeCIQI4QE8cMikx51Y9kuuu3+zXEhZ+P/IfucEV 5mNGA7qF9nqE3mithrSO8KtpoMbrGUCn5+D6fYmgKHK2h6O/OIRhO7YkhEW+jQQV4HS/ KCoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733350784; x=1733955584; 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=IbWV1bVJwYjpw1tPnWugesVgBYeKCSLl1KqRuv8ICIs=; b=g8qxjWVwDD+QY6QlWR5be84t4XvxRzRIY/bM+OuOG7Fa+iwgn5qRq8RwAl4VnPaL1r Zf8w4rmRTBf5vmsnxu4l1K1Ri/COhgoQKcBTQVc0os0hiTaoQtvrwpLLc1VAlBerXrbm qC+LMWojyQVDfhnIcVX7ElRyqfQ6MJqhGl47HDmlsrAmSfZsUOuVNoedicZXVwV3BXO/ dp+O6GDYteKzdK/nVnkpCnQdI55hzewf5wnEdz5OnmOZ1Wl0uOU3CTAVdZ01WGhBNtir f/wf+pqA6qwQ53xJXTqYxTzInGxO8TlOK2rt2DqZ+qaxyX8Pl16ExrAY3KUnBbLRBpXw QEHw== X-Gm-Message-State: AOJu0Yyp4AqENee0DxPkmzrpgBqTXP+/BSZoUSQAj/f3knZov1Q6x0WJ zER5YrQekg4IkUk1Z7VJjg1QLSGPVd/YTG8nUR/DKLzDOZlmkaNG8RzCqTEGMSShF2//M2ffN/E 0 X-Gm-Gg: ASbGnctEVDXZKaioAjw0GCB/7IHFNHO3VUhz7aZ5DzyDwtJZzEtrxeQYd3/CJGoMpyF Pt3F1Lj7fqXEWkTgznQSfIH+gLb7FyCRwV2/FSdVrgPWk13Is/pgYmjDqrk0qClkU5JQjYn1Wcy MVkAIq3PVifZoyjUgj/G1tb+otvi5brcx6wbIgoYMbbLAWBloWGRYgxAkGXea5NlMscPYp9vDJs lS5lIqoSKW54f85QZroHqLi9EtEiRKwNsYApnbhHCNx/zWfYC68syma5EkUO+d1KPTgRh3YbC8W to24twTxAJx/6ohz3BodesA5+j4= X-Google-Smtp-Source: AGHT+IHVl15SCnr07XWQW6+BjWW0sPQZaqiIZX0CMPoHXYw8zPEiqPDceV8d0EkULvkTuuJfR7gC2Q== X-Received: by 2002:a17:90b:3a90:b0:2ee:fd53:2b03 with SMTP id 98e67ed59e1d1-2ef0126209bmr10483153a91.25.1733350784452; Wed, 04 Dec 2024 14:19:44 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ef27078ac4sm1942663a91.37.2024.12.04.14.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2024 14:19:44 -0800 (PST) Date: Wed, 4 Dec 2024 14:19:41 -0800 From: Stephen Hemminger To: dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com Subject: Re: [RFC 4/5] net/octeontx: fix handling of xstats_get Message-ID: <20241204141941.26da1177@hermes.local> In-Reply-To: <20241008160209.68000-5-stephen@networkplumber.org> References: <20241008160209.68000-1-stephen@networkplumber.org> <20241008160209.68000-5-stephen@networkplumber.org> 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 Tue, 8 Oct 2024 08:59:58 -0700 Stephen Hemminger wrote: > The xstats_get function in this driver did not act the same > as other drivers when queried. The correct check is to look > at the requested number of stats and compare it to the available > stats and if the request is too small, return the correct size. > > Fixes: 5538990924f2 ("net/octeontx: add basic stats support") > Cc: jerin.jacob@caviumnetworks.com > Signed-off-by: Stephen Hemminger > --- > drivers/net/octeontx/octeontx_ethdev.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c > index 3b8d717797..51093cc815 100644 > --- a/drivers/net/octeontx/octeontx_ethdev.c > +++ b/drivers/net/octeontx/octeontx_ethdev.c > @@ -1016,6 +1016,9 @@ octeontx_dev_xstats_get(struct rte_eth_dev *dev, > struct octeontx_nic *nic = octeontx_pmd_priv(dev); > > PMD_INIT_FUNC_TRACE(); > + if (n < NUM_BGX_XSTAT) > + return NUM_BGX_XSTAT; > + > return octeontx_port_xstats(nic, xstats, n); > } > Jerin or someone with access to this NIC, could you check that it works?