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 87CB9A00C2; Thu, 10 Feb 2022 13:34:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A023411AE; Thu, 10 Feb 2022 13:34:22 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 9F7F54013F for ; Thu, 10 Feb 2022 13:34:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644496460; x=1676032460; h=message-id:date:subject:from:to:cc:references: in-reply-to:content-transfer-encoding:mime-version; bh=FhWTBHVC4l22GyZQWqUE7C/m5QBiCs9XPU5FvyCRkN0=; b=h2g4lyogd6UTk0G2GlU/VQ8G8GyXqczIRQkmqVOnW16kyCJs9EkawVFO 6ygQSMISFLLcZzFvh5Q92GhM0JjcvjCVBKPUCPlsaFd/tuu9c5w/Gds/q 5pbVgz4iWvYJCioFGk5USVRTo8NuV6K6wygfghqKwzSFSKY1on5xRA7Kk PAUc8OgO0A9cU7l68eMX47cFzdUC7d08rqwgfwiDN+RH1QwiA/tawIPH5 kS6VkiccQqs9qcoy9sV6MrvwhSY5kdD3OhM01KOeJYHdP6vPS1jOTrf+s Ppw8h2A5CR9EdkckHWAOJ/rhxZRQRjAxA5dx0sXd1wbPQ9GWxLR0FQltT g==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="230125452" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="230125452" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 04:34:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="773855184" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga005.fm.intel.com with ESMTP; 10 Feb 2022 04:34:19 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 10 Feb 2022 04:34:19 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Thu, 10 Feb 2022 04:34:19 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.44) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 10 Feb 2022 04:34:19 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aBg4y7IGdGFVVKLFBJDeAecUuroZtNCR+7qIiQ2dYAtZxdxZ7nGEcdSm6jqp+xt0ZlIQBGk2Zsd1qXdKMbCFcEFsAHsbYq96D164xUkPb+KLuDidflY3A/SA8h1ErSzuM8N/CFaIvya0a2Qr15HaUKA2661cCIudGO5Xs1vON3sd2UDE8PSt3mDy6blbnE7MdCvZ3JWYDbe6rFspIKLn8psdkEfRSg7/+5T37h0EBg4LfhBCEPZs//3qBQ6px30Fnyf5ETDBcV7VF/JC+Mf5Belllu6H7CgvyNdB/w5QiMR/3Y7B8tRoBYYeK1/rbikXETRXvwqpdwJuv+CHpR3/Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=D46ZdYGJmPnK/MjtmjWtW0hBRmy6dei24czaF5DNfHg=; b=XwxXMSsBY+ueHeO5wQc88Omroaw4v4xLUp+PfXBwzXhrBCFgoO77yEaQNDtL8qVF5F9O1cn3mtIYDFYw2sgWQMrmvCiKLCStf5pDrr1Af7M1yGvn/cZjpqDxtxd3Nb78M4vA3pfT5Cnc1PofLlbFCx1o+fsn6NRSF01PxpnLK/5gZqMufJ1XJsIGFP6ngNuR3RhAJj+lWtuEOqQAzGuyL581Eu4HnnCfmVQ8MlFpFoQgjAnvoaG3gJS5dmBL1g/esN2FQuFEqQTve4go1fC30poB+8kp9gu7teKGjHftmee60rSfRn6JgQ9ywgqIdQEBL52HJ5g9VWKIHJwSG/w1RA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by SA2PR11MB4892.namprd11.prod.outlook.com (2603:10b6:806:f9::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Thu, 10 Feb 2022 12:34:17 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2%4]) with mapi id 15.20.4975.011; Thu, 10 Feb 2022 12:34:17 +0000 Message-ID: <4ed15350-d311-abf6-f85f-5285a169f036@intel.com> Date: Thu, 10 Feb 2022 12:34:12 +0000 Subject: Re: [PATCH v3] ethdev: introduce dump API Content-Language: en-US From: Ferruh Yigit To: "Min Hu (Connor)" , CC: =?UTF-8?Q?Morten_Br=c3=b8rup?= , Ray Kinsella , Ajit Khaparde , Thomas Monjalon , Andrew Rybchenko References: <20220111115437.32855-1-humin29@huawei.com> <20220209012106.23404-1-humin29@huawei.com> <480b7433-2d7b-be1f-ec52-40ab25006627@intel.com> X-User: ferruhy In-Reply-To: <480b7433-2d7b-be1f-ec52-40ab25006627@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LNXP123CA0005.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::17) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0d7a1d2a-9b2a-41d3-df7b-08d9ec91a798 X-MS-TrafficTypeDiagnostic: SA2PR11MB4892:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8mdRgXpnylxgKxleL602P+h8jv3Pw2sZCPU/Zw6L8+FrcBGuI6fDEdTtf6JXquxjn3QnLlKtBtrPhNglC//VMY0aWrhRoJAMo/ynymBGI8zd3yXbAkhHXt2SHnBV9Ble60YJ1wXei2xhdjQK0MOE3obAflJJl+njkcyL5/SFUzEnX9MpUlnZod+8gy9B5XXiHnvNxfzT3Gma7LkkQbV7eQqEL1nvldCb7gJV2oaCuRssocD0Y1iNtA0R/v3XjRzhLgZ3oZ2LD+6qe5hp8sRWvhHyoRywrSrooZs69fIoMnv5/zph+LqvhWpLkYBs9Ft3ktbGtGlS5b/Z16wdyHSL3lmz96gRRg8z3PhLcpwfI5PR7wrKsdYLKIkpTkdMLiZcCIlZLv710J/A6ocjRMZGgf/hh8Giq8mauqQOeGc5pU9O4wpSmeSLfNurEr5kTiDEOB/NZkoDL/axRK7ahl+Z/ppS1tWr8DdbHnOUd0t+OFtD/8r3RLrcR8Fm1xhq4CC7utmu2CR4allgfaEzuN66vSDAdU3bZ1nkt+HD/YotQ94g+r0vuYI9sEdSuHjTW9dVzWY0OQRmG4NkkiF/yCVXPa4TUs2XJqYyKpcZYsmWtPuXoq1TkpnOnDrFQYd4+ta/uwUXE1XnQRkwCluoIc6Sg+VVTCoSlpFGJOFEmR18UpPtbWDWIkGeSZTURfT66oTgMSk2Z6ahHecGMVdbu67EQg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(44832011)(54906003)(2906002)(36756003)(8936002)(508600001)(5660300002)(316002)(31686004)(6486002)(6512007)(6506007)(6666004)(2616005)(53546011)(55236004)(38100700002)(66574015)(26005)(83380400001)(4326008)(8676002)(66946007)(66556008)(66476007)(82960400001)(86362001)(31696002)(186003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZVV6WElXUnlUUHVlemR1dW5VOExnYW5YTzk1NXhvcHJ0cEh5ZkV6R2lwYUIy?= =?utf-8?B?WnBJa2Y4WXRsclFjNERWUk9DUE1VcENxTzdZMHU0cGVSZVhnRlB5SDdiRkZr?= =?utf-8?B?T3ZJa1diM0VtVlcrZ0ZROGxVcHFKWjdNb01pWGFYSUo1M0ZoaVd2YWZ0NmxB?= =?utf-8?B?cko4ZUxzMm9NbHIxUGlrTEdBcDc2c2liVEJZK1FaTE95MkdRQ2FUbnhSRzFL?= =?utf-8?B?Z0JWZHVuVEc2U1VIRUc3MzZyd1c0eXlHWGpmSG1JL3pubVB6Tmw5S0hCZ1ZU?= =?utf-8?B?c2ZkZ1BUdW8rY2MycVpodUZZaExwY1hXN0UrSThLYUNCTFNZc09vazY0NmRZ?= =?utf-8?B?NDAxeUlRdEVNZmkrMU5LWDU3ZVg0Qzd1UEFCV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?Q?5zH8X5qaL/CFS8ADe3cj3DY=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 0d7a1d2a-9b2a-41d3-df7b-08d9ec91a798 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 12:34:17.8206 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pARRfZzyGfZ+vgQbJRPsZgNOmYuk7jdkHaXyWkNcGC54cGVE9cS9+mLUTafuAW62TNBXO1MYma4dYCv3DLdycQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4892 X-OriginatorOrg: intel.com 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 2/10/2022 12:32 PM, Ferruh Yigit wrote: > On 2/9/2022 1:21 AM, Min Hu (Connor) wrote: >> Added the ethdev dump API which provides querying private info from ethdev. >> There exists many private properties in different PMD drivers, such as >> adapter state, Rx/Tx func algorithm in hns3 PMD. The information of these >> properties is important for debug. As the information is private, the new >> API is introduced. >> >> Signed-off-by: Min Hu (Connor) >> Acked-by: Morten Brørup >> Acked-by: Ray Kinsella >> Acked-by: Ajit Khaparde >> --- >> v3: >> * change 'ethdev' to 'device' >> v2: >> * fixed comments from Ferruh. >> --- >>   doc/guides/rel_notes/release_22_03.rst |  7 +++++++ >>   lib/ethdev/ethdev_driver.h             | 23 +++++++++++++++++++++++ >>   lib/ethdev/rte_ethdev.c                | 17 +++++++++++++++++ >>   lib/ethdev/rte_ethdev.h                | 20 ++++++++++++++++++++ >>   lib/ethdev/version.map                 |  3 +++ >>   5 files changed, 70 insertions(+) >> >> diff --git a/doc/guides/rel_notes/release_22_03.rst b/doc/guides/rel_notes/release_22_03.rst >> index b20716c521..0e3d3ae365 100644 >> --- a/doc/guides/rel_notes/release_22_03.rst >> +++ b/doc/guides/rel_notes/release_22_03.rst >> @@ -64,6 +64,13 @@ New Features >>       - ``rte_ipv6_udptcp_cksum_mbuf()`` >>       - ``rte_ipv6_udptcp_cksum_mbuf_verify()`` >> +* **Added the private dump API, for query private info from device.** >> + >> +  Added the private dump API which provides querying private info from device. >> +  There exists many private properties in different PMD drivers. The >> +  information of these properties is important for debug. As the information >> +  is private, the new API is introduced. >> + >>   * **Updated AF_XDP PMD** >>     * Added support for libxdp >=v1.2.2. >> diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h >> index 7d27781f7d..a0bd066ab3 100644 >> --- a/lib/ethdev/ethdev_driver.h >> +++ b/lib/ethdev/ethdev_driver.h >> @@ -990,6 +990,26 @@ typedef int (*eth_representor_info_get_t)(struct rte_eth_dev *dev, >>   typedef int (*eth_rx_metadata_negotiate_t)(struct rte_eth_dev *dev, >>                          uint64_t *features); >> +/** >> + * @internal >> + * Dump private info from device to a file. >> + * >> + * @param dev >> + *   Port (ethdev) handle. >> + * @param file >> + *   A pointer to a file for output. >> + * >> + * @retval 0 >> + *   Success >> + * @retval -EINVAL >> + *   Invalid file >> + * @retval -ENOTSUP >> + *   Not supported >> + * @retval -ENODEV >> + *   Invalid port_id > > For dev_ops (eth_dev_priv_dump_t), I don't think '-ENOTSUP' and '-ENODEV' > are valid errors, those cases covered by API before dev_ops called. > > Also '@return' is missing. > > What about below: >   * >   * @return >   *   Negative value on error, 0 on success. >   * >   * @retval 0 >   *   Success >   * @retval -EINVAL >   *   Invalid file >   */ > >> + */ >> +typedef int (*eth_dev_priv_dump_t)(struct rte_eth_dev *dev, FILE *file); >> + >>   /** >>    * @internal A structure containing the functions exported by an Ethernet driver. >>    */ >> @@ -1186,6 +1206,9 @@ struct eth_dev_ops { >>        * kinds of metadata to the PMD >>        */ >>       eth_rx_metadata_negotiate_t rx_metadata_negotiate; >> + >> +    /** Dump private info from device */ >> +    eth_dev_priv_dump_t eth_dev_priv_dump; >>   }; >>   /** >> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c >> index 917a320afa..5ee316a3c0 100644 >> --- a/lib/ethdev/rte_ethdev.c >> +++ b/lib/ethdev/rte_ethdev.c >> @@ -6485,6 +6485,23 @@ rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features) >>                  (*dev->dev_ops->rx_metadata_negotiate)(dev, features)); >>   } >> +int >> +rte_eth_dev_priv_dump(uint16_t port_id, FILE *file) >> +{ >> +    struct rte_eth_dev *dev; >> + >> +    RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); >> +    dev = &rte_eth_devices[port_id]; >> + >> +    if (file == NULL) { >> +        RTE_ETHDEV_LOG(ERR, "Invalid file (NULL)\n"); >> +        return -EINVAL; >> +    } >> + >> +    RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->eth_dev_priv_dump, -ENOTSUP); >> +    return eth_err(port_id, (*dev->dev_ops->eth_dev_priv_dump)(dev, file)); >> +} >> + > > Can you please move the function up in the file? > Bottom of the file is for static inline functions, APIs are above the > "#include " line, can you move the function above > that? > >>   RTE_LOG_REGISTER_DEFAULT(rte_eth_dev_logtype, INFO); >>   RTE_INIT(ethdev_init_telemetry) >> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h >> index 147cc1ced3..e6ea294402 100644 >> --- a/lib/ethdev/rte_ethdev.h >> +++ b/lib/ethdev/rte_ethdev.h >> @@ -5902,6 +5902,26 @@ rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id, >>       return rte_eth_tx_buffer_flush(port_id, queue_id, buffer); >>   } >> +/** >> + * @warning >> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice >> + * >> + * Dump private info from device to a file. Provided data and the order depends >> + * on the PMD. >> + * >> + * @param port_id >> + *   The port identifier of the Ethernet device. >> + * @param file >> + *   A pointer to a file for output. >> + * @return >> + *   - (-ENODEV) if *port_id* is invalid. >> + *   - (-EINVAL) if null file. >> + *   - (-ENOTSUP) if the device does not support this function. >> + *   - (0) on success > > Can you please list "(0) on success" to be consistent with (most :( of the) other comments? > Can you please list "(0) on success" as first item ... * @return * - (0) on success * - (-ENODEV) if *port_id* is invalid. * - (-EINVAL) if null file. ... > Also need to add "(-EIO) if device is removed." too, which can be > returned by 'eth_err()'. > > >> + */ >> +__rte_experimental >> +int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file); >> + >>   #ifdef __cplusplus >>   } >>   #endif >> diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map >> index 1f7359c846..376ea139aa 100644 >> --- a/lib/ethdev/version.map >> +++ b/lib/ethdev/version.map >> @@ -256,6 +256,9 @@ EXPERIMENTAL { >>       rte_flow_flex_item_create; >>       rte_flow_flex_item_release; >>       rte_flow_pick_transfer_proxy; >> + >> +    # added in 22.03 >> +    rte_eth_dev_priv_dump; > > next version needs to be rebased on top of next-net, because of other > APIs merged, fyi > >>   }; >>   INTERNAL { >