From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1C89543E0C; Fri, 5 Apr 2024 18:58:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1939E40F16; Fri, 5 Apr 2024 18:56:06 +0200 (CEST) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id 13BDB40ED1 for ; Fri, 5 Apr 2024 18:56:01 +0200 (CEST) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6ece8991654so2024218b3a.3 for ; Fri, 05 Apr 2024 09:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1712336160; x=1712940960; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ut8oidQqPtJvnNB8dOnwX4A7dlMCwCUZCPkF9PxWdxA=; b=UK86a+PchhO5vEHk6oNDprqrTUYgJu7vBXbBQ7azVY5KR1nrpcPenUthXFJOOF00N8 Mc7p3mXWxlwWGWGXgrYxXi0ntfnkmv0e+c9X2OM2ieUBY89xvq9GEUcvZRT4HJr0gRkU F0ZYqBy80+/QOoFfwm/6Pmr9sYPnaYBcJ0DiWwQk5E2o6P/GSFe+17JHJWlI6B4idpvq /uxgyMXPyc4k8aDDBFGh3DvCfsnTW/33nSkRJ9RLs6XmMiOrL6EEri890fpQkS0024B6 YhvbpzxzkuXQqQYZjh6Bv6vGMw6Vdifm4nwBz5uHDXBR9CVsl5JM6m6z4GgpQNblgkre JYYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712336160; x=1712940960; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ut8oidQqPtJvnNB8dOnwX4A7dlMCwCUZCPkF9PxWdxA=; b=UsxVvUGOHiwoEACnS1a4zKHooFezCdNCdYKfdWE0b2KrySEsGH4rk52ivWxeMvto07 j6gaVRJXvGWht2MUAX/xT7UmdpK9VPS3UpMIsgLR5E763tenEOyXPlcDafqnYwCkN7YY UZb8n1DJZB49Rl9GKWl/Kmj+0G62WEPlwmX7NNr0+16fAL5EUvHLhSXFPeQvf9EJAGeu V4u3AwFEnqdbWxtPdm2HdhAkFi1Ea0CduuyUQRBiyTgczwYpPy/p+p9S7jItqeyThtUY RhKjdaIeGVttGqhrXKtTJRZnoyIt9Bl5YufcD/e5UyT5+wISt7JbQmRRufLXbhAPImQi NyOg== X-Gm-Message-State: AOJu0YxpUBl5UX1x9DtBtPhzSWgCYxu20BiRUQ2dJzoeHh7Oi7WMaFgA DnxIjn8N+r54d7DKfJ2Epe/VJAxriASE1e0Q4HqGnP/phRQEv7zwk4bHGJzFn+zXLtpEUQA8x/M seKE9Tw== X-Google-Smtp-Source: AGHT+IGhpaagz0weFbZQG6US3GGk4dfAJC2E8lUbep9AclyXvI6TuY8egLj/Zi/SNBJ7en2f6pe7Yw== X-Received: by 2002:a05:6a00:4fc7:b0:6ea:749c:7849 with SMTP id le7-20020a056a004fc700b006ea749c7849mr2216032pfb.13.1712336160241; Fri, 05 Apr 2024 09:56:00 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id c2-20020aa781c2000000b006e6c0f8ce1bsm1728555pfn.47.2024.04.05.09.55.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 09:55:59 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Sunil Uttarwar , Ankur Dwivedi , Anoob Joseph , Tejasree Kondoj Subject: [PATCH v4 19/30] crypto: replace use of fixed size rte_memcpy Date: Fri, 5 Apr 2024 09:53:30 -0700 Message-ID: <20240405165518.367503-20-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240405165518.367503-1-stephen@networkplumber.org> References: <20240403163432.437275-1-stephen@networkplumber.org> <20240405165518.367503-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- 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