[v4,10/30] pdcp: replace use of fixed size rte_memcpy

Message ID 20240405165518.367503-11-stephen@networkplumber.org (mailing list archive)
State Superseded
Delegated to: Thomas Monjalon
Headers
Series replace use of rte_memcpy with fixed sizes |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger April 5, 2024, 4:53 p.m. UTC
  Automatically generated by devtools/cocci/rte_memcpy.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/pdcp/pdcp_process.c | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)
  

Patch

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