DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Sunil Uttarwar <sunilprakashrao.uttarwar@amd.com>,
	Ankur Dwivedi <adwivedi@marvell.com>,
	Anoob Joseph <anoobj@marvell.com>,
	Tejasree Kondoj <ktejasree@marvell.com>
Subject: [PATCH v4 19/30] crypto: replace use of fixed size rte_memcpy
Date: Fri,  5 Apr 2024 09:53:30 -0700	[thread overview]
Message-ID: <20240405165518.367503-20-stephen@networkplumber.org> (raw)
In-Reply-To: <20240405165518.367503-1-stephen@networkplumber.org>

Automatically generated by devtools/cocci/rte_memcpy.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/crypto/ccp/ccp_crypto.c          | 14 +++++---------
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c |  2 +-
 drivers/crypto/cnxk/cnxk_se.h            |  2 +-
 3 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 4b84b3303e..4a70bc5d6e 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -168,7 +168,7 @@ static int partial_hash_sha1(uint8_t *data_in, uint8_t *data_out)
 	if (!SHA1_Init(&ctx))
 		return -EFAULT;
 	SHA1_Transform(&ctx, data_in);
-	rte_memcpy(data_out, &ctx, SHA_DIGEST_LENGTH);
+	memcpy(data_out, &ctx, SHA_DIGEST_LENGTH);
 	return 0;
 }
 
@@ -179,8 +179,7 @@ static int partial_hash_sha224(uint8_t *data_in, uint8_t *data_out)
 	if (!SHA224_Init(&ctx))
 		return -EFAULT;
 	SHA256_Transform(&ctx, data_in);
-	rte_memcpy(data_out, &ctx,
-		   SHA256_DIGEST_LENGTH);
+	memcpy(data_out, &ctx, SHA256_DIGEST_LENGTH);
 	return 0;
 }
 
@@ -191,8 +190,7 @@ static int partial_hash_sha256(uint8_t *data_in, uint8_t *data_out)
 	if (!SHA256_Init(&ctx))
 		return -EFAULT;
 	SHA256_Transform(&ctx, data_in);
-	rte_memcpy(data_out, &ctx,
-		   SHA256_DIGEST_LENGTH);
+	memcpy(data_out, &ctx, SHA256_DIGEST_LENGTH);
 	return 0;
 }
 
@@ -203,8 +201,7 @@ static int partial_hash_sha384(uint8_t *data_in, uint8_t *data_out)
 	if (!SHA384_Init(&ctx))
 		return -EFAULT;
 	SHA512_Transform(&ctx, data_in);
-	rte_memcpy(data_out, &ctx,
-		   SHA512_DIGEST_LENGTH);
+	memcpy(data_out, &ctx, SHA512_DIGEST_LENGTH);
 	return 0;
 }
 
@@ -215,8 +212,7 @@ static int partial_hash_sha512(uint8_t *data_in, uint8_t *data_out)
 	if (!SHA512_Init(&ctx))
 		return -EFAULT;
 	SHA512_Transform(&ctx, data_in);
-	rte_memcpy(data_out, &ctx,
-		   SHA512_DIGEST_LENGTH);
+	memcpy(data_out, &ctx, SHA512_DIGEST_LENGTH);
 	return 0;
 }
 
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index 1dd1dbac9a..a67af3ec35 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -959,7 +959,7 @@ cnxk_crypto_cn10k_submit(void *qptr, void *inst, uint16_t nb_inst)
 	lmt_dst = PLT_PTR_CAST(lmt_base);
 
 	for (j = 0; j < i; j++) {
-		rte_memcpy(lmt_dst, inst, sizeof(struct cpt_inst_s));
+		memcpy(lmt_dst, inst, sizeof(struct cpt_inst_s));
 		inst = RTE_PTR_ADD(inst, sizeof(struct cpt_inst_s));
 		lmt_dst = RTE_PTR_ADD(lmt_dst, 2 * sizeof(struct cpt_inst_s));
 	}
diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index c211884dda..e6c1e1586b 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -1161,7 +1161,7 @@ cpt_sm_prep(uint32_t flags, uint64_t d_offs, uint64_t d_lens, struct roc_se_fc_p
 			void *dst = PLT_PTR_ADD(offset_vaddr, ROC_SE_OFF_CTRL_LEN);
 			const uint64_t *src = fc_params->iv_buf;
 
-			rte_memcpy(dst, src, 16);
+			memcpy(dst, src, 16);
 		}
 		inst->w4.u64 = cpt_inst_w4.u64;
 	} else {
-- 
2.43.0


  parent reply	other threads:[~2024-04-05 16:58 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 16:32 [PATCH 0/2] uuid: enhancements and tests Stephen Hemminger
2024-04-03 16:32 ` [PATCH 1/2] eal: add functions to generate uuid values Stephen Hemminger
2024-04-04 16:11   ` Tyler Retzlaff
2024-04-03 16:32 ` [PATCH 2/2] test: add functional test for uuid Stephen Hemminger
2024-04-03 22:11 ` [PATCH v2 0/2] uuid: add generate functions and tests Stephen Hemminger
2024-04-03 22:11   ` [PATCH v2 1/2] eal: add functions to generate uuid values Stephen Hemminger
2024-04-04 16:16     ` Tyler Retzlaff
2024-04-03 22:11   ` [PATCH v2 2/2] test: add functional test for uuid Stephen Hemminger
2024-04-04 16:18     ` Tyler Retzlaff
2024-04-04 16:22 ` [PATCH v3 0/2] uuid: add generate functions and tests Stephen Hemminger
2024-04-04 16:22   ` [PATCH v3 1/2] eal: add functions to generate uuid values Stephen Hemminger
2024-04-04 16:22   ` [PATCH v3 2/2] test: add functional test for uuid Stephen Hemminger
2024-04-05 16:53 ` [PATCH v4 00/30] replace use of rte_memcpy with fixed sizes Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 01/30] cocci/rte_memcpy: add script to eliminate fixed size rte_memcpy Stephen Hemminger
2024-04-06  9:01     ` Morten Brørup
2024-04-05 16:53   ` [PATCH v4 02/30] eal: replace use of " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 03/30] ethdev: replace uses of rte_memcpy Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 04/30] eventdev: replace use of fixed size rte_memcpy Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 05/30] cryptodev: " Stephen Hemminger
2024-04-10 15:40     ` [EXTERNAL] " Akhil Goyal
2024-04-05 16:53   ` [PATCH v4 06/30] ip_frag: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 07/30] net: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 08/30] lpm: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 09/30] node: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 10/30] pdcp: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 11/30] pipeline: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 12/30] rib: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 13/30] security: " Stephen Hemminger
2024-04-10 15:40     ` [EXTERNAL] " Akhil Goyal
2024-04-05 16:53   ` [PATCH v4 14/30] bus: remove unneeded rte_memcpy.h include Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 15/30] net: replace use of fixed size rte_memcpy Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 16/30] raw: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 17/30] baseband: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 18/30] common: " Stephen Hemminger
2024-04-05 16:53   ` Stephen Hemminger [this message]
2024-04-05 16:53   ` [PATCH v4 20/30] crypto: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 21/30] event: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 22/30] mempool: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 23/30] ml/cnxk: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 24/30] app/test-pmd: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 25/30] app/graph: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 26/30] app/test-eventdev: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 27/30] app/test: " Stephen Hemminger
2024-04-10 18:28     ` [EXTERNAL] " Akhil Goyal
2024-04-05 16:53   ` [PATCH v4 28/30] app/test-pipeline: remove unused rte_memcpy.h include Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 29/30] app/test-bbdev: remove unnecessary include of rte_memcpy.h Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 30/30] examples: replace use of fixed size rte_memcpy Stephen Hemminger
2024-04-09 17:05 ` [PATCH v4 0/2] uuid: generator functions and unit test Stephen Hemminger
2024-04-09 17:05   ` [PATCH v4 1/2] eal: add functions to generate uuid values Stephen Hemminger
2024-04-09 17:05   ` [PATCH v4 2/2] test: add functional test for uuid Stephen Hemminger

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=20240405165518.367503-20-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=adwivedi@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=ktejasree@marvell.com \
    --cc=sunilprakashrao.uttarwar@amd.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).