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 9126E43C12; Fri, 1 Mar 2024 18:17:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AFDD8432D6; Fri, 1 Mar 2024 18:17:23 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id AC88642FF9 for ; Fri, 1 Mar 2024 18:17:19 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1d95d67ff45so20173385ad.2 for ; Fri, 01 Mar 2024 09:17:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709313439; x=1709918239; 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=QSPrzs3NPbeoUaWrlj6LM5rEEYR716u85qTFrX/wbFMET5A6wKW9V9IpTcRtqR1eWd noxiL0o8PEekFfCAuYAw8LFbSuEXGHh8GP3gwLcYLPOmf4MJjp7M+2Y2HFk6iBCpxv+D q8cqSJZQQ6QHxNMswqW4QadGnzksQuC8Q31spuFA/r5Mx18cAsfBDgE9G/XDBkJWpDCu deC8MfUIeiM5hGyDUsjPipEp9IPrGekIF2oUcsdU+0KnKMCSvESnvhpN2JIPY2rbQVw2 ykqr/BPHT6pq6+/pK9LYF/oBOwxavi9cOXQdbZsFIOf8N/Q9H8rkqT5dYOP840ks6IgG RZwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709313439; x=1709918239; 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=h+WxEpGsZ+VAlMb57lrauHQEoEpvJ6N42sE5yJD7ZEC3st67xQbCJlmY1IJ2CXIKg1 hG/10+IZH+RRH/ws+2HzV2FxYppSDlutCchSO8yisQc4eI5jXfX1xxd/0+uJg+pU+lep TrmJW0jPiUTWw+GLqheN7P5BbHmQgJyYcZjVpODFJHLRK70FXAlVmHxlINP1ssXFIQDc ObH4GEAGQs2oHroj52TLY/ITR80mGXXcv52SDibJFEjPGW7oScWMVYBaG1wEWtdU+h3m iXnp8ubrE16R8NtsraobhjGuYL3PA7TbL49Ix+030zlUF1hwZkaavNrw8wE1YgmzCti5 Cyuw== X-Gm-Message-State: AOJu0YzSGC4b9rdcUzpPQNod+yL5QCdDm7BO1lhfAugQgeTaemvRd4Xy XpLXmZpEASix9+pGxpGM+6FUTZyrEn26PIIxklBnjvIXtD1yzUDq4EW+NDysHwpGiyjUSEsb8S3 SqQ+Baw== X-Google-Smtp-Source: AGHT+IEHrBAqdXx3uO91qF1nbrmfkQXdyAUZWvxXIwdzB/yMm66G0c80O9U2atK1hr02lbLVxDYpVA== X-Received: by 2002:a17:903:2292:b0:1dc:248:28e6 with SMTP id b18-20020a170903229200b001dc024828e6mr2813555plh.67.1709313438898; Fri, 01 Mar 2024 09:17:18 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id j14-20020a170902da8e00b001dc8d6a9d40sm3695764plx.144.2024.03.01.09.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:17:18 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ori Kam Subject: [PATCH v2 03/71] ethdev: replace use of fixed size rte_memcpy Date: Fri, 1 Mar 2024 09:14:59 -0800 Message-ID: <20240301171707.95242-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240301171707.95242-1-stephen@networkplumber.org> References: <20240229225936.483472-1-stephen@networkplumber.org> <20240301171707.95242-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