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 49FDB43DC8; Tue, 2 Apr 2024 23:57:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D79140A77; Tue, 2 Apr 2024 23:55:57 +0200 (CEST) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 24E194067A for ; Tue, 2 Apr 2024 23:55:49 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1e0ae065d24so48221935ad.1 for ; Tue, 02 Apr 2024 14:55:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1712094948; x=1712699748; 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=lTPdGr/UGHjV9BDoEi9KOalEaKGR3d/Y7EFFC+9Bq/k=; b=XeKATseZe8YDD9r+5PQYsKUrMM5pIOds17pF/CgOSILXkwBc6GFrx/Fwq/QosRDtJy 7TFhv3+KVM2ueiJYoVp+UyJ6vXf08JydgoM8c8S4SMBpQ9zILbLQJNBhDcwjTECNVrC/ jvJAZUeh5g1ScjsU+A1wHTBXCrW8/x6XjV3HDDuqhDG/ErZJcfqhjumX+/64NvrkwDMZ PfDZJXQACqZBqtA1QG4xLpJ32lwxjyuGEh9EbeDGwN/1BOwGTjDq0zq9pfeZVy6LXvHT JWLTEfAv2/+f6a8NAqFMEVdEeTFzFilNbtLPS91RFg0CcmjEYtQCxrBCjEc1yTLMPuVi QUig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712094948; x=1712699748; 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=lTPdGr/UGHjV9BDoEi9KOalEaKGR3d/Y7EFFC+9Bq/k=; b=a+5h4Mf8MqZZTstaGme3HZekOQiLli4MKK6Qc3rU6nkG+KFD5YVsOL2p8DObwIx+ef OMmrRZIJYBCY+kZm8e+YiatqDTBbvKMhmKoahut8miNCISr/yE/wqr1l6f6i5hhBaDvz BTmMQ4Pd9X22RLMoqTE/erIMZJehTDjZBsfLe389tDL9htbVGMsHO3b9KW2yDfIW3BSA BMZuFdzn6lCC6aDlsvdHplGAd9ovuUMbfcqogFpgfN8QhZiMgM28It5jFTedo9cqnF/f +rElJbBIYXwuMc0goo/lOOIpN1jkaJuWsmHucTUcWk7DQsJ7ANznXEzRNtqu7xpfVaib aybg== X-Gm-Message-State: AOJu0YweyrlW2sh6Wuib5lnvHe6ZlGTzb4rm75qdxHFJC8lqxTO2NtoS G5bPjNAYlmc8uVjEMvnZraqAAIL2d91Z6oZByAejmgnac16aftUR8j65nKVTYJ+9plxKKwb4R0k t X-Google-Smtp-Source: AGHT+IHGNHjF2kxzPwbLw/19SowjyH4Bum5AdtBP2YIiOvEB4KVIv5Qa8W39hfh7sC9Gw2qbYZDccg== X-Received: by 2002:a17:902:c947:b0:1e0:ca47:4d9b with SMTP id i7-20020a170902c94700b001e0ca474d9bmr14430496pla.29.1712094948295; Tue, 02 Apr 2024 14:55:48 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id x15-20020a170902820f00b001dddf29b6e8sm11609381pln.299.2024.04.02.14.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 14:55:47 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anoob Joseph , Volodymyr Fialko Subject: [PATCH v3 10/30] pdcp: replace use of fixed size rte_memcpy Date: Tue, 2 Apr 2024 14:50:26 -0700 Message-ID: <20240402215502.278838-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240402215502.278838-1-stephen@networkplumber.org> References: <20240229225936.483472-1-stephen@networkplumber.org> <20240402215502.278838-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 --- lib/pdcp/pdcp_process.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/pdcp/pdcp_process.c b/lib/pdcp/pdcp_process.c index 9b9b881124..6c0693f666 100644 --- a/lib/pdcp/pdcp_process.c +++ b/lib/pdcp/pdcp_process.c @@ -60,7 +60,7 @@ pdcp_iv_gen_null_aes_cmac(struct rte_crypto_op *cop, const struct entity_priv *e m = en_priv->auth_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(m_ptr, &m, 8); + memcpy(m_ptr, &m, 8); } static void @@ -72,10 +72,10 @@ pdcp_iv_gen_null_zs(struct rte_crypto_op *cop, const struct entity_priv *en_priv iv = rte_crypto_op_ctod_offset(cop, uint8_t *, PDCP_IV_OFFSET); iv_u64[0] = en_priv->auth_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(iv, &iv_u64[0], 8); + memcpy(iv, &iv_u64[0], 8); iv_u64[1] = iv_u64[0] ^ en_priv->auth_iv_part.u64[1]; - rte_memcpy(iv + 8, &iv_u64[1], 8); + memcpy(iv + 8, &iv_u64[1], 8); } static void @@ -89,7 +89,7 @@ pdcp_iv_gen_aes_ctr_null(struct rte_crypto_op *cop, const struct entity_priv *en iv_u64[0] = en_priv->cipher_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); iv_u64[1] = 0; - rte_memcpy(iv, iv_u64, 16); + memcpy(iv, iv_u64, 16); } static void @@ -101,8 +101,8 @@ pdcp_iv_gen_zs_null(struct rte_crypto_op *cop, const struct entity_priv *en_priv iv = rte_crypto_op_ctod_offset(cop, uint8_t *, PDCP_IV_OFFSET); iv_u64 = en_priv->cipher_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(iv, &iv_u64, 8); - rte_memcpy(iv + 8, &iv_u64, 8); + memcpy(iv, &iv_u64, 8); + memcpy(iv + 8, &iv_u64, 8); } static void @@ -115,17 +115,17 @@ pdcp_iv_gen_zs_zs(struct rte_crypto_op *cop, const struct entity_priv *en_priv, /* Generating cipher IV */ iv_u64[0] = en_priv->cipher_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(iv, &iv_u64[0], 8); - rte_memcpy(iv + 8, &iv_u64[0], 8); + memcpy(iv, &iv_u64[0], 8); + memcpy(iv + 8, &iv_u64[0], 8); iv += PDCP_IV_LEN; /* Generating auth IV */ iv_u64[0] = en_priv->auth_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(iv, &iv_u64[0], 8); + memcpy(iv, &iv_u64[0], 8); iv_u64[1] = iv_u64[0] ^ en_priv->auth_iv_part.u64[1]; - rte_memcpy(iv + 8, &iv_u64[1], 8); + memcpy(iv + 8, &iv_u64[1], 8); } static void @@ -140,12 +140,12 @@ pdcp_iv_gen_zs_aes_cmac(struct rte_crypto_op *cop, const struct entity_priv *en_ iv = rte_crypto_op_ctod_offset(cop, uint8_t *, PDCP_IV_OFFSET); iv_u64[0] = en_priv->cipher_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(iv, &iv_u64[0], 8); - rte_memcpy(iv + 8, &iv_u64[0], 8); + memcpy(iv, &iv_u64[0], 8); + memcpy(iv + 8, &iv_u64[0], 8); m_ptr = (uint8_t *)rte_pktmbuf_prepend(mb, 8); m = en_priv->auth_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(m_ptr, &m, 8); + memcpy(m_ptr, &m, 8); } static void @@ -162,11 +162,11 @@ pdcp_iv_gen_aes_ctr_aes_cmac(struct rte_crypto_op *cop, const struct entity_priv iv_u64[0] = en_priv->cipher_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); iv_u64[1] = 0; - rte_memcpy(iv, iv_u64, PDCP_IV_LEN); + memcpy(iv, iv_u64, PDCP_IV_LEN); m_ptr = (uint8_t *)rte_pktmbuf_prepend(mb, 8); m = en_priv->auth_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(m_ptr, &m, 8); + memcpy(m_ptr, &m, 8); } static void @@ -179,15 +179,15 @@ pdcp_iv_gen_aes_ctr_zs(struct rte_crypto_op *cop, const struct entity_priv *en_p iv_u64[0] = en_priv->cipher_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); iv_u64[1] = 0; - rte_memcpy(iv, iv_u64, PDCP_IV_LEN); + memcpy(iv, iv_u64, PDCP_IV_LEN); iv += PDCP_IV_LEN; iv_u64[0] = en_priv->auth_iv_part.u64[0] | ((uint64_t)(rte_cpu_to_be_32(count))); - rte_memcpy(iv, &iv_u64[0], 8); + memcpy(iv, &iv_u64[0], 8); iv_u64[1] = iv_u64[0] ^ en_priv->auth_iv_part.u64[1]; - rte_memcpy(iv + 8, &iv_u64[1], 8); + memcpy(iv + 8, &iv_u64[1], 8); } static int -- 2.43.0