automatic DPDK test reports
 help / color / mirror / Atom feed
From: dpdklab@iol.unh.edu
To: test-report@dpdk.org
Cc: dpdk-test-reports@iol.unh.edu
Subject: |WARNING| pw109437 [PATCH] crypto/qat: add ec point verify function
Date: Thu,  7 Apr 2022 12:58:56 -0400 (EDT)	[thread overview]
Message-ID: <20220407165856.B23F945145@noxus.dpdklab.iol.unh.edu> (raw)

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

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

_apply patch failure_

Submitter: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Thursday, April 07 2022 16:45:20 
Applied on: CommitID:b35c4b0aa2bcd242d8b1989acaa41fed154045c7
Apply patch set 109437 failed:

Checking patch drivers/common/qat/qat_adf/qat_pke.h...
Hunk #1 succeeded at 278 (offset -48 lines).
Checking patch drivers/crypto/qat/qat_asym.c...
error: while searching for:
}

static int
ecdh_set_input(struct rte_crypto_asym_op *asym_op,
		struct icp_qat_fw_pke_request *qat_req,
		struct qat_asym_op_cookie *cookie,
		struct rte_crypto_asym_xform *xform)

error: patch failed: drivers/crypto/qat/qat_asym.c:831
error: while searching for:
}

static int
dh_set_input(struct rte_crypto_asym_op *asym_op,
		struct icp_qat_fw_pke_request *qat_req,
		struct qat_asym_op_cookie *cookie,

error: patch failed: drivers/crypto/qat/qat_asym.c:888
error: while searching for:
	uint32_t qat_func_alignsize = cookie->qat_func_alignsize;
	uint32_t ltrim = qat_func_alignsize - alg_bytesize;

	if (asym_op->dh.op_type == RTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE) {
		asym_op->dh.pub_point.x.length = alg_bytesize;
		asym_op->dh.pub_point.y.length = alg_bytesize;

error: patch failed: drivers/crypto/qat/qat_asym.c:935
Applied patch drivers/common/qat/qat_adf/qat_pke.h cleanly.
Applying patch drivers/crypto/qat/qat_asym.c with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
diff a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c	(rejected hunks)
@@ -831,7 +831,7 @@ dh_mod_set_input(struct rte_crypto_asym_op *asym_op,
 }
 
 static int
-ecdh_set_input(struct rte_crypto_asym_op *asym_op,
+ecdh_set_input_phase(struct rte_crypto_asym_op *asym_op,
 		struct icp_qat_fw_pke_request *qat_req,
 		struct qat_asym_op_cookie *cookie,
 		struct rte_crypto_asym_xform *xform)
@@ -888,6 +888,65 @@ ecdh_set_input(struct rte_crypto_asym_op *asym_op,
 }
 
 static int
+ecdh_set_input_verify(struct rte_crypto_asym_op *asym_op,
+		struct icp_qat_fw_pke_request *qat_req,
+		struct qat_asym_op_cookie *cookie,
+		struct rte_crypto_asym_xform *xform)
+{
+	struct qat_asym_function qat_function;
+	uint32_t qat_func_alignsize, func_id;
+	int curve_id;
+
+	curve_id = pick_curve(xform);
+	if (curve_id < 0) {
+		QAT_LOG(DEBUG, "Incorrect elliptic curve");
+		return -EINVAL;
+	}
+
+	qat_function = get_ec_verify_function(xform);
+	func_id = qat_function.func_id;
+	if (func_id == 0) {
+		QAT_LOG(ERR, "Cannot obtain functionality id");
+		return -EINVAL;
+	}
+	qat_func_alignsize = RTE_ALIGN_CEIL(qat_function.bytesize, 8);
+
+	SET_PKE_LN(asym_op->dh.pub_point.x, qat_func_alignsize, 0);
+	SET_PKE_LN(asym_op->dh.pub_point.y, qat_func_alignsize, 1);
+	SET_PKE_LN_EC(curve[curve_id], p, 2);
+	SET_PKE_LN_EC(curve[curve_id], a, 3);
+	SET_PKE_LN_EC(curve[curve_id], b, 4);
+
+	cookie->alg_bytesize = curve[curve_id].bytesize;
+	cookie->qat_func_alignsize = qat_func_alignsize;
+	qat_req->pke_hdr.cd_pars.func_id = func_id;
+	qat_req->input_param_count =
+			5;
+	qat_req->output_param_count =
+			0;
+
+	HEXDUMP("x", cookie->input_array[0], qat_func_alignsize);
+	HEXDUMP("y", cookie->input_array[1], qat_func_alignsize);
+	HEXDUMP("p", cookie->input_array[2], qat_func_alignsize);
+	HEXDUMP("a", cookie->input_array[3], qat_func_alignsize);
+	HEXDUMP("b", cookie->input_array[4], qat_func_alignsize);
+
+	return 0;
+}
+
+static int
+ecdh_set_input(struct rte_crypto_asym_op *asym_op,
+		struct icp_qat_fw_pke_request *qat_req,
+		struct qat_asym_op_cookie *cookie,
+		struct rte_crypto_asym_xform *xform)
+{
+	if (asym_op->dh.op_type == RTE_CRYPTO_ASYM_OP_KEY_VERIFY)
+		return ecdh_set_input_verify(asym_op, qat_req, cookie, xform);
+	else
+		return ecdh_set_input_phase(asym_op, qat_req, cookie, xform);
+}
+
+static int
 dh_set_input(struct rte_crypto_asym_op *asym_op,
 		struct icp_qat_fw_pke_request *qat_req,
 		struct qat_asym_op_cookie *cookie,
@@ -935,6 +994,9 @@ ecdh_collect(struct rte_crypto_asym_op *asym_op,
 	uint32_t qat_func_alignsize = cookie->qat_func_alignsize;
 	uint32_t ltrim = qat_func_alignsize - alg_bytesize;
 
+	if (asym_op->dh.op_type == RTE_CRYPTO_ASYM_OP_KEY_VERIFY)
+		return RTE_CRYPTO_OP_STATUS_SUCCESS;
+
 	if (asym_op->dh.op_type == RTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE) {
 		asym_op->dh.pub_point.x.length = alg_bytesize;
 		asym_op->dh.pub_point.y.length = alg_bytesize;

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

UNH-IOL DPDK Community Lab

                 reply	other threads:[~2022-04-07 16:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220407165856.B23F945145@noxus.dpdklab.iol.unh.edu \
    --to=dpdklab@iol.unh.edu \
    --cc=dpdk-test-reports@iol.unh.edu \
    --cc=test-report@dpdk.org \
    /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).