DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Rosen Xu <rosen.xu@intel.com>,
	Sachin Saxena <sachin.saxena@nxp.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>
Subject: [PATCH v4 16/30] raw: replace use of fixed size rte_memcpy
Date: Fri,  5 Apr 2024 09:53:27 -0700	[thread overview]
Message-ID: <20240405165518.367503-17-stephen@networkplumber.org> (raw)
In-Reply-To: <20240405165518.367503-1-stephen@networkplumber.org>

Automatically generated by devtools/cocci/rte_memcpy.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/raw/ifpga/afu_pmd_he_hssi.c         |  3 +--
 drivers/raw/ifpga/afu_pmd_he_lpbk.c         |  3 +--
 drivers/raw/ifpga/afu_pmd_he_mem.c          |  3 +--
 drivers/raw/ifpga/afu_pmd_n3000.c           |  8 ++++----
 drivers/raw/ifpga/ifpga_rawdev.c            | 11 +++++------
 drivers/raw/skeleton/skeleton_rawdev.c      |  8 +++-----
 drivers/raw/skeleton/skeleton_rawdev_test.c |  1 -
 7 files changed, 15 insertions(+), 22 deletions(-)

diff --git a/drivers/raw/ifpga/afu_pmd_he_hssi.c b/drivers/raw/ifpga/afu_pmd_he_hssi.c
index 859f28dcc1..c2aaed9203 100644
--- a/drivers/raw/ifpga/afu_pmd_he_hssi.c
+++ b/drivers/raw/ifpga/afu_pmd_he_hssi.c
@@ -15,7 +15,6 @@
 
 #include <rte_eal.h>
 #include <rte_malloc.h>
-#include <rte_memcpy.h>
 #include <rte_io.h>
 #include <rte_vfio.h>
 #include <bus_pci_driver.h>
@@ -314,7 +313,7 @@ static int he_hssi_config(struct afu_rawdev *dev, void *config,
 	if (cfg->port >= NUM_HE_HSSI_PORTS)
 		return -EINVAL;
 
-	rte_memcpy(&priv->he_hssi_cfg, cfg, sizeof(priv->he_hssi_cfg));
+	memcpy(&priv->he_hssi_cfg, cfg, sizeof(priv->he_hssi_cfg));
 
 	return 0;
 }
diff --git a/drivers/raw/ifpga/afu_pmd_he_lpbk.c b/drivers/raw/ifpga/afu_pmd_he_lpbk.c
index c7c5cda48c..ffb7075c84 100644
--- a/drivers/raw/ifpga/afu_pmd_he_lpbk.c
+++ b/drivers/raw/ifpga/afu_pmd_he_lpbk.c
@@ -15,7 +15,6 @@
 
 #include <rte_eal.h>
 #include <rte_malloc.h>
-#include <rte_memcpy.h>
 #include <rte_io.h>
 #include <rte_vfio.h>
 #include <bus_pci_driver.h>
@@ -363,7 +362,7 @@ static int he_lpbk_config(struct afu_rawdev *dev, void *config,
 	if ((cfg->end < cfg->begin) || (cfg->end > MAX_CACHE_LINES))
 		return -EINVAL;
 
-	rte_memcpy(&priv->he_lpbk_cfg, cfg, sizeof(priv->he_lpbk_cfg));
+	memcpy(&priv->he_lpbk_cfg, cfg, sizeof(priv->he_lpbk_cfg));
 
 	return 0;
 }
diff --git a/drivers/raw/ifpga/afu_pmd_he_mem.c b/drivers/raw/ifpga/afu_pmd_he_mem.c
index a1db533eeb..b799e40d2d 100644
--- a/drivers/raw/ifpga/afu_pmd_he_mem.c
+++ b/drivers/raw/ifpga/afu_pmd_he_mem.c
@@ -14,7 +14,6 @@
 
 #include <rte_eal.h>
 #include <rte_malloc.h>
-#include <rte_memcpy.h>
 #include <rte_io.h>
 #include <rte_vfio.h>
 #include <bus_pci_driver.h>
@@ -126,7 +125,7 @@ static int he_mem_tg_config(struct afu_rawdev *dev, void *config,
 	if (config_size != sizeof(struct rte_pmd_afu_he_mem_tg_cfg))
 		return -EINVAL;
 
-	rte_memcpy(&priv->he_mem_tg_cfg, config, sizeof(priv->he_mem_tg_cfg));
+	memcpy(&priv->he_mem_tg_cfg, config, sizeof(priv->he_mem_tg_cfg));
 
 	return 0;
 }
diff --git a/drivers/raw/ifpga/afu_pmd_n3000.c b/drivers/raw/ifpga/afu_pmd_n3000.c
index 67b3941265..9236c0b153 100644
--- a/drivers/raw/ifpga/afu_pmd_n3000.c
+++ b/drivers/raw/ifpga/afu_pmd_n3000.c
@@ -1867,8 +1867,8 @@ static int n3000_afu_config(struct afu_rawdev *dev, void *config,
 		if ((cfg->nlb_cfg.end < cfg->nlb_cfg.begin) ||
 			(cfg->nlb_cfg.end > MAX_CACHE_LINES))
 			return -EINVAL;
-		rte_memcpy(&priv->nlb_cfg, &cfg->nlb_cfg,
-			sizeof(struct rte_pmd_afu_nlb_cfg));
+		memcpy(&priv->nlb_cfg, &cfg->nlb_cfg,
+		       sizeof(struct rte_pmd_afu_nlb_cfg));
 	} else if (cfg->type == RTE_PMD_AFU_N3000_DMA) {
 		if (cfg->dma_cfg.index >= NUM_N3000_DMA)
 			return -EINVAL;
@@ -1887,8 +1887,8 @@ static int n3000_afu_config(struct afu_rawdev *dev, void *config,
 					cfg->dma_cfg.length);
 			}
 		}
-		rte_memcpy(&priv->dma_cfg, &cfg->dma_cfg,
-			sizeof(struct rte_pmd_afu_dma_cfg));
+		memcpy(&priv->dma_cfg, &cfg->dma_cfg,
+		       sizeof(struct rte_pmd_afu_dma_cfg));
 	} else {
 		IFPGA_RAWDEV_PMD_ERR("Invalid type of N3000 AFU");
 		return -EINVAL;
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index f89bd3f9e2..d5d47e14dd 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -14,7 +14,6 @@
 #include <rte_log.h>
 #include <rte_malloc.h>
 #include <rte_devargs.h>
-#include <rte_memcpy.h>
 #include <rte_pci.h>
 #include <bus_pci_driver.h>
 #include <rte_kvargs.h>
@@ -258,7 +257,7 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev)
 	if (point < 12)
 		return -1;
 	point -= 12;
-	rte_memcpy(ifpga_dev->parent_bdf, &link[point], 12);
+	memcpy(ifpga_dev->parent_bdf, &link[point], 12);
 
 	point = strlen(link1);
 	if (point < 26)
@@ -948,10 +947,10 @@ ifpga_rawdev_pr(struct rte_rawdev *dev,
 		if (ret)
 			return ret;
 
-		rte_memcpy(&afu_pr_conf->afu_id.uuid.uuid_low, uuid.b,
-			sizeof(u64));
-		rte_memcpy(&afu_pr_conf->afu_id.uuid.uuid_high, uuid.b + 8,
-			sizeof(u64));
+		memcpy(&afu_pr_conf->afu_id.uuid.uuid_low, uuid.b,
+		       sizeof(u64));
+		memcpy(&afu_pr_conf->afu_id.uuid.uuid_high, uuid.b + 8,
+		       sizeof(u64));
 
 		IFPGA_RAWDEV_PMD_INFO("%s: uuid_l=0x%lx, uuid_h=0x%lx\n",
 			__func__,
diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index 6e99d35536..256f45cb5d 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -20,7 +20,6 @@
 #include <rte_log.h>
 #include <rte_malloc.h>
 #include <rte_memory.h>
-#include <rte_memcpy.h>
 #include <rte_lcore.h>
 #include <bus_vdev_driver.h>
 
@@ -245,8 +244,8 @@ static int skeleton_rawdev_queue_def_conf(struct rte_rawdev *dev,
 	skelq = &skeldev->queues[queue_id];
 
 	if (queue_id < SKELETON_MAX_QUEUES)
-		rte_memcpy(queue_conf, skelq,
-			sizeof(struct skeleton_rawdev_queue));
+		memcpy(queue_conf, skelq,
+		       sizeof(struct skeleton_rawdev_queue));
 
 	return 0;
 }
@@ -281,8 +280,7 @@ static int skeleton_rawdev_queue_setup(struct rte_rawdev *dev,
 
 	if (skeldev->num_queues > queue_id &&
 	    q->depth < SKELETON_QUEUE_MAX_DEPTH) {
-		rte_memcpy(q, queue_conf,
-			   sizeof(struct skeleton_rawdev_queue));
+		memcpy(q, queue_conf, sizeof(struct skeleton_rawdev_queue));
 		clear_queue_bufs(queue_id);
 	} else {
 		SKELETON_PMD_ERR("Invalid queue configuration");
diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
index b7a7f623aa..dc32c4e29b 100644
--- a/drivers/raw/skeleton/skeleton_rawdev_test.c
+++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
@@ -7,7 +7,6 @@
 #include <rte_common.h>
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
-#include <rte_memcpy.h>
 #include <dev_driver.h>
 #include <rte_rawdev.h>
 #include <bus_vdev_driver.h>
-- 
2.43.0


  parent reply	other threads:[~2024-04-05 16:57 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 16:32 [PATCH 0/2] uuid: enhancements and tests Stephen Hemminger
2024-04-03 16:32 ` [PATCH 1/2] eal: add functions to generate uuid values Stephen Hemminger
2024-04-04 16:11   ` Tyler Retzlaff
2024-04-03 16:32 ` [PATCH 2/2] test: add functional test for uuid Stephen Hemminger
2024-04-03 22:11 ` [PATCH v2 0/2] uuid: add generate functions and tests Stephen Hemminger
2024-04-03 22:11   ` [PATCH v2 1/2] eal: add functions to generate uuid values Stephen Hemminger
2024-04-04 16:16     ` Tyler Retzlaff
2024-04-03 22:11   ` [PATCH v2 2/2] test: add functional test for uuid Stephen Hemminger
2024-04-04 16:18     ` Tyler Retzlaff
2024-04-04 16:22 ` [PATCH v3 0/2] uuid: add generate functions and tests Stephen Hemminger
2024-04-04 16:22   ` [PATCH v3 1/2] eal: add functions to generate uuid values Stephen Hemminger
2024-04-04 16:22   ` [PATCH v3 2/2] test: add functional test for uuid Stephen Hemminger
2024-04-05 16:53 ` [PATCH v4 00/30] replace use of rte_memcpy with fixed sizes Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 01/30] cocci/rte_memcpy: add script to eliminate fixed size rte_memcpy Stephen Hemminger
2024-04-06  9:01     ` Morten Brørup
2024-04-05 16:53   ` [PATCH v4 02/30] eal: replace use of " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 03/30] ethdev: replace uses of rte_memcpy Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 04/30] eventdev: replace use of fixed size rte_memcpy Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 05/30] cryptodev: " Stephen Hemminger
2024-04-10 15:40     ` [EXTERNAL] " Akhil Goyal
2024-04-05 16:53   ` [PATCH v4 06/30] ip_frag: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 07/30] net: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 08/30] lpm: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 09/30] node: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 10/30] pdcp: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 11/30] pipeline: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 12/30] rib: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 13/30] security: " Stephen Hemminger
2024-04-10 15:40     ` [EXTERNAL] " Akhil Goyal
2024-04-05 16:53   ` [PATCH v4 14/30] bus: remove unneeded rte_memcpy.h include Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 15/30] net: replace use of fixed size rte_memcpy Stephen Hemminger
2024-04-05 16:53   ` Stephen Hemminger [this message]
2024-04-05 16:53   ` [PATCH v4 17/30] baseband: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 18/30] common: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 19/30] crypto: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 20/30] " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 21/30] event: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 22/30] mempool: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 23/30] ml/cnxk: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 24/30] app/test-pmd: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 25/30] app/graph: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 26/30] app/test-eventdev: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 27/30] app/test: " Stephen Hemminger
2024-04-10 18:28     ` [EXTERNAL] " Akhil Goyal
2024-04-05 16:53   ` [PATCH v4 28/30] app/test-pipeline: remove unused rte_memcpy.h include Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 29/30] app/test-bbdev: remove unnecessary include of rte_memcpy.h Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 30/30] examples: replace use of fixed size rte_memcpy Stephen Hemminger
2024-04-09 17:05 ` [PATCH v4 0/2] uuid: generator functions and unit test Stephen Hemminger
2024-04-09 17:05   ` [PATCH v4 1/2] eal: add functions to generate uuid values Stephen Hemminger
2024-04-09 17:05   ` [PATCH v4 2/2] test: add functional test for uuid Stephen Hemminger
2024-05-22  3:27 ` [PATCH v5 00/32] replace use of rte_memcpy() with fixed size Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 01/32] cocci/rte_memcpy: add script to eliminate fixed size rte_memcpy Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 02/32] eal: replace use of " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 03/32] ethdev: replace uses of rte_memcpy Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 04/32] eventdev: replace use of fixed size rte_memcpy Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 05/32] cryptodev: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 06/32] ip_frag: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 07/32] net: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 08/32] lpm: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 09/32] node: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 10/32] pdcp: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 11/32] pipeline: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 12/32] rib: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 13/32] security: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 14/32] bus: remove unneeded rte_memcpy.h include Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 15/32] raw: replace use of fixed size rte_memcpy Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 16/32] baseband: " Stephen Hemminger
2024-05-23 18:28     ` Chautru, Nicolas
2024-05-22  3:27   ` [PATCH v5 17/32] common: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 18/32] crypto: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 19/32] event: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 20/32] mempool: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 21/32] ml/cnxk: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 22/32] app/test-pmd: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 23/32] app/graph: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 24/32] app/test-eventdev: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 25/32] app/test: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 26/32] app/test-pipeline: remove unused rte_memcpy.h include Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 27/32] app/test-bbdev: remove unnecessary include of rte_memcpy.h Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 28/32] examples: replace use of fixed size rte_memcpy Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 29/32] net/null: replace use of fixed size memcpy Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 30/32] net/tap: replace use of fixed size rte_memcpy Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 31/32] net/pcap: " Stephen Hemminger
2024-05-22  3:27   ` [PATCH v5 32/32] net/af_xdp:: " Stephen Hemminger
2024-05-26 14:51   ` [PATCH v5 00/32] replace use of rte_memcpy() with fixed size Mattias Rönnblom
2024-05-26 23:32     ` Stephen Hemminger
2024-05-27  6:06       ` Mattias Rönnblom
2024-05-27  6:38       ` Morten Brørup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240405165518.367503-17-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=rosen.xu@intel.com \
    --cc=sachin.saxena@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).