automatic DPDK test reports
 help / color / mirror / Atom feed
* |WARNING| pw109425 [PATCH] crypto/qat: add ecdh key exchange algorithm
@ 2022-04-07 14:49 dpdklab
  0 siblings, 0 replies; only message in thread
From: dpdklab @ 2022-04-07 14:49 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

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

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

_apply patch failure_

Submitter: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Thursday, April 07 2022 14:37:52 
Applied on: CommitID:b35c4b0aa2bcd242d8b1989acaa41fed154045c7
Apply patch set 109425 failed:

Checking patch drivers/crypto/qat/qat_asym.c...
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:831
error: while searching for:
	switch (xform->xform_type) {
	case RTE_CRYPTO_ASYM_XFORM_DH:
		return dh_mod_set_input(asym_op, qat_req, cookie, xform);
	default:
		QAT_LOG(ERR,
			"Invalid/unsupported asymmetric crypto xform type");

error: patch failed: drivers/crypto/qat/qat_asym.c:839
Hunk #3 succeeded at 779 (offset -146 lines).
error: while searching for:
		return modinv_set_input(asym_op, qat_req,
				cookie, xform);
	case RTE_CRYPTO_ASYM_XFORM_DH:
		return dh_set_input(asym_op, qat_req,
				cookie, xform);
	case RTE_CRYPTO_ASYM_XFORM_RSA:

error: patch failed: drivers/crypto/qat/qat_asym.c:880
error: while searching for:
		return modinv_collect(asym_op, cookie, xform);
	case RTE_CRYPTO_ASYM_XFORM_DH:
		return dh_collect(asym_op, cookie, xform);
	case RTE_CRYPTO_ASYM_XFORM_RSA:
		return rsa_collect(asym_op, cookie);
	case RTE_CRYPTO_ASYM_XFORM_ECDSA:

error: patch failed: drivers/crypto/qat/qat_asym.c:973
Hunk #6 succeeded at 1184 (offset -186 lines).
Applying patch drivers/crypto/qat/qat_asym.c with 4 rejects...
Rejected hunk #1.
Rejected hunk #2.
Hunk #3 applied cleanly.
Rejected hunk #4.
Rejected hunk #5.
Hunk #6 applied cleanly.
diff a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c	(rejected hunks)
@@ -831,6 +831,63 @@ dh_mod_set_input(struct rte_crypto_asym_op *asym_op,
 }
 
 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)
+{
+	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_ecpm_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);
+
+	if (asym_op->dh.op_type == RTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE) {
+		SET_PKE_LN(asym_op->dh.priv_key, qat_func_alignsize, 0);
+		SET_PKE_LN_EC(curve[curve_id], x, 1);
+		SET_PKE_LN_EC(curve[curve_id], y, 2);
+	} else {
+		SET_PKE_LN(asym_op->dh.priv_key, qat_func_alignsize, 0);
+		SET_PKE_LN(asym_op->dh.pub_point.x, qat_func_alignsize, 1);
+		SET_PKE_LN(asym_op->dh.pub_point.y, qat_func_alignsize, 2);
+	}
+	SET_PKE_LN_EC(curve[curve_id], a, 3);
+	SET_PKE_LN_EC(curve[curve_id], b, 4);
+	SET_PKE_LN_EC(curve[curve_id], p, 5);
+	SET_PKE_LN_EC(curve[curve_id], h, 6);
+
+	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 =
+			QAT_ASYM_ECPM_IN_PARAMS;
+	qat_req->output_param_count =
+			QAT_ASYM_ECPM_OUT_PARAMS;
+
+	HEXDUMP("k", cookie->input_array[0], qat_func_alignsize);
+	HEXDUMP("xG", cookie->input_array[1], qat_func_alignsize);
+	HEXDUMP("yG", 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);
+	HEXDUMP("q", cookie->input_array[5], qat_func_alignsize);
+	HEXDUMP("h", cookie->input_array[6], qat_func_alignsize);
+
+	return 0;
+}
+
+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,
@@ -839,6 +896,8 @@ dh_set_input(struct rte_crypto_asym_op *asym_op,
 	switch (xform->xform_type) {
 	case RTE_CRYPTO_ASYM_XFORM_DH:
 		return dh_mod_set_input(asym_op, qat_req, cookie, xform);
+	case RTE_CRYPTO_ASYM_XFORM_ECDH:
+		return ecdh_set_input(asym_op, qat_req, cookie, xform);
 	default:
 		QAT_LOG(ERR,
 			"Invalid/unsupported asymmetric crypto xform type");
@@ -880,6 +971,7 @@ asym_set_input(struct rte_crypto_asym_op *asym_op,
 		return modinv_set_input(asym_op, qat_req,
 				cookie, xform);
 	case RTE_CRYPTO_ASYM_XFORM_DH:
+	case RTE_CRYPTO_ASYM_XFORM_ECDH:
 		return dh_set_input(asym_op, qat_req,
 				cookie, xform);
 	case RTE_CRYPTO_ASYM_XFORM_RSA:
@@ -973,6 +1065,8 @@ qat_asym_collect_response(struct rte_crypto_op *op,
 		return modinv_collect(asym_op, cookie, xform);
 	case RTE_CRYPTO_ASYM_XFORM_DH:
 		return dh_collect(asym_op, cookie, xform);
+	case RTE_CRYPTO_ASYM_XFORM_ECDH:
+		return ecdh_collect(asym_op, cookie, xform);
 	case RTE_CRYPTO_ASYM_XFORM_RSA:
 		return rsa_collect(asym_op, cookie);
 	case RTE_CRYPTO_ASYM_XFORM_ECDSA:

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

UNH-IOL DPDK Community Lab

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

only message in thread, other threads:[~2022-04-07 14:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07 14:49 |WARNING| pw109425 [PATCH] crypto/qat: add ecdh key exchange algorithm 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).