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 F3C9544093; Wed, 22 May 2024 05:31:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D99F940A82; Wed, 22 May 2024 05:30:42 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id 8F4FE4068A for ; Wed, 22 May 2024 05:30:34 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1ed904c2280so5675335ad.2 for ; Tue, 21 May 2024 20:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1716348634; x=1716953434; 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=NUAedrQhl7TyjkW6qXA80Ry0jPZbKPUfTDNo2qGqfCcpvJkC6d4wHtOIUPozPz2uyb k00IPPGyoaVbIWuNbrF8C7FyUyZimpsCy34pcvCsADtepPAaaGOLcjNMBInWXdnHCStl 1DPV5je+4d4hz8oRjQr/oa88xwVbmXSvn+d6wxKuOffxr5FVVKh6IbaPyFElwEB+Vzzy PFt4rbkNbo6GTyEwxQrrx4KoB8eU0waWJ2ZxeBk624O1IBZE3IO5OhISlO6WqxO3tw7P m9hsmhpYk1OXEkCnRLreoMBzi+tC1m4vJtV/yCb6f8bGJz/A8jkBCC8aoqr0rdXweniD ygmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716348634; x=1716953434; 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=p+mZvMsHss7oq7TXuD6SP7sap2pxHWM1dlW93BQlmXc4qGr5+bZGWH7OD0Q2KtG7xX j5FhkkTnYNAbvvJfoEwbvU5wl3xqZakghg0suAWLUPFm1X3lXfY29lhxHfBrwnbz1UDg uli6g3/AGnECDS11N6VR7TlmLwJ6KU3hpbH8OccUiOtlTCm5+ienIrrDRfSvMhSMPNdm 7aVnsXiB1R6tdBGKiRTSHKd3nEv+gF991ePmpVWjLLiWrPhCcNqEhgkUS0mbi4PF64BX B368cQubQYRMzNbr3m6z3xUbUwldd4FJ6MOxx4wuazCdIDekKrMFLJYI6dTY224lwTqx wNaA== X-Gm-Message-State: AOJu0Ywxp0HKVomeSf3lx3gatiXpeNR+HBUBeJH0r9eD6k2Jl3UmHHPA yZR56BrC9JphzPCy0aBBFNsbPT1LqAj59R0ei+fmcflbTGbEDxPRnkYDm9e60ZKK1BQrH8F39E7 xn2c= X-Google-Smtp-Source: AGHT+IF2iXsQIH0eB1GQV6IXMdKobK46kUUtj25ccwbYGTaQoSBfbSF0Q28aAJFphtBlMb5igJJ/cA== X-Received: by 2002:a17:903:245:b0:1e4:4000:a576 with SMTP id d9443c01a7336-1f31c9effbemr8563315ad.43.1716348633766; Tue, 21 May 2024 20:30:33 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f323c70dafsm2264325ad.260.2024.05.21.20.30.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 20:30:33 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anoob Joseph , Volodymyr Fialko Subject: [PATCH v5 10/32] pdcp: replace use of fixed size rte_memcpy Date: Tue, 21 May 2024 20:27:37 -0700 Message-ID: <20240522033009.143100-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240522033009.143100-1-stephen@networkplumber.org> References: <20240403163432.437275-1-stephen@networkplumber.org> <20240522033009.143100-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