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 4D89F45F15; Sun, 22 Dec 2024 17:46:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D83D940263; Sun, 22 Dec 2024 17:46:07 +0100 (CET) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 0F21640156 for ; Sun, 22 Dec 2024 17:46:07 +0100 (CET) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-725ea1e19f0so2795855b3a.3 for ; Sun, 22 Dec 2024 08:46:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734885966; x=1735490766; 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=DKejVO2/ay2bkZPSKL4fFq0JfnSNfz3B2DDSApy4tEM=; b=X0OIPLVwZykVseP4XO7lYkEYnuGiY65N6W/xXUeU0ALt6fNLcTQ7ELdofFvs/nSuB0 w25XP3yp3B80QRwSWI2TYK6McMkaNDpIqB9gp62Ru4+Zbfxo6+jYMtrQknYaEKpBejGl ztf45FlGl1pVjrSZ9G9AxVRY7Rqt1tnwxHcUC/lPprRhkF/3BX8hJkmWTKy5Mm2HaXZb edExvYTCCZ6SIy8ebpzsmqiydBPwzVp9qLqiDYk+fRrPZayYcjOwWUbdRix5eNzz3d8l u7S/JPY3C3/4DKfWZgp0zSZ05QYRqI4Ywb6v9oIj+NyO8uXCDAznwZBPW1y8nTTvKAq6 IrSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734885966; x=1735490766; 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=DKejVO2/ay2bkZPSKL4fFq0JfnSNfz3B2DDSApy4tEM=; b=o7/CXRzaket2SNjTl2DqnlLEKHaP4NbS1x5PWGdx9eW2nDHdZDXfMFENZnfb5ohqmd A9RAgscH2GQ3SUW+4EAQiWOQlInHjVV3iX2WWv5mztnAiIBKQ6p2/5q8FYJQviwvOq3r d9EtvAr8RcYDP9wa2O5kd3BDwiCrIqnTvzstTyiO6ka4sxXXzFIo+CRkqFbiP0FsNu/w gQurqQShLF884yIj93krrdCwRVRakQXGj3Lj2hBzwikHGnPjcI45A9vhRDrwrdCcRvSi sKkWZxF3+0qiZ0pafDtfbd86CQfid4NJWXp/D3OlJSYbfg44ibbP6XqXH/RzKu5WoGXM WW5A== X-Gm-Message-State: AOJu0YyNzyrHPuD3E5d8nyCQTy3OyAhE3wuc6lWB0nksmjECtiuoQqHw jntMqRrDsGvK3qqTAsxK7ecvjwV6Y6hjZSafCLXEXq4bXJ8AEoHng/Td7oS4RiM= X-Gm-Gg: ASbGnctvJsZ7FSRfoaDknh9YBAMHmTpfQSrF2OorGPB9y4AfgzKjLu0+Ek1L3deR2ck Y8Ky0e2iU9hMAqmZo5fXGrMxhMPl04qz013ijo0dLnuitEU2B+OaNJKO9uvBHuXj/B3nsj4o8D5 kJ1yuFurbOo3SEASnMvDFqUu6Vi72sCAaJpBfghRbdRNtyC4uzMekzb55NKOD9Aa/i2SqVrQ5Zi HtQVHD7pKHk7/LbMG/RqsJHkPIReg1eBshIH4IWdKG/fWqTVr+3OgFd83uCwhRKgRUKLpHlv97F YEFhV/Jsi0p8SzA/31Buz+rGM2dUEWuX7A== X-Google-Smtp-Source: AGHT+IGRxSP87cgC5XPigRCB1mEmrerPQ5aMB01jLNOHE0ducQx3BjsWj6+pSllkW7L0AyzhLWwTVA== X-Received: by 2002:a05:6a00:8089:b0:728:f337:a721 with SMTP id d2e1a72fcca58-72abdd7bc30mr11760780b3a.7.1734885966082; Sun, 22 Dec 2024 08:46:06 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8dbc0csm6310966b3a.99.2024.12.22.08.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2024 08:46:05 -0800 (PST) Date: Sun, 22 Dec 2024 08:46:00 -0800 From: Stephen Hemminger To: Shani Peretz Cc: , Aman Singh , Dariusz Sosnowski , Viacheslav Ovsiienko , Bing Zhao , Ori Kam , Suanming Mou , Matan Azrad , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Anatoly Burakov Subject: Re: [RFC PATCH] ethdev: add new API for enable/disable xstat counters by ID Message-ID: <20241222084600.7d020991@hermes.local> In-Reply-To: <20241222153819.62519-1-shperetz@nvidia.com> References: <20241222153819.62519-1-shperetz@nvidia.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 Sun, 22 Dec 2024 17:38:19 +0200 Shani Peretz wrote: > This change introduces a new API to dynamically enable or disable > xstat counters by their IDs. Some counters may require hardware > resources that are potentially limited, so providing the ability > to toggle them on or off makes sense. > In addition, adding an API to query the current state > (enabled, disabled, or not supported) of an xstat counter is added. > New APIs: > - rte_eth_xstats_enable_counter(struct rte_eth_dev *dev, uint64_t id); > - rte_eth_xstats_disable_counter(struct rte_eth_dev *dev, uint64_t id); > - rte_eth_xstats_query_state(struct rte_eth_dev *dev, uint64_t id); > > Added the following testpmd subcommands: > toggle the counter on and off > > port (port_id) enable|disable > query the state of counters: > > set xstats-show-state on|off > > Note that by default, generic stats (like those provided by > eth_basic_stats_get()) will be considered unsupported and > will not be toggleable. > Also all xstats will be considered unsupported for dynamic enable/disable, > and each PMD will be able to override this in its implementation. > > Specifically in mlx5 PMD, expose a new xstat to track packet drops of > hairpin Rx queue: > - Hairpin_out_of_buffer - Port-level counter - > counts drops from all the hairpin queues > - Hairpin_out_of_buffer_rxq* - Queue-level counter - > counts drops of a specific queue > Both the port-level and per-queue counters can be > enabled, disabled, and queried. > > Signed-off-by: Shani Peretz Why what is the value of having a counter disabled? Is this something that speeds up the PMD? IMHO DPDK changes should be driven off user need, not the HW capabilities.