automatic DPDK test reports
 help / color / mirror / Atom feed
* [dpdk-test-report] |WARNING| pw102664 [PATCH] [v3] cryptodev: add telemetry endpoint for cryptodev capabilities
@ 2021-10-22 13:38 dpdklab
  0 siblings, 0 replies; only message in thread
From: dpdklab @ 2021-10-22 13:38 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

[-- Attachment #1: Type: text/plain, Size: 3393 bytes --]

Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/102664

_apply patch failure_

Submitter: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Friday, October 22 2021 12:57:24 
Applied on: CommitID:3ac2dffae88e8eb5c374b1fdd40d605014526510
Apply patch set 102664 failed:

Checking patch lib/cryptodev/rte_cryptodev.c...
error: while searching for:
	return 0;
}

RTE_INIT(cryptodev_init_telemetry)
{
	rte_telemetry_register_cmd("/cryptodev/info", cryptodev_handle_dev_info,

error: patch failed: lib/cryptodev/rte_cryptodev.c:2507
error: while searching for:
	rte_telemetry_register_cmd("/cryptodev/stats",
			cryptodev_handle_dev_stats,
			"Returns the stats for a cryptodev. Parameters: int dev_id");
}

error: patch failed: lib/cryptodev/rte_cryptodev.c:2517
Applying patch lib/cryptodev/rte_cryptodev.c with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
diff a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c	(rejected hunks)
@@ -2507,6 +2507,68 @@ cryptodev_handle_dev_stats(const char *cmd __rte_unused,
 	return 0;
 }
 
+#define CRYPTO_CAPS_SZ                                             \
+	(RTE_ALIGN_CEIL(sizeof(struct rte_cryptodev_capabilities), \
+					sizeof(uint64_t)) /        \
+	 sizeof(uint64_t))
+
+static int
+crypto_caps_array(struct rte_tel_data *d,
+		  const struct rte_cryptodev_capabilities *capabilities)
+{
+	const struct rte_cryptodev_capabilities *dev_caps;
+	union caps_u {
+		struct rte_cryptodev_capabilities dev_caps;
+		uint64_t val[CRYPTO_CAPS_SZ];
+	} caps;
+	unsigned int i = 0, j, n = 0;
+
+	rte_tel_data_start_array(d, RTE_TEL_U64_VAL);
+
+	while ((dev_caps = &capabilities[i++])->op !=
+	   RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+		memset(&caps, 0, sizeof(caps));
+		rte_memcpy(&caps.dev_caps, dev_caps, sizeof(capabilities[0]));
+		for (j = 0; j < CRYPTO_CAPS_SZ; j++)
+			rte_tel_data_add_array_u64(d, caps.val[j]);
+		++n;
+	}
+
+	return n;
+}
+
+static int
+cryptodev_handle_dev_caps(const char *cmd __rte_unused, const char *params,
+			  struct rte_tel_data *d)
+{
+	struct rte_cryptodev_info dev_info;
+	struct rte_tel_data *crypto_caps;
+	int crypto_caps_n;
+	char *end_param;
+	int dev_id;
+
+	if (!params || 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 -EINVAL;
+
+	rte_tel_data_start_dict(d);
+	crypto_caps = rte_tel_data_alloc();
+	if (!crypto_caps)
+		return -ENOMEM;
+
+	rte_cryptodev_info_get(dev_id, &dev_info);
+	crypto_caps_n = crypto_caps_array(crypto_caps, dev_info.capabilities);
+	rte_tel_data_add_dict_container(d, "crypto_caps", crypto_caps, 0);
+	rte_tel_data_add_dict_int(d, "crypto_caps_n", crypto_caps_n);
+
+	return 0;
+}
+
 RTE_INIT(cryptodev_init_telemetry)
 {
 	rte_telemetry_register_cmd("/cryptodev/info", cryptodev_handle_dev_info,
@@ -2517,4 +2579,7 @@ RTE_INIT(cryptodev_init_telemetry)
 	rte_telemetry_register_cmd("/cryptodev/stats",
 			cryptodev_handle_dev_stats,
 			"Returns the stats for a cryptodev. Parameters: int dev_id");
+	rte_telemetry_register_cmd("/cryptodev/caps",
+			cryptodev_handle_dev_caps,
+			"Returns the capabilities for a cryptodev. Parameters: int dev_id");
 }

https://lab.dpdk.org/results/dashboard/patchsets/19653/

UNH-IOL DPDK Community Lab

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-22 13:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 13:38 [dpdk-test-report] |WARNING| pw102664 [PATCH] [v3] cryptodev: add telemetry endpoint for cryptodev capabilities dpdklab

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).