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>,
	Jingjing Wu <jingjing.wu@intel.com>, Kai Ji <kai.ji@intel.com>,
	Fan Zhang <fanzhang.oss@gmail.com>,
	Ashish Gupta <ashish.gupta@marvell.com>
Subject: [PATCH v4 18/30] common: replace use of fixed size rte_memcpy
Date: Fri,  5 Apr 2024 09:53:29 -0700	[thread overview]
Message-ID: <20240405165518.367503-19-stephen@networkplumber.org> (raw)
In-Reply-To: <20240405165518.367503-1-stephen@networkplumber.org>

Automatically generated by devtools/cocci/rte_memcpy.cocci
Also, remove unnecessary includes of rte_memcpy.h

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/common/idpf/idpf_common_device.c   |  4 ++--
 drivers/common/idpf/idpf_common_virtchnl.c | 10 ++++++----
 drivers/common/qat/qat_qp.c                | 10 ++++------
 drivers/compress/qat/qat_comp.c            |  8 ++++----
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/common/idpf/idpf_common_device.c b/drivers/common/idpf/idpf_common_device.c
index 8403ed83f9..37c859f830 100644
--- a/drivers/common/idpf/idpf_common_device.c
+++ b/drivers/common/idpf/idpf_common_device.c
@@ -477,8 +477,8 @@ idpf_vport_init(struct idpf_vport *vport,
 	vport->num_rx_q = vport_info->num_rx_q;
 	vport->num_rx_bufq = vport_info->num_rx_bufq;
 	vport->max_mtu = vport_info->max_mtu;
-	rte_memcpy(vport->default_mac_addr,
-		   vport_info->default_mac_addr, ETH_ALEN);
+	memcpy(vport->default_mac_addr, vport_info->default_mac_addr,
+	       ETH_ALEN);
 	vport->rss_algorithm = vport_info->rss_algorithm;
 	vport->rss_key_size = RTE_MIN(IDPF_RSS_KEY_LEN,
 				      vport_info->rss_key_size);
diff --git a/drivers/common/idpf/idpf_common_virtchnl.c b/drivers/common/idpf/idpf_common_virtchnl.c
index c46ed50eb5..baabfeb216 100644
--- a/drivers/common/idpf/idpf_common_virtchnl.c
+++ b/drivers/common/idpf/idpf_common_virtchnl.c
@@ -290,7 +290,8 @@ idpf_vc_caps_get(struct idpf_adapter *adapter)
 		return err;
 	}
 
-	rte_memcpy(&adapter->caps, args.out_buffer, sizeof(struct virtchnl2_get_capabilities));
+	memcpy(&adapter->caps, args.out_buffer,
+	       sizeof(struct virtchnl2_get_capabilities));
 
 	return 0;
 }
@@ -327,7 +328,8 @@ idpf_vc_vport_create(struct idpf_vport *vport,
 		return err;
 	}
 
-	rte_memcpy(&(vport->vport_info.info), args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE);
+	memcpy(&(vport->vport_info.info), args.out_buffer,
+	       IDPF_DFLT_MBX_BUF_SIZE);
 	return 0;
 }
 
@@ -383,7 +385,7 @@ idpf_vc_queue_grps_add(struct idpf_vport *vport,
 		return err;
 	}
 
-	rte_memcpy(p2p_queue_grps_out, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE);
+	memcpy(p2p_queue_grps_out, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE);
 	return 0;
 }
 
@@ -922,7 +924,7 @@ idpf_vc_ptype_info_query(struct idpf_adapter *adapter,
 	if (err != 0)
 		DRV_LOG(ERR, "Failed to execute command of VIRTCHNL2_OP_GET_PTYPE_INFO");
 
-	rte_memcpy(recv_ptype_info, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE);
+	memcpy(recv_ptype_info, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE);
 	return err;
 }
 
diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
index f95dd33375..0c30c4d8c1 100644
--- a/drivers/common/qat/qat_qp.c
+++ b/drivers/common/qat/qat_qp.c
@@ -871,9 +871,8 @@ qat_cq_get_fw_cipher_crc_cap(struct qat_qp *qp)
 		return -EINVAL;
 	}
 
-	rte_memcpy(src_data_addr,
-			cipher_crc_cap_check_plaintext,
-			sizeof(cipher_crc_cap_check_plaintext));
+	memcpy(src_data_addr, cipher_crc_cap_check_plaintext,
+	       sizeof(cipher_crc_cap_check_plaintext));
 
 	phy_src_addr = rte_mem_virt2iova(src_data_addr);
 	if (phy_src_addr == 0 || phy_src_addr == RTE_BAD_IOVA) {
@@ -892,9 +891,8 @@ qat_cq_get_fw_cipher_crc_cap(struct qat_qp *qp)
 	auth_param = (void *)((uint8_t *)cipher_param +
 			ICP_QAT_FW_HASH_REQUEST_PARAMETERS_OFFSET);
 
-	rte_memcpy(cipher_param->u.cipher_IV_array,
-			cipher_crc_cap_check_iv,
-			sizeof(cipher_crc_cap_check_iv));
+	memcpy(cipher_param->u.cipher_IV_array, cipher_crc_cap_check_iv,
+	       sizeof(cipher_crc_cap_check_iv));
 
 	cipher_param->cipher_offset = cipher_crc_cap_check_cipher_offset;
 	cipher_param->cipher_length =
diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index 559948a46a..5bcbefe395 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -375,7 +375,7 @@ qat_comp_build_multiple_requests(void *in_op, struct qat_qp *qp,
 	QAT_DP_LOG(DEBUG, "op %p, parent_cookie %p", op, parent_cookie);
 
 	/* copy original op to the local variable for restoring later */
-	rte_memcpy(&op_backup, op, sizeof(op_backup));
+	memcpy(&op_backup, op, sizeof(op_backup));
 
 	parent_cookie->nb_child_responses = 0;
 	parent_cookie->nb_children = 0;
@@ -401,7 +401,7 @@ qat_comp_build_multiple_requests(void *in_op, struct qat_qp *qp,
 	}
 
 	/* prepare local dst mbuf */
-	rte_memcpy(&dst_mbuf, op->m_dst, sizeof(dst_mbuf));
+	memcpy(&dst_mbuf, op->m_dst, sizeof(dst_mbuf));
 	rte_pktmbuf_reset(&dst_mbuf);
 	dst_mbuf.buf_len = dst_data_size;
 	dst_mbuf.data_len = dst_data_size;
@@ -457,7 +457,7 @@ qat_comp_build_multiple_requests(void *in_op, struct qat_qp *qp,
 		if (ret < 0) {
 			QAT_DP_LOG(WARNING, "Failed to build child descriptor");
 			/* restore op and clear cookie */
-			rte_memcpy(op, &op_backup, sizeof(op_backup));
+			memcpy(op, &op_backup, sizeof(op_backup));
 			parent_cookie->split_op = 0;
 			parent_cookie->nb_children = 0;
 			return ret;
@@ -468,7 +468,7 @@ qat_comp_build_multiple_requests(void *in_op, struct qat_qp *qp,
 	}
 
 	/* restore backed up original op */
-	rte_memcpy(op, &op_backup, sizeof(op_backup));
+	memcpy(op, &op_backup, sizeof(op_backup));
 
 	if (nb_descr != num_descriptors_built)
 		QAT_DP_LOG(ERR, "split op. expected %d, built %d",
-- 
2.43.0


  parent reply	other threads:[~2024-04-05 16:58 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   ` [PATCH v4 16/30] raw: " Stephen Hemminger
2024-04-05 16:53   ` [PATCH v4 17/30] baseband: " Stephen Hemminger
2024-04-05 16:53   ` Stephen Hemminger [this message]
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-19-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=ashish.gupta@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=jingjing.wu@intel.com \
    --cc=kai.ji@intel.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).