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 C41A943DC8; Tue, 2 Apr 2024 23:56:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D5FC40633; Tue, 2 Apr 2024 23:55:47 +0200 (CEST) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id 829DA4025D for ; Tue, 2 Apr 2024 23:55:43 +0200 (CEST) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-5d8b887bb0cso4606234a12.2 for ; Tue, 02 Apr 2024 14:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1712094943; x=1712699743; 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=lGQ/fKLwoZWtL7JhMACgTFJH8Z35qz/8WeiSE7230JE=; b=jRUNaM07kLsDYZZXzJatsno9WJZupvWHLWu/sz59FGLlbOhL2KUxk9SUcZXe8cMuKP 1FN3MbrpRXGpNvCXUCMAQojUuG3V5Z9raUhHtZZkHQ30c4afIEl9GBbsrVaUkkkSkAbW aJDYckh8/3lgwsXo1mxwwIIlTUu/p9IB9+wGZBVLh/WW142eN+nhIwsCTBtsY1OOmStI L5Mzg0Fu2hHl5qbj/n0PSaTsphfy7MTzv9n848zaASDNYiB8lEOPIqYzd0UmBQpzYZ/p Ull5vT8x69yWF3slSHXy25is9zSZcb7H7K7z1SFphoeZATcNiuJu8seEJ3NH/cFkY0TZ 4PoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712094943; x=1712699743; 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=lGQ/fKLwoZWtL7JhMACgTFJH8Z35qz/8WeiSE7230JE=; b=t2mMTdsid3dpBubII0GGyAjosk+Zj+oBi8ourxQ9U5GAS02sEqFKLl4qmkgIz/x/3s qudULdGjGTOr6hkO8gL3ADz+CW99eLLCgZTwPkSI/pmTDb2xK+HsD+CTgPSP2o63FLS/ d35dQZCVyFEqmVzYvMyfxgy2lCT8uiq9LwfAuKH7WwIER5m3RAMWI6d/CeIiNo1rEJn5 ftIRwSGDugAtlGworhMHo4Qai8u/fdlCmS73lP7H7tU2B83ui1eB5F7y0PcREdwAz9kE kwwZ7a02WNvjNtLz3doY5iC52qCIka96eRt70LKqVJIraGd0j4JGuMaNcINuVwHb9B2x ioDg== X-Gm-Message-State: AOJu0Yw1nlGnZ861PgGGQC5m3ZY1121pTcXi+XdXDkJ4ZoFFuawTMyEO rNnOsS6UcBkCaNj7+C5O0ImeFZmErdmusTRMowV0vz96Pw1zUDuZRdNQaTcRHWolkd7Kl+l+uYa H X-Google-Smtp-Source: AGHT+IEsdkGSDMVcsd2sabj4Sk+bwNcf1CQBhFKsclX7fZPtjTYjh2sZAcubTiPRi0l6WKn2R7khCA== X-Received: by 2002:a05:6a20:9c9a:b0:1a1:3d87:422d with SMTP id mj26-20020a056a209c9a00b001a13d87422dmr16636691pzb.45.1712094942800; Tue, 02 Apr 2024 14:55:42 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id x15-20020a170902820f00b001dddf29b6e8sm11609381pln.299.2024.04.02.14.55.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 14:55:42 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ori Kam Subject: [PATCH v3 03/30] ethdev: replace use of fixed size rte_memcpy Date: Tue, 2 Apr 2024 14:50:19 -0700 Message-ID: <20240402215502.278838-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240402215502.278838-1-stephen@networkplumber.org> References: <20240229225936.483472-1-stephen@networkplumber.org> <20240402215502.278838-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 f1c658f49e..ef62a02607 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 7ab1100ea0..9b831486eb 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