From patchwork Thu Feb 29 22:58:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 137587 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2964C43BAE; Fri, 1 Mar 2024 00:01:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E827A432FC; Fri, 1 Mar 2024 00:00:47 +0100 (CET) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 6706E4325A for ; Fri, 1 Mar 2024 00:00:09 +0100 (CET) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-299dba8fd24so1098943a91.2 for ; Thu, 29 Feb 2024 15:00:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709247608; x=1709852408; 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=f7ShVjOP7v3RAN9c6QxL/R4mkZ6ArXruvMZ0jTEazuM=; b=krwyCyUh32WDu+EhtOpglW2IbbHZAWlar2aJq3pcc6XUEim8ZYS8oyCgAjM5hI1YJp QeR5tSTJoFS3G2cVqptO9tuVEZj46e9J1fUVBM670JazQ5jACD60EqDVKI4ATv34KQeE 37UaLxh+vXtXY5fDcoIZsuXLV5rLkJ3G0N4lZuK85BolgiUOJQrCFz4whhZETjl6clIs bqi/0Flev1JNQENAB5y/PNVqed1sk54UIuuoct54/c5JrC/yGdFo80mv+1cWoCZE9UHO cFKi3VkUJwJOiuGkOm6rigwrZKiDcs+nXB8vKMBVjJmsqpChYDtyAOIrZ59MdW0yjnBJ /bzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709247608; x=1709852408; 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=f7ShVjOP7v3RAN9c6QxL/R4mkZ6ArXruvMZ0jTEazuM=; b=K8clWF3KWV4hj4B0IpOkkTtIb333NjJX0PdYku17u7/W3c0IR1OJc6H6GHhRXX/XXN 1VSaLLPt16zXXUuZkIaOr9RWeSaky+Pmy82sjZgGMjkHCsB/osiJ0HVrW+1Uwzt6S7Fy WV2rWs4d4+6fAADP8Kuz97qSEoVfa3uRAfGOxDsMwwgYpOESEkDEUF202bGc4MgYeZrT sJzKnIsUFNUA3Y0uKYy5aJWrP3iDCEbAz99f4ZJGBCFLzl1BBi+bOhb1F7uy/kPdjJyZ Cp3ubejh7U2opW2IRNCCnqWG/+wIHsX1ANRWd2sUn+vM7i+RgVkrSduNuEycLDS6I3rL 589w== X-Gm-Message-State: AOJu0Yz+4a9Sstx33JSF1XG4IXn/zaoXaj+T8sAfqwSY6WjpUQJ5H/5m xqraKsZtfNU9GtApZlsIswGk5pxgYurpkI7l5L9HAZ4T9wCI5cqFQx7zE2V3cyd++eZzWWwvVTP G X-Google-Smtp-Source: AGHT+IE3AR78b4OOlkoNn8ixdrg+4SD/cylLdvV9ORvuSohPHf1JxeNp+MAFY6lavZF11xzU7PV9YQ== X-Received: by 2002:a17:90a:d58a:b0:29a:2860:28b9 with SMTP id v10-20020a17090ad58a00b0029a286028b9mr14907pju.48.1709247608485; Thu, 29 Feb 2024 15:00:08 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 15:00:08 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Akhil Goyal , Anoob Joseph Subject: [PATCH 13/71] security: replace use of fixed size rte_memcpy Date: Thu, 29 Feb 2024 14:58:00 -0800 Message-ID: <20240229225936.483472-14-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 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/security/rte_security.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c index e5c862f5f570..28d59ef38831 100644 --- a/lib/security/rte_security.c +++ b/lib/security/rte_security.c @@ -384,7 +384,7 @@ crypto_caps_array(struct rte_tel_data *d, while ((dev_caps = &capabilities[i++])->op != RTE_CRYPTO_OP_TYPE_UNDEFINED) { memset(&caps_val, 0, CRYPTO_CAPS_SZ * sizeof(caps_val[0])); - rte_memcpy(caps_val, dev_caps, sizeof(capabilities[0])); + memcpy(caps_val, dev_caps, sizeof(capabilities[0])); for (j = 0; j < CRYPTO_CAPS_SZ; j++) rte_tel_data_add_array_uint(d, caps_val[j]); } @@ -409,7 +409,7 @@ sec_caps_array(struct rte_tel_data *d, while ((dev_caps = &capabilities[i++])->action != RTE_SECURITY_ACTION_TYPE_NONE) { memset(&caps_val, 0, SEC_CAPS_SZ * sizeof(caps_val[0])); - rte_memcpy(caps_val, dev_caps, sizeof(capabilities[0])); + memcpy(caps_val, dev_caps, sizeof(capabilities[0])); for (j = 0; j < SEC_CAPS_SZ; j++) rte_tel_data_add_array_uint(d, caps_val[j]); }