DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Power, Ciara" <ciara.power@intel.com>
To: "Troy, Rebecca" <rebecca.troy@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>,
	Akhil Goyal <gakhil@marvell.com>,
	"Doherty, Declan" <declan.doherty@intel.com>
Subject: Re: [dpdk-dev] [PATCH v3] cryptodev: add telemetry callbacks
Date: Tue, 12 Oct 2021 14:30:26 +0000	[thread overview]
Message-ID: <MN2PR11MB38211B4E988D259D05224A0AE6B69@MN2PR11MB3821.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211007141110.569739-1-rebecca.troy@intel.com>

Hi Becky,

>-----Original Message-----
>From: Troy, Rebecca <rebecca.troy@intel.com>
>Sent: Thursday 7 October 2021 15:11
>To: dev@dpdk.org
>Cc: Power, Ciara <ciara.power@intel.com>; Zhang, Roy Fan
><roy.fan.zhang@intel.com>; Troy, Rebecca <rebecca.troy@intel.com>; Akhil
>Goyal <gakhil@marvell.com>; Doherty, Declan <declan.doherty@intel.com>
>Subject: [PATCH v3] cryptodev: add telemetry callbacks
>
>The cryptodev library now registers commands with telemetry, and
>implements the corresponding callback functions. These commands allow a
>list of cryptodevs to be queried, as well as info and stats for the corresponding
>cryptodev.
>
>An example usage can be seen below:
>
>Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2
>{"version": "DPDK 21.11.0-rc0", "pid": 1135019, "max_output_len": 16384}
>--> /
>{"/": ["/", "/cryptodev/info", "/cryptodev/list", "/cryptodev/stats", ...]}
>--> /cryptodev/list
>{"/cryptodev/list": [0,1,2,3]}
>--> /cryptodev/info,0
>{"/cryptodev/info": {"device_name": "0000:1c:01.0_qat_sym", \
>	 "max_nb_queue_pairs": 2}}
>--> /cryptodev/stats,0
>{"/cryptodev/stats": {"enqueued_count": 0, "dequeued_count": 0, \
>	"enqueue_err_count": 0, "dequeue_err_count": 0}}
>
>Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
>
>---
>v3:
>  - Added missing version tag to patch.
>v2:
>  - Added documentation and release notes.
>  - Changed the /cryptodev/list command to list the devices as an
>	array of IDs, rather than as names and IDs.
>  - Added the /cryptodev/info command as described above.
>---
>---
> doc/guides/prog_guide/cryptodev_lib.rst | 30 ++++++++
>doc/guides/rel_notes/release_21_11.rst  |  5 ++
> lib/cryptodev/rte_cryptodev.c           | 92 +++++++++++++++++++++++++
> 3 files changed, 127 insertions(+)
>
>diff --git a/doc/guides/prog_guide/cryptodev_lib.rst
>b/doc/guides/prog_guide/cryptodev_lib.rst
>index 9b1cf8d49f..b94d3caa60 100644
>--- a/doc/guides/prog_guide/cryptodev_lib.rst
>+++ b/doc/guides/prog_guide/cryptodev_lib.rst
>@@ -1282,3 +1282,33 @@ Asymmetric Crypto Device API
>
> The cryptodev Library API is described in the  `DPDK API Reference
><https://doc.dpdk.org/api/>`_
>+
>+
>+Device Statistics
>+~~~~~~~~~~~~~~~~~

This header underline (~~~) means this section will be a subsection of "Asymmetric crypto Sample code", which isn't correct.
I suggest changing the underline to "----" to move it up a level to be its own section.

>+
>+The Cryptodev library has support for displaying cryptodev information
>+through the Telemetry interface. Telemetry commands that can be used
>+are shown below.
>+
>+#. Get the list of available Crypto devices by ID::
>+
>+     --> /cryptodev/list
>+     {"/cryptodev/list": [0, 1, 2, 3]}
>+
>+#. Get general information from a Crypto device::
>+
>+     --> /cryptodev/info,0
>+     {"/cryptodev/info": {"device_name": "0000:1c:01.0_qat_sym",
>+     "max_nb_queue_pairs": 2}}
>+
>+#. Get the statistics for a particular Crypto device::
>+
>+     --> /cryptodev/stats,0
>+     {"/cryptodev/stats": {"enqueued_count": 0,
>+     "dequeued_count": 0, "enqueue_err_count": 0,
>+     "dequeue_err_count": 0}}
>+
>+
>+For more information on how to use the Telemetry interface, see the
>+:doc:../howto/telemetry.

There are ` symbols missing here, so this link doesn't work.
Needs to be:
     :doc:`../howto/telemetry`

<snip>

>+static int
>+cryptodev_handle_dev_info(const char *cmd __rte_unused,
>+		const char *params, struct rte_tel_data *d) {
>+	struct rte_cryptodev_info cryptodev_info;
>+	int dev_id;
>+	char *end_param;
>+
>+	if (params == NULL || strlen(params) == 0 || !isdigit(*params))
>+		return -EINVAL;
>+
>+	dev_id = strtoul(params, &end_param, 0);
>+	if (*end_param != '\0')
>+		CDEV_LOG_ERR("Extra parameters passed to command,
>ignoring");
>+	if (!rte_cryptodev_is_valid_dev(dev_id))
>+		return -1;

Maybe -EINVAL return value would be better here, same comment for handle_dev_stats function.

<snip>

Thanks,
Ciara

  reply	other threads:[~2021-10-12 14:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19 10:21 [dpdk-dev] [PATCH] " Rebecca Troy
2021-08-20 12:59 ` Zhang, Roy Fan
2021-09-28 10:47 ` [dpdk-dev] [EXT] " Akhil Goyal
2021-09-28 10:48 ` Akhil Goyal
2021-09-29  5:14 ` Gowrishankar Muthukrishnan
2021-09-29  7:51   ` Bruce Richardson
2021-10-07 10:17 ` [dpdk-dev] " Rebecca Troy
2021-10-07 14:11   ` [dpdk-dev] [PATCH v3] " Rebecca Troy
2021-10-12 14:30     ` Power, Ciara [this message]
2021-10-13 10:22     ` [dpdk-dev] [PATCH v4] " Rebecca Troy
2021-10-13 10:57       ` Power, Ciara
2021-10-13 12:15       ` Tal Shnaiderman
2021-10-13 15:22       ` [dpdk-dev] [PATCH v5] " Rebecca Troy
2021-10-13 16:08         ` Bruce Richardson
2021-10-25  4:32         ` [dpdk-dev] [EXT] " Akhil Goyal
2021-10-26  8:22           ` Troy, Rebecca
2021-10-26 12:00         ` [dpdk-dev] [PATCH v6] " Rebecca Troy
2021-10-26 14:37           ` [dpdk-dev] [EXT] " Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR11MB38211B4E988D259D05224A0AE6B69@MN2PR11MB3821.namprd11.prod.outlook.com \
    --to=ciara.power@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=rebecca.troy@intel.com \
    --cc=roy.fan.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).