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 1DFECA0544; Fri, 27 May 2022 17:34:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8E22410DC; Fri, 27 May 2022 17:34:24 +0200 (CEST) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mails.dpdk.org (Postfix) with ESMTP id 7DDDE40E78 for ; Fri, 27 May 2022 17:34:22 +0200 (CEST) Received: by mail-pj1-f52.google.com with SMTP id n10so4891533pjh.5 for ; Fri, 27 May 2022 08:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OwWXmB25ItqdgwdCx5wnfehRsX0jkl5M59ZNSNs9CE8=; b=UU0KNZxWYRgMVRb/7KtKq2J/gDxWhS38q+B4iX9aPL03WS+mJmw7IYOfRwFUm46JN0 LPfqkLvtzGIWMDKeFLwglq7yVcBWg9iBVoIxHfLgZwJ8fA9KP+XY4MwaB4fMLYtuv+NS FwUr6l1g/7oJi063F7xZ+0GUvKsZ7hNqnJB0hZwX06HloTobyEDjuYpxcI8zjS9YsLdE RcmalW+p7yKkLBAIhpb/YrBSOzhOwSlr2xGgjw9vZ+73ARrXZ9dyyG5KUxMwsI14AeC7 vg5A1Ipi/zRTS6u4DeqbQVN2hvkZ9IhDEHUa+qHMOzY0E6o1xJzSABU0LWdrTaOv6TdQ RstQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OwWXmB25ItqdgwdCx5wnfehRsX0jkl5M59ZNSNs9CE8=; b=mOYhuglumzbmsbctekD0nxQTrcKl7jO9tSAWMw+SACFNMN0ztlXQWU4s/RQDU6stbU hMSsEH9IAmuYf6O3sDEUzbQjJHmQLz9c2jMbdhd+dpHc/B8IQ5VdxjkKk5Jne4/SRJ2d /Ufid8j/vrt3d5EjPzavsad+VPTFTNVTDJstwaKRcXiL3SfIxAwxslRZy9+WGxSfR8Xi Wb1QLb4KWWiZhgCGJSs3ZJA4oVW3AScNmsh25JPMd50R20qJ+lPv6dTEp76qrZ4SiILf QQ4DniROSrFjetGHeW4NFdjLC7N6eW3PwUEJQCgoDc5lwrzBq3VOUZ1Qn1zsuegUvy1j 4lTw== X-Gm-Message-State: AOAM5339kCA95GmSvFv5fGtST+oKm2LcIeqRwX8x3dYglRMPhk09uqX8 0rrQqcZOEAwq3En8SPS7cE3zdg== X-Google-Smtp-Source: ABdhPJzgvl1spmf0kH1mEhA4AZA58UbSCy70XU4AXuJ02VhbFpc1GAb+KEb7TNx/EYbUVrw+0Cx/aA== X-Received: by 2002:a17:90a:bb17:b0:1e0:ab18:4491 with SMTP id u23-20020a17090abb1700b001e0ab184491mr8861310pjr.120.1653665661431; Fri, 27 May 2022 08:34:21 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id m9-20020a63ed49000000b003f9d1c020cbsm3565199pgk.51.2022.05.27.08.34.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 08:34:20 -0700 (PDT) Date: Fri, 27 May 2022 08:34:18 -0700 From: Stephen Hemminger To: "Min Hu (Connor)" Cc: , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ray Kinsella Subject: Re: [PATCH 1/4] ethdev: introduce ethdev HW desc dump PI Message-ID: <20220527083418.42910de6@hermes.local> In-Reply-To: <20220527023351.40577-2-humin29@huawei.com> References: <20220527023351.40577-1-humin29@huawei.com> <20220527023351.40577-2-humin29@huawei.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 Fri, 27 May 2022 10:33:48 +0800 "Min Hu (Connor)" wrote: > Added the ethdev HW Rx desc dump API which provides functions for query > HW descriptor from device. HW descriptor info differs in different NICs. > The information demonstrates I/O process which is important for debug. > As the information is different between NICs, the new API is introduced. > > Signed-off-by: Min Hu (Connor) > --- > doc/guides/rel_notes/release_22_07.rst | 6 ++++ > lib/ethdev/ethdev_driver.h | 42 ++++++++++++++++++++++++ > lib/ethdev/rte_ethdev.c | 44 ++++++++++++++++++++++++++ > lib/ethdev/rte_ethdev.h | 44 ++++++++++++++++++++++++++ > lib/ethdev/version.map | 2 ++ > 5 files changed, 138 insertions(+) > > diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst > index 0ed4f92820..cfb9117dd3 100644 > --- a/doc/guides/rel_notes/release_22_07.rst > +++ b/doc/guides/rel_notes/release_22_07.rst > @@ -95,6 +95,12 @@ New Features > * Added AH mode support in lookaside protocol (IPsec) for CN9K & CN10K. > * Added AES-GMAC support in lookaside protocol (IPsec) for CN9K & CN10K. > > +* **Added ethdev HW desc dump API, to dump Rx/Tx HW desc info from device.** > + > + Added the ethdev HW Rx desc dump API which provides functions for query > + HW descriptor from device. HW descriptor info differs in different NICs. > + The information demonstrates I/O process which is important for debug. > + As the information is different between NICs, the new API is introduced. > > Removed Items > ------------- > diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h > index 69d9dc21d8..89512ab360 100644 > --- a/lib/ethdev/ethdev_driver.h > +++ b/lib/ethdev/ethdev_driver.h > @@ -1073,6 +1073,42 @@ typedef int (*eth_ip_reassembly_conf_set_t)(struct rte_eth_dev *dev, > */ > typedef int (*eth_dev_priv_dump_t)(struct rte_eth_dev *dev, FILE *file); > > +/** > + * @internal > + * Dump ethdev Rx descriptor info to a file. > + * > + * @param file > + * A pointer to a file for output. > + * @param dev > + * Port (ethdev) handle. > + * @param queue_id > + * The selected queue. > + * @param desc_id > + * The selected descriptor. > + * @return > + * Negative errno value on error, zero on success. > + */ > +typedef int (*eth_rx_hw_desc_dump_t)(FILE *file, struct rte_eth_dev *dev, > + uint16_t queue_id, uint16_t desc_id); > + > +/** > + * @internal > + * Dump ethdev Tx descriptor info to a file. > + * > + * @param file > + * A pointer to a file for output. > + * @param dev > + * Port (ethdev) handle. > + * @param queue_id > + * The selected queue. > + * @param desc_id > + * The selected descriptor. > + * @return > + * Negative errno value on error, zero on success. > + */ > +typedef int (*eth_tx_hw_desc_dump_t)(FILE *file, struct rte_eth_dev *dev, > + uint16_t queue_id, uint16_t desc_id); Should be 'const struct rte_eth_dev *dev' to remind developers that dump should not modify device?