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 7A6F2A0C47 for ; Mon, 26 Jul 2021 12:13:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 68B7840DDA; Mon, 26 Jul 2021 12:13:09 +0200 (CEST) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id 268F7410E6 for ; Mon, 26 Jul 2021 12:13:08 +0200 (CEST) Received: by mail-wm1-f53.google.com with SMTP id b128so4961574wmb.4 for ; Mon, 26 Jul 2021 03:13:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=KLFMl7anxw01gbwACjec16jtGmZpa+fH93Xuv6dvLTM=; b=HUBS4MsLH4JADSRB2Ehr1sXMSGDnr676bD2UldQbmYlAyvv7e2IHO7UAYsLP6WsjXW ZC+xadnoOo08AXEfjbsgrWRNE8wGfAsa7/++dVh9hawc31Ogdza0xzGOzKj5ons5povR N1jDV/Xh2uByZw6eWTOrB7kXOdXqhjvVV2EzCOtyZRmgNVsNnzzeLZ180QdttagdS3Av 38nRe9cgXyQsGoFzKh0nqyIvkZxZ0vmm0f4v/0mm/XbBduuBSV/JM+34+OHuTpHl3NB7 ltc32Tz5yjKTimCUKXuzRp+DLX8Nc0eHS9m8H1lnABRLD/1b/ijTHOYvWbDhoYWNf0or CUWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KLFMl7anxw01gbwACjec16jtGmZpa+fH93Xuv6dvLTM=; b=Cf/HhjfiBjJR9pFbTfPP4JUgS2onR9PIc65DHp/gQDinvoy55YevDAgrxV/r2c2taJ UzLy1pR7mFvqUyPIbT0peyV/KrMENZpVe+QneIrxjsvCkqFwL7MkgHgyWdx+1D28MY1T tGsf023cj68hskSXv0QBeeSbWOwmTKsaW+X+pNotHOexco5cvzcBnBgf9izWmY/SE/Ha mmP+jgb0p8fe0pPioSQcu4goK4mEu9Yuk0aq6w+8vs+8ypaSouVQWpyeCeyHo572S58v u+FPHZWObflvYAKRth3GM3qYLmlYOzLGExXPmyBurYG5mCUnkUh844gHk6/6JmyHMWk9 97EQ== X-Gm-Message-State: AOAM533pDHyD5lfh6JFhbzSp3V74h6kDbd6uO/g7vm3OkGIuFoynvhjj AwhNj1AVTO+CYFRfUZHpdVUUXQ== X-Google-Smtp-Source: ABdhPJza6NfIySspBkUYNIaY1o47S7N8Su+7qEpG0yqxHE5FLqkVqQE/dY0vv2iGbwdtx1DrtHwBAQ== X-Received: by 2002:a1c:c91a:: with SMTP id f26mr16489777wmb.162.1627294387896; Mon, 26 Jul 2021 03:13:07 -0700 (PDT) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id h9sm35036885wmb.35.2021.07.26.03.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 03:13:07 -0700 (PDT) Date: Mon, 26 Jul 2021 12:13:06 +0200 From: Olivier Matz To: Andrew Rybchenko Cc: dev@dpdk.org, Thomas Monjalon , Ferruh Yigit , Kuba Kozak , Ivan Ilchenko , stable@dpdk.org, Andy Moreton Message-ID: References: <20210604144225.287678-1-andrew.rybchenko@oktetlabs.ru> <20210724123314.2970537-1-andrew.rybchenko@oktetlabs.ru> <20210724123314.2970537-2-andrew.rybchenko@oktetlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210724123314.2970537-2-andrew.rybchenko@oktetlabs.ru> Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v4 2/2] ethdev: fix docs of drivers callbacks getting xstats by IDs X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Sat, Jul 24, 2021 at 03:33:14PM +0300, Andrew Rybchenko wrote: > From: Ivan Ilchenko > > Update xstats by IDs callbacks documentation in accordance with > ethdev usage of these callbacks. Document valid combinations of > input arguments to make driver implementation simpler. > > Fixes: 79c913a42f0 ("ethdev: retrieve xstats by ID") > Cc: stable@dpdk.org > > Signed-off-by: Ivan Ilchenko > Signed-off-by: Andrew Rybchenko > Reviewed-by: Andy Moreton > --- > lib/ethdev/ethdev_driver.h | 43 ++++++++++++++++++++++++++++++++++++-- > 1 file changed, 41 insertions(+), 2 deletions(-) > > diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h > index 40e474aa7e..fd5b7ca550 100644 > --- a/lib/ethdev/ethdev_driver.h > +++ b/lib/ethdev/ethdev_driver.h > @@ -187,11 +187,28 @@ typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev, > struct rte_eth_xstat *stats, unsigned int n); > /**< @internal Get extended stats of an Ethernet device. */ > > +/** > + * @internal > + * Get extended stats of an Ethernet device. > + * > + * @param dev > + * ethdev handle of port. > + * @param ids > + * IDs array to retrieve specific statistics. Must not be NULL. > + * @param values > + * A pointer to a table to be filled with device statistics values. > + * Must not be NULL. > + * @param n > + * Element count in @p ids and @p values > + * > + * @return > + * - A number of filled in stats. > + * - A negative value on error. > + */ > typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev, > const uint64_t *ids, > uint64_t *values, > unsigned int n); > -/**< @internal Get extended stats of an Ethernet device. */ > > /** > * @internal > @@ -218,10 +235,32 @@ typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev, > struct rte_eth_xstat_name *xstats_names, unsigned int size); > /**< @internal Get names of extended stats of an Ethernet device. */ > > +/** > + * @internal > + * Get names of extended stats of an Ethernet device. > + * For name count, set @p xstats_names and @p ids to NULL. > + * > + * @param dev > + * ethdev handle of port. > + * @param xstats_names > + * An rte_eth_xstat_name array of at least *size* elements to > + * be filled. Can be NULL together with @p ids to retrieve number of > + * available statistics. > + * @param ids > + * IDs array to retrieve specific statistics. Can be NULL together > + * with @p xstats_names to retrieve number of available statistics. > + * @param size > + * Size of ids and xstats_names arrays. > + * Element count in @p ids and @p xstats_names I think only the second line should be kept. Shouldn't we also say here that size should be 0 if arrays are NULL? > + * > + * @return > + * - A number of filled in stats if both xstats_names and ids are not NULL. > + * - A number of available stats if both xstats_names and ids are NULL. > + * - A negative value on error. > + */ > typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev, > struct rte_eth_xstat_name *xstats_names, const uint64_t *ids, > unsigned int size); > -/**< @internal Get names of extended stats of an Ethernet device. */ > > typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev, > uint16_t queue_id, > -- > 2.30.2 >