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 C4BDB43BAE; Fri, 1 Mar 2024 00:00:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 327FE43267; Fri, 1 Mar 2024 00:00:09 +0100 (CET) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id D5CD642F9D for ; Fri, 1 Mar 2024 00:00:00 +0100 (CET) Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-29a2d0f69a6so1081456a91.3 for ; Thu, 29 Feb 2024 15:00:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709247600; x=1709852400; 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=K+KGhTbHEnBZ+LWTV2nbhkUGGI/qctogtFJZDjHHhJo=; b=VmVev/0AqeRfkYbWKyZpU2te8emlaWBmU7atiHG4HEcUIkSh5wLU1AxImDhbq/TZxR lRQy9S5iV2RKYcEKOQEzXx+k4scCfEb8vav8vPmJRxndEEYBHrxGJCr+x2MyT4QyOBf7 m+5/jFV17U1SIrGZBFLqc9jdvO9AAIPGLPkphLKnt3nxiMhGMQ9ynPikegEb23364ZOB e/zVEh1n8oOs/ftjVvwq9qPCteM+rW+s4VLQrdF8aa2sjC8p7upnckWsiYQGA1EVBz5n jtnQdhm1weqJa7cXGaX+Om0gA2ug0TWkDYvrLKNEmxrhRM0DdJZYkPIgCFlsZgngOwVt OS1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709247600; x=1709852400; 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=K+KGhTbHEnBZ+LWTV2nbhkUGGI/qctogtFJZDjHHhJo=; b=ACAxaufe9QAZ7fW0SrTu6eznaqpKb8LuePusNKPZejMxcj/oDxouMmKprQb9FaZ/hb H7+s8zuk5moOb7ORxM0DTzpV1Y9SnX8d4sZxz1CLKweecEqMgstE6vebuPP3HYFwXknz jgAPnOsQl1XoUyGQmowvDIGkmpAbobzr/3xuKhcvRQA+22oMOXa+kHTBasktRLXrsiKl 4WWRVqhdGrmom3qHFOje3tikPK2AV5C1QV/dDrv7IQbo0h40ppawfpwEli7CgVMMyN3m JtPQcHrwhiTDXIwpD8Lk4u+OiWshGd8e9eAgZI89gjzweKz8owJh3lUJ7PkT/cdksgI2 xPDQ== X-Gm-Message-State: AOJu0Yw6ksyBUkV9baaapWJb0udB5uXRZuoi5CvezU86KeC/CM19gJb7 9LxErJ6cusRY2XN7W5U9BWgW8hD3T6RSZ3ewOuDSM7knifDVu8yxowOzYvmxQ/UMh8oA6dld4BB o X-Google-Smtp-Source: AGHT+IG5Wq6pV2cfL9hx+lBfkgACaqYxc3RLHM4b74AY5jDsiiA98Szh5PWwCQbcGHUKkcqft0p0ag== X-Received: by 2002:a17:90a:fb81:b0:29a:1708:9878 with SMTP id cp1-20020a17090afb8100b0029a17089878mr25518pjb.38.1709247600141; Thu, 29 Feb 2024 15:00:00 -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.14.59.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 14:59:59 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ori Kam Subject: [PATCH 03/71] ethdev: replace use of fixed size rte_memcpy Date: Thu, 29 Feb 2024 14:57:50 -0800 Message-ID: <20240229225936.483472-4-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/ethdev/rte_ethdev.c | 3 +-- lib/ethdev/rte_flow.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index f1c658f49e80..ef62a0260747 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -618,7 +617,7 @@ rte_eth_dev_owner_get(const uint16_t port_id, struct rte_eth_dev_owner *owner) rte_spinlock_lock(rte_mcfg_ethdev_get_lock()); if (eth_dev_shared_data_prepare() != NULL) { - rte_memcpy(owner, ðdev->data->owner, sizeof(*owner)); + memcpy(owner, ðdev->data->owner, sizeof(*owner)); ret = 0; } else { ret = -ENOMEM; diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index 7ab1100ea049..9b831486eb5e 100644 --- a/lib/ethdev/rte_flow.c +++ b/lib/ethdev/rte_flow.c @@ -994,9 +994,8 @@ rte_flow_conv_rule(struct rte_flow_conv_rule *dst, if (src->attr_ro) { off = RTE_ALIGN_CEIL(off, sizeof(double)); if (size && size >= off + sizeof(*dst->attr)) - dst->attr = rte_memcpy - ((void *)((uintptr_t)dst + off), - src->attr_ro, sizeof(*dst->attr)); + dst->attr = memcpy((void *)((uintptr_t)dst + off), + src->attr_ro, sizeof(*dst->attr)); off += sizeof(*dst->attr); } if (src->pattern_ro) { -- 2.43.0