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 88BC943BAE; Fri, 1 Mar 2024 00:01:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40708432BC; Fri, 1 Mar 2024 00:00:40 +0100 (CET) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mails.dpdk.org (Postfix) with ESMTP id 530CF4325A for ; Fri, 1 Mar 2024 00:00:07 +0100 (CET) Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-5cf2d73a183so2067613a12.1 for ; Thu, 29 Feb 2024 15:00:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709247606; x=1709852406; 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=j2GRggaBe0l63nkJ4Ur1Xfc/M4c8TdNUa8v+1VNgYSo=; b=hDbJof8gp7CGKmb4gEMhdeU5GO0kL8vkYNXyjFKHVXp0neahMHNeTFTgUtkj3S3edK pk8JmuOK0EwS7vIpIHhrDYPArerD2FbRnQWvRYsIyTuRdGYVEYbjcFAPGrCr9TiazPVR PIB4hpe7oHxmxYpTyYUcqBK34D8MyqW/ufLg7kTu5QO/DdZC4v8wnmJV9U1XUW1I03Fi yvZSiAD9pjq3WXMhsvPGT2yAqDZapqe0fDNEJPQnQNuLamPdFBNrEJl2tF0HfSqmbv0R ZhFqWhCjB6KLCoat3al/N47SBdZ9ztx446u6W8JOgHkW2zWxzLw6cUXAtXuR5ngRF9gI RYnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709247606; x=1709852406; 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=j2GRggaBe0l63nkJ4Ur1Xfc/M4c8TdNUa8v+1VNgYSo=; b=j/UVXiP+gBxnH0R08IkvqjE6NgWLwHlv67DOuet7NJ1SWbo0SXwaQX4Uj+sTmb+O0F j1bilr8IzR+WwKy5rV3PqIrgihshPxsHVxJC5NqF4cHrMjuamDQ6syexLJ3geCf4saYz RLXb+B0V0V1FElh9oP+7Pam3BmiMpE17ZmrESDtTTsEd20zvkg9cQ3b3LYtlaDZaIo6F +BiWiH8z39PvPVps07S5dbbCUYdXSTcDuij3akCthtS/ewG06dPN2R8LNbC9sqDEhdV/ JsElV4zLqOoU2xH2HkjxKWtvjynjR8YnI+CPazdA59RTOXIjjwQDxU86ZHpN+ODPptKS cqAQ== X-Gm-Message-State: AOJu0YzdLz1eN3jMfhKTDlI00hhK0t6YFY8WO0awwRnWU8h0rUCUG3+e W7A0spL9FDpwcBlZ4rPN4LGSfr1TEIMpc9nRBVOWfQOV2pFYeoX8dtDbvBOPiCECNQaPvUAwCmy l X-Google-Smtp-Source: AGHT+IEgqbI9/RAGGVMWO2+Lxf0jwpNss3MX/XY0bFZb0wDwZUV59rhHZNsMiyWyDNQRV+tYMV/Wag== X-Received: by 2002:a17:90a:8905:b0:29a:72b:df85 with SMTP id u5-20020a17090a890500b0029a072bdf85mr510202pjn.7.1709247606082; Thu, 29 Feb 2024 15:00:06 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id l22-20020a17090b079600b0029a8e5355fcsm1965578pjz.53.2024.02.29.15.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 15:00:05 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anoob Joseph , Volodymyr Fialko Subject: [PATCH 10/71] pdcp: replace use of fixed size rte_memcpy Date: Thu, 29 Feb 2024 14:57:57 -0800 Message-ID: <20240229225936.483472-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240229225936.483472-1-stephen@networkplumber.org> References: <20240229225936.483472-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 9b9b881124b8..6c0693f66629 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