* [RFC PATCH 1/8] net/ice: replace use of DPDK-specific memcpy function
2026-05-19 16:05 [RFC PATCH 0/8] remove use of rte_memcpy from net/intel Bruce Richardson
@ 2026-05-19 16:05 ` Bruce Richardson
2026-05-19 16:05 ` [RFC PATCH 2/8] net/iavf: " Bruce Richardson
` (8 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2026-05-19 16:05 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
The driver use of memcpy is for control path work, for example, flow
configuration and so is fine using the standard libc memcpy function in
place of the DPDK-specific rte_memcpy version.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/ice/base/ice_osdep.h | 5 ++--
drivers/net/intel/ice/ice_dcf.c | 14 ++++-----
drivers/net/intel/ice/ice_dcf_ethdev.c | 10 +++----
drivers/net/intel/ice/ice_dcf_parent.c | 2 +-
drivers/net/intel/ice/ice_dcf_sched.c | 6 ++--
drivers/net/intel/ice/ice_diagnose.c | 4 +--
drivers/net/intel/ice/ice_ethdev.c | 12 ++++----
drivers/net/intel/ice/ice_fdir_filter.c | 36 ++++++++++++------------
drivers/net/intel/ice/ice_generic_flow.c | 4 +--
drivers/net/intel/ice/ice_hash.c | 2 +-
drivers/net/intel/ice/ice_tm.c | 2 +-
11 files changed, 48 insertions(+), 49 deletions(-)
diff --git a/drivers/net/intel/ice/base/ice_osdep.h b/drivers/net/intel/ice/base/ice_osdep.h
index 21c460d007..5d92cf5aa4 100644
--- a/drivers/net/intel/ice/base/ice_osdep.h
+++ b/drivers/net/intel/ice/base/ice_osdep.h
@@ -14,7 +14,6 @@
#include <stdbool.h>
#include <rte_common.h>
-#include <rte_memcpy.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_byteorder.h>
@@ -210,7 +209,7 @@ struct __rte_packed_begin ice_virt_mem {
#define ice_free(h, m) ((void)h, rte_free(m))
#define ice_memset(a, b, c, d) memset((a), (b), (c))
-#define ice_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
+#define ice_memcpy(a, b, c, d) memcpy((a), (b), (c))
/* Memory fence barrier */
#define ice_memfence_read() rte_io_rmb()
@@ -238,7 +237,7 @@ ice_memdup(__rte_unused struct ice_hw *hw, const void *src, size_t size,
p = ice_malloc(hw, size);
if (p)
- rte_memcpy(p, src, size);
+ memcpy(p, src, size);
return p;
}
diff --git a/drivers/net/intel/ice/ice_dcf.c b/drivers/net/intel/ice/ice_dcf.c
index 51716a4d5b..98ae0f8980 100644
--- a/drivers/net/intel/ice/ice_dcf.c
+++ b/drivers/net/intel/ice/ice_dcf.c
@@ -268,7 +268,7 @@ ice_dcf_aq_cmd_handle(struct ice_dcf_hw *hw, struct iavf_arq_event_info *info)
cmd->rsp_msglen = RTE_MIN(info->msg_len,
cmd->rsp_buflen);
if (likely(cmd->rsp_msglen != 0))
- rte_memcpy(cmd->rsp_msgbuf, info->msg_buf,
+ memcpy(cmd->rsp_msgbuf, info->msg_buf,
cmd->rsp_msglen);
/* prevent compiler reordering */
@@ -453,7 +453,7 @@ ice_dcf_get_vf_vsi_map(struct ice_dcf_hw *hw)
return 1;
}
- rte_memcpy(hw->vf_vsi_map, vsi_map->vf_vsi, len);
+ memcpy(hw->vf_vsi_map, vsi_map->vf_vsi, len);
return 0;
}
@@ -731,7 +731,7 @@ dcf_get_vlan_offload_caps_v2(struct ice_dcf_hw *hw)
return ret;
}
- rte_memcpy(&hw->vlan_v2_caps, &vlan_v2_caps, sizeof(vlan_v2_caps));
+ memcpy(&hw->vlan_v2_caps, &vlan_v2_caps, sizeof(vlan_v2_caps));
return 0;
}
@@ -931,7 +931,7 @@ ice_dcf_configure_rss_key(struct ice_dcf_hw *hw)
rss_key->vsi_id = hw->vsi_res->vsi_id;
rss_key->key_len = hw->vf_res->rss_key_size;
- rte_memcpy(rss_key->key, hw->rss_key, hw->vf_res->rss_key_size);
+ memcpy(rss_key->key, hw->rss_key, hw->vf_res->rss_key_size);
args.v_op = VIRTCHNL_OP_CONFIG_RSS_KEY;
args.req_msglen = len;
@@ -963,7 +963,7 @@ ice_dcf_configure_rss_lut(struct ice_dcf_hw *hw)
rss_lut->vsi_id = hw->vsi_res->vsi_id;
rss_lut->lut_entries = hw->vf_res->rss_lut_size;
- rte_memcpy(rss_lut->lut, hw->rss_lut, hw->vf_res->rss_lut_size);
+ memcpy(rss_lut->lut, hw->rss_lut, hw->vf_res->rss_lut_size);
args.v_op = VIRTCHNL_OP_CONFIG_RSS_LUT;
args.req_msglen = len;
@@ -1130,7 +1130,7 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
for (i = 0; i < hw->vf_res->rss_key_size; i++)
hw->rss_key[i] = (uint8_t)rte_rand();
else
- rte_memcpy(hw->rss_key, rss_conf->rss_key,
+ memcpy(hw->rss_key, rss_conf->rss_key,
RTE_MIN(rss_conf->rss_key_len,
hw->vf_res->rss_key_size));
@@ -1406,7 +1406,7 @@ ice_dcf_add_del_all_mac_addr(struct ice_dcf_hw *hw,
return -ENOMEM;
}
- rte_memcpy(list->list[0].addr, addr->addr_bytes,
+ memcpy(list->list[0].addr, addr->addr_bytes,
sizeof(addr->addr_bytes));
PMD_DRV_LOG(DEBUG, "add/rm mac:" RTE_ETHER_ADDR_PRT_FMT,
diff --git a/drivers/net/intel/ice/ice_dcf_ethdev.c b/drivers/net/intel/ice/ice_dcf_ethdev.c
index 0d3599d7d0..4fce59617e 100644
--- a/drivers/net/intel/ice/ice_dcf_ethdev.c
+++ b/drivers/net/intel/ice/ice_dcf_ethdev.c
@@ -1336,7 +1336,7 @@ ice_dcf_dev_rss_reta_update(struct rte_eth_dev *dev,
return -ENOMEM;
}
/* store the old lut table temporarily */
- rte_memcpy(lut, hw->rss_lut, reta_size);
+ memcpy(lut, hw->rss_lut, reta_size);
for (i = 0; i < reta_size; i++) {
idx = i / RTE_ETH_RETA_GROUP_SIZE;
@@ -1345,11 +1345,11 @@ ice_dcf_dev_rss_reta_update(struct rte_eth_dev *dev,
lut[i] = reta_conf[idx].reta[shift];
}
- rte_memcpy(hw->rss_lut, lut, reta_size);
+ memcpy(hw->rss_lut, lut, reta_size);
/* send virtchnnl ops to configure rss*/
ret = ice_dcf_configure_rss_lut(hw);
if (ret) /* revert back */
- rte_memcpy(hw->rss_lut, lut, reta_size);
+ memcpy(hw->rss_lut, lut, reta_size);
free(lut);
return ret;
@@ -1399,7 +1399,7 @@ ice_dcf_set_rss_key(struct ice_dcf_hw *hw, uint8_t *key, uint8_t key_len)
return -EINVAL;
}
- rte_memcpy(hw->rss_key, key, key_len);
+ memcpy(hw->rss_key, key, key_len);
return ice_dcf_configure_rss_key(hw);
}
@@ -1456,7 +1456,7 @@ ice_dcf_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
return 0;
rss_conf->rss_key_len = hw->vf_res->rss_key_size;
- rte_memcpy(rss_conf->rss_key, hw->rss_key, rss_conf->rss_key_len);
+ memcpy(rss_conf->rss_key, hw->rss_key, rss_conf->rss_key_len);
return 0;
}
diff --git a/drivers/net/intel/ice/ice_dcf_parent.c b/drivers/net/intel/ice/ice_dcf_parent.c
index f92bd5e726..2c7d94b50d 100644
--- a/drivers/net/intel/ice/ice_dcf_parent.c
+++ b/drivers/net/intel/ice/ice_dcf_parent.c
@@ -418,7 +418,7 @@ ice_dcf_load_pkg(struct ice_adapter *adapter)
use_dsn = ice_dcf_execute_virtchnl_cmd(&dcf_adapter->real_hw, &vc_cmd) == 0;
if (use_dsn)
- rte_memcpy(&dsn, pkg_info.dsn, sizeof(dsn));
+ memcpy(&dsn, pkg_info.dsn, sizeof(dsn));
return ice_load_pkg(adapter, use_dsn, dsn);
}
diff --git a/drivers/net/intel/ice/ice_dcf_sched.c b/drivers/net/intel/ice/ice_dcf_sched.c
index 948774a282..19185ca308 100644
--- a/drivers/net/intel/ice/ice_dcf_sched.c
+++ b/drivers/net/intel/ice/ice_dcf_sched.c
@@ -310,7 +310,7 @@ ice_dcf_node_add(struct rte_eth_dev *dev, uint32_t node_id,
tm_node->id = node_id;
tm_node->parent = NULL;
tm_node->reference_count = 0;
- rte_memcpy(&tm_node->params, params,
+ memcpy(&tm_node->params, params,
sizeof(struct rte_tm_node_params));
hw->tm_conf.root = tm_node;
@@ -375,7 +375,7 @@ ice_dcf_node_add(struct rte_eth_dev *dev, uint32_t node_id,
tm_node->shaper_profile = shaper_profile;
tm_node->reference_count = 0;
tm_node->parent = parent_node;
- rte_memcpy(&tm_node->params, params,
+ memcpy(&tm_node->params, params,
sizeof(struct rte_tm_node_params));
if (parent_node_type == ICE_DCF_TM_NODE_TYPE_PORT) {
TAILQ_INSERT_TAIL(&hw->tm_conf.tc_list,
@@ -522,7 +522,7 @@ ice_dcf_shaper_profile_add(struct rte_eth_dev *dev,
if (!shaper_profile)
return -ENOMEM;
shaper_profile->shaper_profile_id = shaper_profile_id;
- rte_memcpy(&shaper_profile->profile, profile,
+ memcpy(&shaper_profile->profile, profile,
sizeof(struct rte_tm_shaper_params));
TAILQ_INSERT_TAIL(&hw->tm_conf.shaper_profile_list,
shaper_profile, node);
diff --git a/drivers/net/intel/ice/ice_diagnose.c b/drivers/net/intel/ice/ice_diagnose.c
index a58279a116..4946ace7ae 100644
--- a/drivers/net/intel/ice/ice_diagnose.c
+++ b/drivers/net/intel/ice/ice_diagnose.c
@@ -363,13 +363,13 @@ ice_dump_pkg(struct rte_eth_dev *dev, uint8_t **buff, uint32_t *size)
count = *size / ICE_PKG_BUF_SIZE;
for (i = 0; i < count; i++) {
next_buff = (uint8_t *)(*buff) + i * ICE_PKG_BUF_SIZE;
- rte_memcpy(pkg_buff.buf, next_buff, ICE_PKG_BUF_SIZE);
+ memcpy(pkg_buff.buf, next_buff, ICE_PKG_BUF_SIZE);
if (ice_aq_upload_section(hw,
(struct ice_buf_hdr *)&pkg_buff.buf[0],
ICE_PKG_BUF_SIZE,
NULL))
return -EINVAL;
- rte_memcpy(next_buff, pkg_buff.buf, ICE_PKG_BUF_SIZE);
+ memcpy(next_buff, pkg_buff.buf, ICE_PKG_BUF_SIZE);
}
cache_size = sizeof(struct ice_package_header) + *size;
diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
index 0f2e7aee14..9ffbce2ae5 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -3697,7 +3697,7 @@ ice_get_default_rss_key(uint8_t *rss_key, uint32_t rss_key_size)
key[i] = (uint8_t)rte_rand();
default_key_done = true;
}
- rte_memcpy(rss_key, key, RTE_MIN(rss_key_size, sizeof(default_key)));
+ memcpy(rss_key, key, RTE_MIN(rss_key_size, sizeof(default_key)));
}
static int ice_init_rss(struct ice_pf *pf)
@@ -3752,13 +3752,13 @@ static int ice_init_rss(struct ice_pf *pf)
if (!rss_conf->rss_key)
ice_get_default_rss_key(vsi->rss_key, vsi->rss_key_size);
else
- rte_memcpy(vsi->rss_key, rss_conf->rss_key,
+ memcpy(vsi->rss_key, rss_conf->rss_key,
RTE_MIN(rss_conf->rss_key_len,
vsi->rss_key_size));
- rte_memcpy(key.standard_rss_key, vsi->rss_key,
+ memcpy(key.standard_rss_key, vsi->rss_key,
ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE);
- rte_memcpy(key.extended_hash_key,
+ memcpy(key.extended_hash_key,
&vsi->rss_key[ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE],
ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE);
ret = ice_aq_set_rss_key(hw, vsi->idx, &key);
@@ -5156,7 +5156,7 @@ ice_vsi_config_vlan_filter(struct ice_vsi *vsi, bool on)
vsi->info.sw_flags2 &= ~sw_flags2;
vsi->info.sw_id = hw->port_info->sw_id;
- (void)rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
+ (void)memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
ctxt.info.valid_sections =
rte_cpu_to_le_16(ICE_AQ_VSI_PROP_SW_VALID |
ICE_AQ_VSI_PROP_SECURITY_VALID);
@@ -5911,7 +5911,7 @@ ice_vsi_vlan_pvid_set(struct ice_vsi *vsi, struct ice_vsi_vlan_pvid_info *info)
ICE_AQ_VSI_INNER_VLAN_EMODE_M);
vsi->info.inner_vlan_flags |= vlan_flags;
memset(&ctxt, 0, sizeof(ctxt));
- rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
+ memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
ctxt.info.valid_sections =
rte_cpu_to_le_16(ICE_AQ_VSI_PROP_VLAN_VALID);
ctxt.vsi_num = vsi->vsi_id;
diff --git a/drivers/net/intel/ice/ice_fdir_filter.c b/drivers/net/intel/ice/ice_fdir_filter.c
index 3522d77123..2276a198fc 100644
--- a/drivers/net/intel/ice/ice_fdir_filter.c
+++ b/drivers/net/intel/ice/ice_fdir_filter.c
@@ -1268,7 +1268,7 @@ ice_fdir_add_del_raw(struct ice_pf *pf,
struct ice_hw *hw = ICE_PF_TO_HW(pf);
unsigned char *pkt = (unsigned char *)pf->fdir.prg_pkt;
- rte_memcpy(pkt, filter->pkt_buf, filter->pkt_len);
+ memcpy(pkt, filter->pkt_buf, filter->pkt_len);
struct ice_fltr_desc desc;
memset(&desc, 0, sizeof(desc));
@@ -1315,16 +1315,16 @@ ice_fdir_extract_fltr_key(struct ice_fdir_fltr_pattern *key,
memset(key, 0, sizeof(*key));
key->flow_type = input->flow_type;
- rte_memcpy(&key->ip, &input->ip, sizeof(key->ip));
- rte_memcpy(&key->mask, &input->mask, sizeof(key->mask));
- rte_memcpy(&key->ext_data, &input->ext_data, sizeof(key->ext_data));
- rte_memcpy(&key->ext_mask, &input->ext_mask, sizeof(key->ext_mask));
+ memcpy(&key->ip, &input->ip, sizeof(key->ip));
+ memcpy(&key->mask, &input->mask, sizeof(key->mask));
+ memcpy(&key->ext_data, &input->ext_data, sizeof(key->ext_data));
+ memcpy(&key->ext_mask, &input->ext_mask, sizeof(key->ext_mask));
- rte_memcpy(&key->gtpu_data, &input->gtpu_data, sizeof(key->gtpu_data));
- rte_memcpy(&key->gtpu_mask, &input->gtpu_mask, sizeof(key->gtpu_mask));
+ memcpy(&key->gtpu_data, &input->gtpu_data, sizeof(key->gtpu_data));
+ memcpy(&key->gtpu_mask, &input->gtpu_mask, sizeof(key->gtpu_mask));
- rte_memcpy(&key->l2tpv2_data, &input->l2tpv2_data, sizeof(key->l2tpv2_data));
- rte_memcpy(&key->l2tpv2_mask, &input->l2tpv2_mask, sizeof(key->l2tpv2_mask));
+ memcpy(&key->l2tpv2_data, &input->l2tpv2_data, sizeof(key->l2tpv2_data));
+ memcpy(&key->l2tpv2_mask, &input->l2tpv2_mask, sizeof(key->l2tpv2_mask));
key->tunnel_type = filter->tunnel_type;
}
@@ -1452,7 +1452,7 @@ ice_fdir_create_filter(struct ice_adapter *ad,
if (!entry)
goto error;
- rte_memcpy(entry, filter, sizeof(*filter));
+ memcpy(entry, filter, sizeof(*filter));
flow->rule = entry;
@@ -1513,7 +1513,7 @@ ice_fdir_create_filter(struct ice_adapter *ad,
if (filter->mark_flag == 1)
ice_fdir_rx_parsing_enable(ad, 1);
- rte_memcpy(entry, filter, sizeof(*entry));
+ memcpy(entry, filter, sizeof(*entry));
ret = ice_fdir_entry_insert(pf, entry, &key);
if (ret) {
rte_flow_error_set(error, -ret,
@@ -1812,7 +1812,7 @@ ice_fdir_parse_action(struct ice_adapter *ad,
act_count = actions->conf;
filter->input.cnt_ena = ICE_FXD_FLTR_QW0_STAT_ENA_PKTS;
- rte_memcpy(&filter->act_count, act_count,
+ memcpy(&filter->act_count, act_count,
sizeof(filter->act_count));
break;
@@ -2036,7 +2036,7 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
ret_val = -ENOMEM;
goto raw_error;
}
- rte_memcpy(pkt_buf, tmp_spec, pkt_len);
+ memcpy(pkt_buf, tmp_spec, pkt_len);
filter->pkt_buf = pkt_buf;
filter->pkt_len = pkt_len;
@@ -2086,11 +2086,11 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
p_ext_data = (tunnel_type && is_outer) ?
&filter->input.ext_data_outer :
&filter->input.ext_data;
- rte_memcpy(&p_ext_data->src_mac,
+ memcpy(&p_ext_data->src_mac,
ð_spec->hdr.src_addr, RTE_ETHER_ADDR_LEN);
- rte_memcpy(&p_ext_data->dst_mac,
+ memcpy(&p_ext_data->dst_mac,
ð_spec->hdr.dst_addr, RTE_ETHER_ADDR_LEN);
- rte_memcpy(&p_ext_data->ether_type,
+ memcpy(&p_ext_data->ether_type,
ð_spec->hdr.ether_type, sizeof(eth_spec->hdr.ether_type));
break;
case RTE_FLOW_ITEM_TYPE_IPV4:
@@ -2256,8 +2256,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
if (ipv6_mask->hdr.hop_limits == UINT8_MAX)
*input_set |= ICE_INSET_IPV6_HOP_LIMIT;
- rte_memcpy(&p_v6->dst_ip, &ipv6_spec->hdr.dst_addr, 16);
- rte_memcpy(&p_v6->src_ip, &ipv6_spec->hdr.src_addr, 16);
+ memcpy(&p_v6->dst_ip, &ipv6_spec->hdr.dst_addr, 16);
+ memcpy(&p_v6->src_ip, &ipv6_spec->hdr.src_addr, 16);
vtc_flow_cpu = rte_be_to_cpu_32(ipv6_spec->hdr.vtc_flow);
p_v6->tc = (uint8_t)(vtc_flow_cpu >> ICE_FDIR_IPV6_TC_OFFSET);
p_v6->proto = ipv6_spec->hdr.proto;
diff --git a/drivers/net/intel/ice/ice_generic_flow.c b/drivers/net/intel/ice/ice_generic_flow.c
index 62f0c334a1..a3ddbc65a6 100644
--- a/drivers/net/intel/ice/ice_generic_flow.c
+++ b/drivers/net/intel/ice/ice_generic_flow.c
@@ -2121,7 +2121,7 @@ ice_pattern_skip_void_item(struct rte_flow_item *items,
pe = ice_find_first_item(pb + 1, true);
cpy_count = pe - pb;
- rte_memcpy(items, pb, sizeof(struct rte_flow_item) * cpy_count);
+ memcpy(items, pb, sizeof(struct rte_flow_item) * cpy_count);
items += cpy_count;
@@ -2132,7 +2132,7 @@ ice_pattern_skip_void_item(struct rte_flow_item *items,
pb = pe + 1;
}
/* Copy the END item. */
- rte_memcpy(items, pe, sizeof(struct rte_flow_item));
+ memcpy(items, pe, sizeof(struct rte_flow_item));
}
/* Check if the pattern matches a supported item type array */
diff --git a/drivers/net/intel/ice/ice_hash.c b/drivers/net/intel/ice/ice_hash.c
index 77829e607b..51916ff6d7 100644
--- a/drivers/net/intel/ice/ice_hash.c
+++ b/drivers/net/intel/ice/ice_hash.c
@@ -751,7 +751,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
if (ret)
goto free_mem;
- rte_memcpy(&meta->raw.prof, &prof, sizeof(prof));
+ memcpy(&meta->raw.prof, &prof, sizeof(prof));
free_mem:
free(pkt_buf);
diff --git a/drivers/net/intel/ice/ice_tm.c b/drivers/net/intel/ice/ice_tm.c
index ff53f2acfd..0285ee3be8 100644
--- a/drivers/net/intel/ice/ice_tm.c
+++ b/drivers/net/intel/ice/ice_tm.c
@@ -356,7 +356,7 @@ ice_shaper_profile_add(struct rte_eth_dev *dev,
if (!shaper_profile)
return -ENOMEM;
shaper_profile->shaper_profile_id = shaper_profile_id;
- rte_memcpy(&shaper_profile->profile, profile,
+ memcpy(&shaper_profile->profile, profile,
sizeof(struct rte_tm_shaper_params));
TAILQ_INSERT_TAIL(&pf->tm_conf.shaper_profile_list,
shaper_profile, node);
--
2.51.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [RFC PATCH 2/8] net/iavf: replace use of DPDK-specific memcpy function
2026-05-19 16:05 [RFC PATCH 0/8] remove use of rte_memcpy from net/intel Bruce Richardson
2026-05-19 16:05 ` [RFC PATCH 1/8] net/ice: replace use of DPDK-specific memcpy function Bruce Richardson
@ 2026-05-19 16:05 ` Bruce Richardson
2026-05-19 16:06 ` [RFC PATCH 3/8] net/i40e: " Bruce Richardson
` (7 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2026-05-19 16:05 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
The driver use of memcpy is for control path work, for example, flow
configuration and so is fine using the standard libc memcpy function in
place of the DPDK-specific rte_memcpy version.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/iavf/base/iavf_osdep.h | 3 +-
drivers/net/intel/iavf/iavf_ethdev.c | 12 +++---
drivers/net/intel/iavf/iavf_fdir.c | 46 +++++++++++-----------
drivers/net/intel/iavf/iavf_fsub.c | 26 ++++++------
drivers/net/intel/iavf/iavf_generic_flow.c | 4 +-
drivers/net/intel/iavf/iavf_hash.c | 4 +-
drivers/net/intel/iavf/iavf_tm.c | 6 +--
drivers/net/intel/iavf/iavf_vchnl.c | 14 +++----
8 files changed, 57 insertions(+), 58 deletions(-)
diff --git a/drivers/net/intel/iavf/base/iavf_osdep.h b/drivers/net/intel/iavf/base/iavf_osdep.h
index 1b0ca933cc..cb95b848b6 100644
--- a/drivers/net/intel/iavf/base/iavf_osdep.h
+++ b/drivers/net/intel/iavf/base/iavf_osdep.h
@@ -12,7 +12,6 @@
#include <stdarg.h>
#include <rte_common.h>
-#include <rte_memcpy.h>
#include <rte_memzone.h>
#include <rte_malloc.h>
#include <rte_byteorder.h>
@@ -124,7 +123,7 @@ writeq(uint64_t value, volatile void *addr)
#endif /* __INTEL_NET_BASE_OSDEP__ */
#define iavf_memset(a, b, c, d) memset((a), (b), (c))
-#define iavf_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
+#define iavf_memcpy(a, b, c, d) memcpy((a), (b), (c))
#define iavf_usec_delay(x) rte_delay_us_sleep(x)
#define iavf_msec_delay(x) iavf_usec_delay(1000 * (x))
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index 1eca20bc9a..ea1ecc1d9b 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -553,7 +553,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
for (i = 0; i < vf->vf_res->rss_key_size; i++)
vf->rss_key[i] = (uint8_t)rte_rand();
} else
- rte_memcpy(vf->rss_key, rss_conf->rss_key,
+ memcpy(vf->rss_key, rss_conf->rss_key,
RTE_MIN(rss_conf->rss_key_len,
vf->vf_res->rss_key_size));
@@ -1536,7 +1536,7 @@ iavf_dev_rss_reta_update(struct rte_eth_dev *dev,
return -ENOMEM;
}
/* store the old lut table temporarily */
- rte_memcpy(lut, vf->rss_lut, reta_size);
+ memcpy(lut, vf->rss_lut, reta_size);
for (i = 0; i < reta_size; i++) {
idx = i / RTE_ETH_RETA_GROUP_SIZE;
@@ -1545,11 +1545,11 @@ iavf_dev_rss_reta_update(struct rte_eth_dev *dev,
lut[i] = reta_conf[idx].reta[shift];
}
- rte_memcpy(vf->rss_lut, lut, reta_size);
+ memcpy(vf->rss_lut, lut, reta_size);
/* send virtchnl ops to configure RSS */
ret = iavf_configure_rss_lut(adapter);
if (ret) /* revert back */
- rte_memcpy(vf->rss_lut, lut, reta_size);
+ memcpy(vf->rss_lut, lut, reta_size);
free(lut);
return ret;
@@ -1605,7 +1605,7 @@ iavf_set_rss_key(struct iavf_adapter *adapter, uint8_t *key, uint8_t key_len)
return -EINVAL;
}
- rte_memcpy(vf->rss_key, key, key_len);
+ memcpy(vf->rss_key, key, key_len);
return iavf_configure_rss_key(adapter);
}
@@ -1689,7 +1689,7 @@ iavf_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
return 0;
rss_conf->rss_key_len = vf->vf_res->rss_key_size;
- rte_memcpy(rss_conf->rss_key, vf->rss_key, rss_conf->rss_key_len);
+ memcpy(rss_conf->rss_key, vf->rss_key, rss_conf->rss_key_len);
return 0;
}
diff --git a/drivers/net/intel/iavf/iavf_fdir.c b/drivers/net/intel/iavf/iavf_fdir.c
index 9eae874800..08724d78a8 100644
--- a/drivers/net/intel/iavf/iavf_fdir.c
+++ b/drivers/net/intel/iavf/iavf_fdir.c
@@ -374,7 +374,7 @@ iavf_fdir_create(struct iavf_adapter *ad,
if (filter->mark_flag == 1)
iavf_fdir_rx_proc_enable(ad, 1);
- rte_memcpy(rule, filter, sizeof(*rule));
+ memcpy(rule, filter, sizeof(*rule));
flow->rule = rule;
return 0;
@@ -672,14 +672,14 @@ iavf_fdir_refine_input_set(const uint64_t input_set,
VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, IPV4, PROT);
memset(&ipv4_spec, 0, sizeof(ipv4_spec));
ipv4_spec.hdr.next_proto_id = proto_id;
- rte_memcpy(hdr->buffer, &ipv4_spec.hdr,
+ memcpy(hdr->buffer, &ipv4_spec.hdr,
sizeof(ipv4_spec.hdr));
return true;
case VIRTCHNL_PROTO_HDR_IPV6:
VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, IPV6, PROT);
memset(&ipv6_spec, 0, sizeof(ipv6_spec));
ipv6_spec.hdr.proto = proto_id;
- rte_memcpy(hdr->buffer, &ipv6_spec.hdr,
+ memcpy(hdr->buffer, &ipv6_spec.hdr,
sizeof(ipv6_spec.hdr));
return true;
default:
@@ -894,7 +894,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
ETHERTYPE);
}
- rte_memcpy(hdr1->buffer, eth_spec,
+ memcpy(hdr1->buffer, eth_spec,
sizeof(struct rte_ether_hdr));
}
@@ -985,7 +985,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
input_set |= IAVF_PROT_IPV4_INNER;
}
- rte_memcpy(hdr->buffer, &ipv4_spec->hdr,
+ memcpy(hdr->buffer, &ipv4_spec->hdr,
sizeof(ipv4_spec->hdr));
hdrs->count = ++layer;
@@ -1075,7 +1075,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
input_set |= IAVF_PROT_IPV6_INNER;
}
- rte_memcpy(hdr->buffer, &ipv6_spec->hdr,
+ memcpy(hdr->buffer, &ipv6_spec->hdr,
sizeof(ipv6_spec->hdr));
hdrs->count = ++layer;
@@ -1110,7 +1110,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr1, ETH,
ETHERTYPE);
- rte_memcpy(hdr->buffer, &ipv6_frag_spec->hdr,
+ memcpy(hdr->buffer, &ipv6_frag_spec->hdr,
sizeof(ipv6_frag_spec->hdr));
} else if (ipv6_frag_mask->hdr.id == UINT32_MAX) {
rte_flow_error_set(error, EINVAL,
@@ -1162,11 +1162,11 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
}
if (l3 == RTE_FLOW_ITEM_TYPE_IPV4)
- rte_memcpy(hdr->buffer,
+ memcpy(hdr->buffer,
&udp_spec->hdr,
sizeof(udp_spec->hdr));
else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6)
- rte_memcpy(hdr->buffer,
+ memcpy(hdr->buffer,
&udp_spec->hdr,
sizeof(udp_spec->hdr));
}
@@ -1219,11 +1219,11 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
}
if (l3 == RTE_FLOW_ITEM_TYPE_IPV4)
- rte_memcpy(hdr->buffer,
+ memcpy(hdr->buffer,
&tcp_spec->hdr,
sizeof(tcp_spec->hdr));
else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6)
- rte_memcpy(hdr->buffer,
+ memcpy(hdr->buffer,
&tcp_spec->hdr,
sizeof(tcp_spec->hdr));
}
@@ -1265,11 +1265,11 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
}
if (l3 == RTE_FLOW_ITEM_TYPE_IPV4)
- rte_memcpy(hdr->buffer,
+ memcpy(hdr->buffer,
&sctp_spec->hdr,
sizeof(sctp_spec->hdr));
else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6)
- rte_memcpy(hdr->buffer,
+ memcpy(hdr->buffer,
&sctp_spec->hdr,
sizeof(sctp_spec->hdr));
}
@@ -1300,7 +1300,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, GTPU_IP, TEID);
}
- rte_memcpy(hdr->buffer,
+ memcpy(hdr->buffer,
gtp_spec, sizeof(*gtp_spec));
}
@@ -1355,7 +1355,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
psc.qfi = gtp_psc_spec->hdr.qfi;
psc.type = gtp_psc_spec->hdr.type;
psc.next = 0;
- rte_memcpy(hdr->buffer, &psc,
+ memcpy(hdr->buffer, &psc,
sizeof(struct iavf_gtp_psc_spec_hdr));
}
@@ -1376,7 +1376,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, L2TPV3, SESS_ID);
}
- rte_memcpy(hdr->buffer, l2tpv3oip_spec,
+ memcpy(hdr->buffer, l2tpv3oip_spec,
sizeof(*l2tpv3oip_spec));
}
@@ -1397,7 +1397,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, ESP, SPI);
}
- rte_memcpy(hdr->buffer, &esp_spec->hdr,
+ memcpy(hdr->buffer, &esp_spec->hdr,
sizeof(esp_spec->hdr));
}
@@ -1418,7 +1418,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, AH, SPI);
}
- rte_memcpy(hdr->buffer, ah_spec,
+ memcpy(hdr->buffer, ah_spec,
sizeof(*ah_spec));
}
@@ -1439,7 +1439,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, PFCP, S_FIELD);
}
- rte_memcpy(hdr->buffer, pfcp_spec,
+ memcpy(hdr->buffer, pfcp_spec,
sizeof(*pfcp_spec));
}
@@ -1464,7 +1464,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
PC_RTC_ID);
}
- rte_memcpy(hdr->buffer, ecpri_spec,
+ memcpy(hdr->buffer, ecpri_spec,
sizeof(*ecpri_spec));
}
@@ -1480,7 +1480,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
VIRTCHNL_SET_PROTO_HDR_TYPE(hdr, GRE);
if (gre_spec && gre_mask) {
- rte_memcpy(hdr->buffer, gre_spec,
+ memcpy(hdr->buffer, gre_spec,
sizeof(*gre_spec));
}
@@ -1529,7 +1529,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
SESS_ID);
}
- rte_memcpy(hdr->buffer, l2tpv2_spec,
+ memcpy(hdr->buffer, l2tpv2_spec,
sizeof(*l2tpv2_spec));
}
@@ -1547,7 +1547,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
VIRTCHNL_SET_PROTO_HDR_TYPE(hdr, PPP);
if (ppp_spec && ppp_mask) {
- rte_memcpy(hdr->buffer, ppp_spec,
+ memcpy(hdr->buffer, ppp_spec,
sizeof(*ppp_spec));
}
diff --git a/drivers/net/intel/iavf/iavf_fsub.c b/drivers/net/intel/iavf/iavf_fsub.c
index bfb34695de..50046af96a 100644
--- a/drivers/net/intel/iavf/iavf_fsub.c
+++ b/drivers/net/intel/iavf/iavf_fsub.c
@@ -92,7 +92,7 @@ iavf_fsub_create(struct iavf_adapter *ad, struct rte_flow *flow,
goto free_entry;
}
- rte_memcpy(rule, filter, sizeof(*rule));
+ memcpy(rule, filter, sizeof(*rule));
flow->rule = rule;
rte_free(meta);
@@ -280,9 +280,9 @@ iavf_fsub_parse_pattern(const struct rte_flow_item pattern[],
input_set_byte += 2;
}
- rte_memcpy(hdr1->buffer_spec, eth_spec,
+ memcpy(hdr1->buffer_spec, eth_spec,
sizeof(struct rte_ether_hdr));
- rte_memcpy(hdr1->buffer_mask, eth_mask,
+ memcpy(hdr1->buffer_mask, eth_mask,
sizeof(struct rte_ether_hdr));
} else {
/* flow subscribe filter will add dst mac in kernel */
@@ -333,9 +333,9 @@ iavf_fsub_parse_pattern(const struct rte_flow_item pattern[],
input_set_byte++;
}
- rte_memcpy(hdr->buffer_spec, &ipv4_spec->hdr,
+ memcpy(hdr->buffer_spec, &ipv4_spec->hdr,
sizeof(ipv4_spec->hdr));
- rte_memcpy(hdr->buffer_mask, &ipv4_mask->hdr,
+ memcpy(hdr->buffer_mask, &ipv4_mask->hdr,
sizeof(ipv4_spec->hdr));
}
@@ -396,9 +396,9 @@ iavf_fsub_parse_pattern(const struct rte_flow_item pattern[],
input_set_byte += 4;
}
- rte_memcpy(hdr->buffer_spec, &ipv6_spec->hdr,
+ memcpy(hdr->buffer_spec, &ipv6_spec->hdr,
sizeof(ipv6_spec->hdr));
- rte_memcpy(hdr->buffer_mask, &ipv6_mask->hdr,
+ memcpy(hdr->buffer_mask, &ipv6_mask->hdr,
sizeof(ipv6_spec->hdr));
}
@@ -433,9 +433,9 @@ iavf_fsub_parse_pattern(const struct rte_flow_item pattern[],
input_set_byte += 2;
}
- rte_memcpy(hdr->buffer_spec, &udp_spec->hdr,
+ memcpy(hdr->buffer_spec, &udp_spec->hdr,
sizeof(udp_spec->hdr));
- rte_memcpy(hdr->buffer_mask, &udp_mask->hdr,
+ memcpy(hdr->buffer_mask, &udp_mask->hdr,
sizeof(udp_mask->hdr));
}
@@ -474,9 +474,9 @@ iavf_fsub_parse_pattern(const struct rte_flow_item pattern[],
input_set_byte += 2;
}
- rte_memcpy(hdr->buffer_spec, &tcp_spec->hdr,
+ memcpy(hdr->buffer_spec, &tcp_spec->hdr,
sizeof(tcp_spec->hdr));
- rte_memcpy(hdr->buffer_mask, &tcp_mask->hdr,
+ memcpy(hdr->buffer_mask, &tcp_mask->hdr,
sizeof(tcp_mask->hdr));
}
@@ -506,9 +506,9 @@ iavf_fsub_parse_pattern(const struct rte_flow_item pattern[],
return -rte_errno;
}
- rte_memcpy(hdr->buffer_spec, &vlan_spec->hdr,
+ memcpy(hdr->buffer_spec, &vlan_spec->hdr,
sizeof(vlan_spec->hdr));
- rte_memcpy(hdr->buffer_mask, &vlan_mask->hdr,
+ memcpy(hdr->buffer_mask, &vlan_mask->hdr,
sizeof(vlan_mask->hdr));
}
diff --git a/drivers/net/intel/iavf/iavf_generic_flow.c b/drivers/net/intel/iavf/iavf_generic_flow.c
index 42ecc90d1d..2a9f3a8acb 100644
--- a/drivers/net/intel/iavf/iavf_generic_flow.c
+++ b/drivers/net/intel/iavf/iavf_generic_flow.c
@@ -2016,7 +2016,7 @@ iavf_pattern_skip_void_item(struct rte_flow_item *items,
pe = iavf_find_first_item(pb + 1, true);
cpy_count = pe - pb;
- rte_memcpy(items, pb, sizeof(struct rte_flow_item) * cpy_count);
+ memcpy(items, pb, sizeof(struct rte_flow_item) * cpy_count);
items += cpy_count;
@@ -2026,7 +2026,7 @@ iavf_pattern_skip_void_item(struct rte_flow_item *items,
pb = pe + 1;
}
/* Copy the END item. */
- rte_memcpy(items, pe, sizeof(struct rte_flow_item));
+ memcpy(items, pe, sizeof(struct rte_flow_item));
}
/* Check if the pattern matches a supported item type array */
diff --git a/drivers/net/intel/iavf/iavf_hash.c b/drivers/net/intel/iavf/iavf_hash.c
index cb10eeab78..e9ea2a8401 100644
--- a/drivers/net/intel/iavf/iavf_hash.c
+++ b/drivers/net/intel/iavf/iavf_hash.c
@@ -953,8 +953,8 @@ iavf_hash_parse_raw_pattern(const struct rte_flow_item *item,
msk_buf[j] = tmp_val * 16 + tmp_c - '0';
}
- rte_memcpy(meta->proto_hdrs.raw.spec, pkt_buf, pkt_len);
- rte_memcpy(meta->proto_hdrs.raw.mask, msk_buf, pkt_len);
+ memcpy(meta->proto_hdrs.raw.spec, pkt_buf, pkt_len);
+ memcpy(meta->proto_hdrs.raw.mask, msk_buf, pkt_len);
meta->proto_hdrs.raw.pkt_len = pkt_len;
rte_free(pkt_buf);
diff --git a/drivers/net/intel/iavf/iavf_tm.c b/drivers/net/intel/iavf/iavf_tm.c
index 1d12196ba6..54ec6e9750 100644
--- a/drivers/net/intel/iavf/iavf_tm.c
+++ b/drivers/net/intel/iavf/iavf_tm.c
@@ -342,7 +342,7 @@ iavf_tm_node_add(struct rte_eth_dev *dev, uint32_t node_id,
tm_node->id = node_id;
tm_node->parent = NULL;
tm_node->reference_count = 0;
- rte_memcpy(&tm_node->params, params,
+ memcpy(&tm_node->params, params,
sizeof(struct rte_tm_node_params));
vf->tm_conf.root = tm_node;
return 0;
@@ -403,7 +403,7 @@ iavf_tm_node_add(struct rte_eth_dev *dev, uint32_t node_id,
tm_node->reference_count = 0;
tm_node->parent = parent_node;
tm_node->shaper_profile = shaper_profile;
- rte_memcpy(&tm_node->params, params,
+ memcpy(&tm_node->params, params,
sizeof(struct rte_tm_node_params));
if (parent_node_type == IAVF_TM_NODE_TYPE_PORT) {
TAILQ_INSERT_TAIL(&vf->tm_conf.tc_list,
@@ -543,7 +543,7 @@ iavf_shaper_profile_add(struct rte_eth_dev *dev,
if (!shaper_profile)
return -ENOMEM;
shaper_profile->shaper_profile_id = shaper_profile_id;
- rte_memcpy(&shaper_profile->profile, profile,
+ memcpy(&shaper_profile->profile, profile,
sizeof(struct rte_tm_shaper_params));
TAILQ_INSERT_TAIL(&vf->tm_conf.shaper_profile_list,
shaper_profile, node);
diff --git a/drivers/net/intel/iavf/iavf_vchnl.c b/drivers/net/intel/iavf/iavf_vchnl.c
index 08dd6f2d7f..14bd869be4 100644
--- a/drivers/net/intel/iavf/iavf_vchnl.c
+++ b/drivers/net/intel/iavf/iavf_vchnl.c
@@ -112,7 +112,7 @@ iavf_dev_event_post(struct rte_eth_dev *dev,
elem->param = param;
elem->param_alloc_size = param_alloc_size;
if (param && param_alloc_size) {
- rte_memcpy(elem->param_alloc_data, param, param_alloc_size);
+ memcpy(elem->param_alloc_data, param, param_alloc_size);
elem->param = elem->param_alloc_data;
}
@@ -732,7 +732,7 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)
len = sizeof(struct virtchnl_vf_resource) +
IAVF_MAX_VF_VSI * sizeof(struct virtchnl_vsi_resource);
- rte_memcpy(vf->vf_res, args.out_buffer,
+ memcpy(vf->vf_res, args.out_buffer,
RTE_MIN(args.out_size, len));
/* parse VF config message back from PF*/
iavf_vf_parse_hw_config(hw, vf->vf_res);
@@ -921,7 +921,7 @@ iavf_get_vlan_offload_caps_v2(struct iavf_adapter *adapter)
return ret;
}
- rte_memcpy(&vf->vlan_v2_caps, vf->aq_resp, sizeof(vf->vlan_v2_caps));
+ memcpy(&vf->vlan_v2_caps, vf->aq_resp, sizeof(vf->vlan_v2_caps));
return 0;
}
@@ -1151,7 +1151,7 @@ iavf_configure_rss_lut(struct iavf_adapter *adapter)
rss_lut->vsi_id = vf->vsi_res->vsi_id;
rss_lut->lut_entries = vf->vf_res->rss_lut_size;
- rte_memcpy(rss_lut->lut, vf->rss_lut, vf->vf_res->rss_lut_size);
+ memcpy(rss_lut->lut, vf->rss_lut, vf->vf_res->rss_lut_size);
args.ops = VIRTCHNL_OP_CONFIG_RSS_LUT;
args.in_args = (u8 *)rss_lut;
@@ -1183,7 +1183,7 @@ iavf_configure_rss_key(struct iavf_adapter *adapter)
rss_key->vsi_id = vf->vsi_res->vsi_id;
rss_key->key_len = vf->vf_res->rss_key_size;
- rte_memcpy(rss_key->key, vf->rss_key, vf->vf_res->rss_key_size);
+ memcpy(rss_key->key, vf->rss_key, vf->vf_res->rss_key_size);
args.ops = VIRTCHNL_OP_CONFIG_RSS_KEY;
args.in_args = (u8 *)rss_key;
@@ -1574,7 +1574,7 @@ iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr,
list->vsi_id = vf->vsi_res->vsi_id;
list->num_elements = 1;
list->list[0].type = type;
- rte_memcpy(list->list[0].addr, addr->addr_bytes,
+ memcpy(list->list[0].addr, addr->addr_bytes,
sizeof(addr->addr_bytes));
args.ops = add ? VIRTCHNL_OP_ADD_ETH_ADDR : VIRTCHNL_OP_DEL_ETH_ADDR;
@@ -2001,7 +2001,7 @@ iavf_get_qos_cap(struct iavf_adapter *adapter)
len = sizeof(struct virtchnl_qos_cap_list) +
IAVF_MAX_TRAFFIC_CLASS * sizeof(struct virtchnl_qos_cap_elem);
- rte_memcpy(vf->qos_cap, args.out_buffer,
+ memcpy(vf->qos_cap, args.out_buffer,
RTE_MIN(args.out_size, len));
return 0;
--
2.51.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [RFC PATCH 3/8] net/i40e: replace use of DPDK-specific memcpy function
2026-05-19 16:05 [RFC PATCH 0/8] remove use of rte_memcpy from net/intel Bruce Richardson
2026-05-19 16:05 ` [RFC PATCH 1/8] net/ice: replace use of DPDK-specific memcpy function Bruce Richardson
2026-05-19 16:05 ` [RFC PATCH 2/8] net/iavf: " Bruce Richardson
@ 2026-05-19 16:06 ` Bruce Richardson
2026-05-19 16:06 ` [RFC PATCH 4/8] net/ixgbe: " Bruce Richardson
` (6 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2026-05-19 16:06 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
The driver use of memcpy is for control path work, for example, flow
configuration and so is fine using the standard libc memcpy function in
place of the DPDK-specific rte_memcpy version.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/i40e/base/i40e_osdep.h | 3 +-
drivers/net/intel/i40e/i40e_ethdev.c | 57 ++++++++++++------------
drivers/net/intel/i40e/i40e_fdir.c | 18 ++++----
drivers/net/intel/i40e/i40e_flow.c | 26 +++++------
drivers/net/intel/i40e/i40e_pf.c | 3 +-
drivers/net/intel/i40e/i40e_tm.c | 6 +--
drivers/net/intel/i40e/rte_pmd_i40e.c | 20 ++++-----
7 files changed, 65 insertions(+), 68 deletions(-)
diff --git a/drivers/net/intel/i40e/base/i40e_osdep.h b/drivers/net/intel/i40e/base/i40e_osdep.h
index 197f4678bf..9c5a94f055 100644
--- a/drivers/net/intel/i40e/base/i40e_osdep.h
+++ b/drivers/net/intel/i40e/base/i40e_osdep.h
@@ -12,7 +12,6 @@
#include <stdarg.h>
#include <rte_common.h>
-#include <rte_memcpy.h>
#include <rte_byteorder.h>
#include <rte_cycles.h>
#include <rte_spinlock.h>
@@ -226,7 +225,7 @@ struct i40e_spinlock {
#define I40E_HTONL(a) rte_cpu_to_be_32(a)
#define i40e_memset(a, b, c, d) memset((a), (b), (c))
-#define i40e_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
+#define i40e_memcpy(a, b, c, d) memcpy((a), (b), (c))
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
#define DELAY(x) rte_delay_us_sleep(x)
diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
index 100a751225..adc8502736 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -23,7 +23,6 @@
#include <ethdev_pci.h>
#include <rte_memzone.h>
#include <rte_malloc.h>
-#include <rte_memcpy.h>
#include <rte_alarm.h>
#include <dev_driver.h>
#include <rte_tailq.h>
@@ -4468,7 +4467,7 @@ i40e_macaddr_add(struct rte_eth_dev *dev,
return -EINVAL;
}
- rte_memcpy(&mac_filter.mac_addr, mac_addr, RTE_ETHER_ADDR_LEN);
+ memcpy(&mac_filter.mac_addr, mac_addr, RTE_ETHER_ADDR_LEN);
if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_FILTER)
mac_filter.filter_type = I40E_MACVLAN_PERFECT_MATCH;
else
@@ -5335,7 +5334,7 @@ i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi,
vsi->info.valid_sections =
rte_cpu_to_le_16(I40E_AQ_VSI_PROP_VLAN_VALID);
memset(&ctxt, 0, sizeof(ctxt));
- rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
+ memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
ctxt.seid = vsi->seid;
hw = I40E_VSI_TO_HW(vsi);
@@ -5374,7 +5373,7 @@ i40e_vsi_update_tc_bandwidth(struct i40e_vsi *vsi, uint8_t enabled_tcmap)
return ret;
}
- rte_memcpy(vsi->info.qs_handle, tc_bw_data.qs_handles,
+ memcpy(vsi->info.qs_handle, tc_bw_data.qs_handles,
sizeof(vsi->info.qs_handle));
return I40E_SUCCESS;
}
@@ -5632,7 +5631,7 @@ i40e_update_default_filter_setting(struct i40e_vsi *vsi)
if (vsi->type != I40E_VSI_MAIN)
return I40E_ERR_CONFIG;
memset(&def_filter, 0, sizeof(def_filter));
- rte_memcpy(def_filter.mac_addr, hw->mac.perm_addr,
+ memcpy(def_filter.mac_addr, hw->mac.perm_addr,
ETH_ADDR_LEN);
def_filter.vlan_tag = 0;
def_filter.flags = I40E_AQC_MACVLAN_DEL_PERFECT_MATCH |
@@ -5651,7 +5650,7 @@ i40e_update_default_filter_setting(struct i40e_vsi *vsi)
return I40E_ERR_NO_MEMORY;
}
mac = &f->mac_info.mac_addr;
- rte_memcpy(&mac->addr_bytes, hw->mac.perm_addr,
+ memcpy(&mac->addr_bytes, hw->mac.perm_addr,
ETH_ADDR_LEN);
f->mac_info.filter_type = I40E_MACVLAN_PERFECT_MATCH;
TAILQ_INSERT_TAIL(&vsi->mac_list, f, next);
@@ -5659,7 +5658,7 @@ i40e_update_default_filter_setting(struct i40e_vsi *vsi)
return ret;
}
- rte_memcpy(&filter.mac_addr,
+ memcpy(&filter.mac_addr,
(struct rte_ether_addr *)(hw->mac.perm_addr), ETH_ADDR_LEN);
filter.filter_type = I40E_MACVLAN_PERFECT_MATCH;
return i40e_vsi_add_mac(vsi, &filter);
@@ -6016,15 +6015,15 @@ i40e_vsi_setup(struct i40e_pf *pf,
goto fail_msix_alloc;
}
- rte_memcpy(&vsi->info.tc_mapping, &ctxt.info.tc_mapping,
+ memcpy(&vsi->info.tc_mapping, &ctxt.info.tc_mapping,
sizeof(vsi->info.tc_mapping));
- rte_memcpy(&vsi->info.queue_mapping,
+ memcpy(&vsi->info.queue_mapping,
&ctxt.info.queue_mapping,
sizeof(vsi->info.queue_mapping));
vsi->info.mapping_flags = ctxt.info.mapping_flags;
vsi->info.valid_sections = 0;
- rte_memcpy(pf->dev_addr.addr_bytes, hw->mac.perm_addr,
+ memcpy(pf->dev_addr.addr_bytes, hw->mac.perm_addr,
ETH_ADDR_LEN);
/**
@@ -6168,7 +6167,7 @@ i40e_vsi_setup(struct i40e_pf *pf,
if (vsi->type != I40E_VSI_FDIR) {
/* MAC/VLAN configuration for non-FDIR VSI*/
- rte_memcpy(&filter.mac_addr, &broadcast, RTE_ETHER_ADDR_LEN);
+ memcpy(&filter.mac_addr, &broadcast, RTE_ETHER_ADDR_LEN);
filter.filter_type = I40E_MACVLAN_PERFECT_MATCH;
ret = i40e_vsi_add_mac(vsi, &filter);
@@ -6276,7 +6275,7 @@ i40e_vsi_config_vlan_stripping(struct i40e_vsi *vsi, bool on)
vsi->info.port_vlan_flags &= ~(I40E_AQ_VSI_PVLAN_EMOD_MASK);
vsi->info.port_vlan_flags |= vlan_flags;
ctxt.seid = vsi->seid;
- rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
+ memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
if (ret)
PMD_DRV_LOG(INFO, "Update VSI failed to %s vlan stripping",
@@ -7138,7 +7137,7 @@ i40e_add_macvlan_filters(struct i40e_vsi *vsi,
memset(req_list, 0, ele_buff_size);
for (i = 0; i < actual_num; i++) {
- rte_memcpy(req_list[i].mac_addr,
+ memcpy(req_list[i].mac_addr,
&filter[num + i].macaddr, ETH_ADDR_LEN);
req_list[i].vlan_tag =
rte_cpu_to_le_16(filter[num + i].vlan_id);
@@ -7211,7 +7210,7 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi,
memset(req_list, 0, ele_buff_size);
for (i = 0; i < actual_num; i++) {
- rte_memcpy(req_list[i].mac_addr,
+ memcpy(req_list[i].mac_addr,
&filter[num + i].macaddr, ETH_ADDR_LEN);
req_list[i].vlan_tag =
rte_cpu_to_le_16(filter[num + i].vlan_id);
@@ -7363,7 +7362,7 @@ i40e_find_all_vlan_for_mac(struct i40e_vsi *vsi,
"vlan number doesn't match");
return I40E_ERR_PARAM;
}
- rte_memcpy(&mv_f[i].macaddr,
+ memcpy(&mv_f[i].macaddr,
addr, ETH_ADDR_LEN);
mv_f[i].vlan_id =
j * I40E_UINT32_BIT_SIZE + k;
@@ -7392,7 +7391,7 @@ i40e_find_all_mac_for_vlan(struct i40e_vsi *vsi,
PMD_DRV_LOG(ERR, "buffer number not match");
return I40E_ERR_PARAM;
}
- rte_memcpy(&mv_f[i].macaddr, &f->mac_info.mac_addr,
+ memcpy(&mv_f[i].macaddr, &f->mac_info.mac_addr,
ETH_ADDR_LEN);
mv_f[i].vlan_id = vlan;
mv_f[i].filter_type = f->mac_info.filter_type;
@@ -7428,7 +7427,7 @@ i40e_vsi_remove_all_macvlan_filter(struct i40e_vsi *vsi)
i = 0;
if (vsi->vlan_num == 0) {
TAILQ_FOREACH(f, &vsi->mac_list, next) {
- rte_memcpy(&mv_f[i].macaddr,
+ memcpy(&mv_f[i].macaddr,
&f->mac_info.mac_addr, ETH_ADDR_LEN);
mv_f[i].filter_type = f->mac_info.filter_type;
mv_f[i].vlan_id = 0;
@@ -7586,7 +7585,7 @@ i40e_vsi_add_mac(struct i40e_vsi *vsi, struct i40e_mac_filter_info *mac_filter)
for (i = 0; i < vlan_num; i++) {
mv_f[i].filter_type = mac_filter->filter_type;
- rte_memcpy(&mv_f[i].macaddr, &mac_filter->mac_addr,
+ memcpy(&mv_f[i].macaddr, &mac_filter->mac_addr,
ETH_ADDR_LEN);
}
@@ -7609,7 +7608,7 @@ i40e_vsi_add_mac(struct i40e_vsi *vsi, struct i40e_mac_filter_info *mac_filter)
ret = I40E_ERR_NO_MEMORY;
goto DONE;
}
- rte_memcpy(&f->mac_info.mac_addr, &mac_filter->mac_addr,
+ memcpy(&f->mac_info.mac_addr, &mac_filter->mac_addr,
ETH_ADDR_LEN);
f->mac_info.filter_type = mac_filter->filter_type;
TAILQ_INSERT_TAIL(&vsi->mac_list, f, next);
@@ -7656,7 +7655,7 @@ i40e_vsi_delete_mac(struct i40e_vsi *vsi, struct rte_ether_addr *addr)
for (i = 0; i < vlan_num; i++) {
mv_f[i].filter_type = filter_type;
- rte_memcpy(&mv_f[i].macaddr, &f->mac_info.mac_addr,
+ memcpy(&mv_f[i].macaddr, &f->mac_info.mac_addr,
ETH_ADDR_LEN);
}
if (filter_type == I40E_MACVLAN_PERFECT_MATCH ||
@@ -7943,7 +7942,7 @@ i40e_tunnel_filter_convert(
tunnel_filter->input.flags = cld_filter->element.flags;
tunnel_filter->input.tenant_id = cld_filter->element.tenant_id;
tunnel_filter->queue = cld_filter->element.queue_number;
- rte_memcpy(tunnel_filter->input.general_fields,
+ memcpy(tunnel_filter->input.general_fields,
cld_filter->general_fields,
sizeof(cld_filter->general_fields));
@@ -8481,7 +8480,7 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,
ip_type = I40E_AQC_ADD_CLOUD_FLAGS_IPV4;
ipv4_addr = rte_be_to_cpu_32(tunnel_filter->ip_addr.ipv4_addr);
ipv4_addr_le = rte_cpu_to_le_32(ipv4_addr);
- rte_memcpy(&cld_filter.element.ipaddr.v4.data,
+ memcpy(&cld_filter.element.ipaddr.v4.data,
&ipv4_addr_le,
sizeof(cld_filter.element.ipaddr.v4.data));
} else {
@@ -8491,7 +8490,7 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,
rte_cpu_to_le_32(rte_be_to_cpu_32(
tunnel_filter->ip_addr.ipv6_addr[i]));
}
- rte_memcpy(&cld_filter.element.ipaddr.v6.data,
+ memcpy(&cld_filter.element.ipaddr.v6.data,
&convert_ipv6,
sizeof(cld_filter.element.ipaddr.v6.data));
}
@@ -8733,7 +8732,7 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,
return -ENOMEM;
}
- rte_memcpy(tunnel, &check_filter, sizeof(check_filter));
+ memcpy(tunnel, &check_filter, sizeof(check_filter));
ret = i40e_sw_tunnel_filter_insert(pf, tunnel);
if (ret < 0)
rte_free(tunnel);
@@ -9855,7 +9854,7 @@ static int
i40e_ethertype_filter_convert(const struct rte_eth_ethertype_filter *input,
struct i40e_ethertype_filter *filter)
{
- rte_memcpy(&filter->input.mac_addr, &input->mac_addr,
+ memcpy(&filter->input.mac_addr, &input->mac_addr,
RTE_ETHER_ADDR_LEN);
filter->input.ether_type = input->ether_type;
filter->flags = input->flags;
@@ -10003,7 +10002,7 @@ i40e_ethertype_filter_set(struct i40e_pf *pf,
return -ENOMEM;
}
- rte_memcpy(ethertype_filter, &check_filter,
+ memcpy(ethertype_filter, &check_filter,
sizeof(check_filter));
ret = i40e_sw_ethertype_filter_insert(pf, ethertype_filter);
if (ret < 0)
@@ -10890,9 +10889,9 @@ i40e_vsi_config_tc(struct i40e_vsi *vsi, uint8_t tc_map)
goto out;
}
/* update the local VSI info with updated queue map */
- rte_memcpy(&vsi->info.tc_mapping, &ctxt.info.tc_mapping,
+ memcpy(&vsi->info.tc_mapping, &ctxt.info.tc_mapping,
sizeof(vsi->info.tc_mapping));
- rte_memcpy(&vsi->info.queue_mapping,
+ memcpy(&vsi->info.queue_mapping,
&ctxt.info.queue_mapping,
sizeof(vsi->info.queue_mapping));
vsi->info.mapping_flags = ctxt.info.mapping_flags;
@@ -11646,7 +11645,7 @@ i40e_tunnel_filter_restore(struct i40e_pf *pf)
cld_filter.element.flags = f->input.flags;
cld_filter.element.tenant_id = f->input.tenant_id;
cld_filter.element.queue_number = f->queue;
- rte_memcpy(cld_filter.general_fields,
+ memcpy(cld_filter.general_fields,
f->input.general_fields,
sizeof(f->input.general_fields));
diff --git a/drivers/net/intel/i40e/i40e_fdir.c b/drivers/net/intel/i40e/i40e_fdir.c
index 3b099d5a9e..ad256a5a11 100644
--- a/drivers/net/intel/i40e/i40e_fdir.c
+++ b/drivers/net/intel/i40e/i40e_fdir.c
@@ -464,9 +464,9 @@ fill_ip6_head(const struct i40e_fdir_input *fdir_input, unsigned char *raw_pkt,
* need to be presented in a reversed order with respect
* to the expected received packets.
*/
- rte_memcpy(&ip6->src_addr, &fdir_input->flow.ipv6_flow.dst_ip,
+ memcpy(&ip6->src_addr, &fdir_input->flow.ipv6_flow.dst_ip,
IPV6_ADDR_LEN);
- rte_memcpy(&ip6->dst_addr, &fdir_input->flow.ipv6_flow.src_ip,
+ memcpy(&ip6->dst_addr, &fdir_input->flow.ipv6_flow.src_ip,
IPV6_ADDR_LEN);
len += sizeof(struct rte_ipv6_hdr);
@@ -528,16 +528,16 @@ i40e_flow_fdir_fill_eth_ip_head(struct i40e_pf *pf,
[I40E_FILTER_PCTYPE_NONF_IPV6_OTHER] = IPPROTO_NONE,
};
- rte_memcpy(raw_pkt, &fdir_input->flow.l2_flow.dst,
+ memcpy(raw_pkt, &fdir_input->flow.l2_flow.dst,
sizeof(struct rte_ether_addr));
- rte_memcpy(raw_pkt + sizeof(struct rte_ether_addr),
+ memcpy(raw_pkt + sizeof(struct rte_ether_addr),
&fdir_input->flow.l2_flow.src,
sizeof(struct rte_ether_addr));
raw_pkt += 2 * sizeof(struct rte_ether_addr);
if (vlan && fdir_input->flow_ext.vlan_tci) {
- rte_memcpy(raw_pkt, vlan_frame, sizeof(vlan_frame));
- rte_memcpy(raw_pkt + sizeof(uint16_t),
+ memcpy(raw_pkt, vlan_frame, sizeof(vlan_frame));
+ memcpy(raw_pkt + sizeof(uint16_t),
&fdir_input->flow_ext.vlan_tci,
sizeof(uint16_t));
raw_pkt += sizeof(vlan_frame);
@@ -901,7 +901,7 @@ i40e_flow_fdir_construct_pkt(struct i40e_pf *pf,
dst = pf->fdir.flex_set[pit_idx].dst_offset * sizeof(uint16_t);
ptr = payload +
pf->fdir.flex_set[pit_idx].src_offset * sizeof(uint16_t);
- (void)rte_memcpy(ptr,
+ (void)memcpy(ptr,
&fdir_input->flow_ext.flexbytes[dst],
size * sizeof(uint16_t));
}
@@ -1001,7 +1001,7 @@ static int
i40e_fdir_filter_convert(const struct i40e_fdir_filter_conf *input,
struct i40e_fdir_filter *filter)
{
- rte_memcpy(&filter->fdir, input, sizeof(struct i40e_fdir_filter_conf));
+ memcpy(&filter->fdir, input, sizeof(struct i40e_fdir_filter_conf));
if (input->input.flow_ext.pkt_template) {
filter->fdir.input.flow.raw_flow.packet = NULL;
filter->fdir.input.flow.raw_flow.length =
@@ -1058,7 +1058,7 @@ i40e_sw_fdir_filter_insert(struct i40e_pf *pf, struct i40e_fdir_filter *filter)
return -1;
hash_filter = &fdir_info->fdir_filter_array[ret];
- rte_memcpy(hash_filter, filter, sizeof(*filter));
+ memcpy(hash_filter, filter, sizeof(*filter));
fdir_info->hash_map[ret] = hash_filter;
TAILQ_INSERT_TAIL(&fdir_info->fdir_list, hash_filter, rules);
diff --git a/drivers/net/intel/i40e/i40e_flow.c b/drivers/net/intel/i40e/i40e_flow.c
index 78191a2d22..1a1f864a22 100644
--- a/drivers/net/intel/i40e/i40e_flow.c
+++ b/drivers/net/intel/i40e/i40e_flow.c
@@ -1159,7 +1159,7 @@ i40e_pattern_skip_void_item(struct rte_flow_item *items,
pe = i40e_find_first_item(pb + 1, true);
cpy_count = pe - pb;
- rte_memcpy(items, pb, sizeof(struct rte_flow_item) * cpy_count);
+ memcpy(items, pb, sizeof(struct rte_flow_item) * cpy_count);
items += cpy_count;
@@ -1171,7 +1171,7 @@ i40e_pattern_skip_void_item(struct rte_flow_item *items,
pb = pe + 1;
}
/* Copy the END item. */
- rte_memcpy(items, pe, sizeof(struct rte_flow_item));
+ memcpy(items, pe, sizeof(struct rte_flow_item));
}
/* Check if the pattern matches a supported item type array */
@@ -2034,9 +2034,9 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
filter->input.flow_ext.oip_type =
I40E_FDIR_IPTYPE_IPV6;
- rte_memcpy(filter->input.flow.ipv6_flow.src_ip,
+ memcpy(filter->input.flow.ipv6_flow.src_ip,
&ipv6_spec->hdr.src_addr, 16);
- rte_memcpy(filter->input.flow.ipv6_flow.dst_ip,
+ memcpy(filter->input.flow.ipv6_flow.dst_ip,
&ipv6_spec->hdr.dst_addr, 16);
/* Check if it is fragment. */
@@ -2962,12 +2962,12 @@ i40e_flow_parse_vxlan_pattern(__rte_unused struct rte_eth_dev *dev,
}
if (!vxlan_flag) {
- rte_memcpy(&filter->outer_mac,
+ memcpy(&filter->outer_mac,
ð_spec->hdr.dst_addr,
RTE_ETHER_ADDR_LEN);
filter_type |= RTE_ETH_TUNNEL_FILTER_OMAC;
} else {
- rte_memcpy(&filter->inner_mac,
+ memcpy(&filter->inner_mac,
ð_spec->hdr.dst_addr,
RTE_ETHER_ADDR_LEN);
filter_type |= RTE_ETH_TUNNEL_FILTER_IMAC;
@@ -3062,7 +3062,7 @@ i40e_flow_parse_vxlan_pattern(__rte_unused struct rte_eth_dev *dev,
return -rte_errno;
}
- rte_memcpy(((uint8_t *)&tenant_id_be + 1),
+ memcpy(((uint8_t *)&tenant_id_be + 1),
vxlan_spec->hdr.vni, 3);
filter->tenant_id =
rte_be_to_cpu_32(tenant_id_be);
@@ -3191,12 +3191,12 @@ i40e_flow_parse_nvgre_pattern(__rte_unused struct rte_eth_dev *dev,
}
if (!nvgre_flag) {
- rte_memcpy(&filter->outer_mac,
+ memcpy(&filter->outer_mac,
ð_spec->hdr.dst_addr,
RTE_ETHER_ADDR_LEN);
filter_type |= RTE_ETH_TUNNEL_FILTER_OMAC;
} else {
- rte_memcpy(&filter->inner_mac,
+ memcpy(&filter->inner_mac,
ð_spec->hdr.dst_addr,
RTE_ETHER_ADDR_LEN);
filter_type |= RTE_ETH_TUNNEL_FILTER_IMAC;
@@ -3313,7 +3313,7 @@ i40e_flow_parse_nvgre_pattern(__rte_unused struct rte_eth_dev *dev,
"Invalid NVGRE item");
return -rte_errno;
}
- rte_memcpy(((uint8_t *)&tenant_id_be + 1),
+ memcpy(((uint8_t *)&tenant_id_be + 1),
nvgre_spec->tni, 3);
filter->tenant_id =
rte_be_to_cpu_32(tenant_id_be);
@@ -3481,7 +3481,7 @@ i40e_flow_parse_mpls_pattern(__rte_unused struct rte_eth_dev *dev,
"Invalid MPLS label mask");
return -rte_errno;
}
- rte_memcpy(((uint8_t *)&label_be + 1),
+ memcpy(((uint8_t *)&label_be + 1),
mpls_spec->label_tc_s, 3);
filter->tenant_id = rte_be_to_cpu_32(label_be) >> 4;
break;
@@ -4119,7 +4119,7 @@ i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,
cld_filter.element.flags = filter->input.flags;
cld_filter.element.tenant_id = filter->input.tenant_id;
cld_filter.element.queue_number = filter->queue;
- rte_memcpy(cld_filter.general_fields,
+ memcpy(cld_filter.general_fields,
filter->input.general_fields,
sizeof(cld_filter.general_fields));
@@ -4339,7 +4339,7 @@ i40e_flow_query(struct rte_eth_dev *dev __rte_unused,
"action not supported");
return -rte_errno;
}
- rte_memcpy(rss_conf,
+ memcpy(rss_conf,
&rss_rule->rss_filter_info.conf,
sizeof(struct rte_flow_action_rss));
break;
diff --git a/drivers/net/intel/i40e/i40e_pf.c b/drivers/net/intel/i40e/i40e_pf.c
index 08cdd6bc4d..c76e035a42 100644
--- a/drivers/net/intel/i40e/i40e_pf.c
+++ b/drivers/net/intel/i40e/i40e_pf.c
@@ -16,7 +16,6 @@
#include <rte_ether.h>
#include <ethdev_driver.h>
#include <rte_malloc.h>
-#include <rte_memcpy.h>
#include "i40e_logs.h"
#include "base/i40e_prototype.h"
@@ -857,7 +856,7 @@ i40e_pf_host_process_cmd_add_ether_address(struct i40e_pf_vf *vf,
for (i = 0; i < addr_list->num_elements; i++) {
mac = (struct rte_ether_addr *)(addr_list->list[i].addr);
- rte_memcpy(&filter.mac_addr, mac, RTE_ETHER_ADDR_LEN);
+ memcpy(&filter.mac_addr, mac, RTE_ETHER_ADDR_LEN);
filter.filter_type = I40E_MACVLAN_PERFECT_MATCH;
if (rte_is_zero_ether_addr(mac) ||
i40e_vsi_add_mac(vf->vsi, &filter)) {
diff --git a/drivers/net/intel/i40e/i40e_tm.c b/drivers/net/intel/i40e/i40e_tm.c
index 4c0940f355..6f7e8cc801 100644
--- a/drivers/net/intel/i40e/i40e_tm.c
+++ b/drivers/net/intel/i40e/i40e_tm.c
@@ -279,7 +279,7 @@ i40e_shaper_profile_add(struct rte_eth_dev *dev,
if (!shaper_profile)
return -ENOMEM;
shaper_profile->shaper_profile_id = shaper_profile_id;
- rte_memcpy(&shaper_profile->profile, profile,
+ memcpy(&shaper_profile->profile, profile,
sizeof(struct rte_tm_shaper_params));
TAILQ_INSERT_TAIL(&pf->tm_conf.shaper_profile_list,
shaper_profile, node);
@@ -526,7 +526,7 @@ i40e_node_add(struct rte_eth_dev *dev, uint32_t node_id,
tm_node->reference_count = 0;
tm_node->parent = NULL;
tm_node->shaper_profile = shaper_profile;
- rte_memcpy(&tm_node->params, params,
+ memcpy(&tm_node->params, params,
sizeof(struct rte_tm_node_params));
pf->tm_conf.root = tm_node;
@@ -600,7 +600,7 @@ i40e_node_add(struct rte_eth_dev *dev, uint32_t node_id,
tm_node->reference_count = 0;
tm_node->parent = parent_node;
tm_node->shaper_profile = shaper_profile;
- rte_memcpy(&tm_node->params, params,
+ memcpy(&tm_node->params, params,
sizeof(struct rte_tm_node_params));
if (parent_node_type == I40E_TM_NODE_TYPE_PORT) {
TAILQ_INSERT_TAIL(&pf->tm_conf.tc_list,
diff --git a/drivers/net/intel/i40e/rte_pmd_i40e.c b/drivers/net/intel/i40e/rte_pmd_i40e.c
index 4fdef9464b..6049b77d6f 100644
--- a/drivers/net/intel/i40e/rte_pmd_i40e.c
+++ b/drivers/net/intel/i40e/rte_pmd_i40e.c
@@ -94,7 +94,7 @@ rte_pmd_i40e_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf_id, uint8_t on)
vsi->info.sec_flags &= ~I40E_AQ_VSI_SEC_FLAG_ENABLE_MAC_CHK;
memset(&ctxt, 0, sizeof(ctxt));
- rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
+ memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
ctxt.seid = vsi->seid;
hw = I40E_VSI_TO_HW(vsi);
@@ -197,7 +197,7 @@ rte_pmd_i40e_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf_id, uint8_t on)
vsi->info.sec_flags &= ~I40E_AQ_VSI_SEC_FLAG_ENABLE_VLAN_CHK;
memset(&ctxt, 0, sizeof(ctxt));
- rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
+ memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
ctxt.seid = vsi->seid;
hw = I40E_VSI_TO_HW(vsi);
@@ -242,7 +242,7 @@ i40e_vsi_rm_mac_filter(struct i40e_vsi *vsi)
for (i = 0; i < vlan_num; i++) {
mv_f[i].filter_type = filter_type;
- rte_memcpy(&mv_f[i].macaddr,
+ memcpy(&mv_f[i].macaddr,
&f->mac_info.mac_addr,
ETH_ADDR_LEN);
}
@@ -303,7 +303,7 @@ i40e_vsi_restore_mac_filter(struct i40e_vsi *vsi)
for (i = 0; i < vlan_num; i++) {
mv_f[i].filter_type = f->mac_info.filter_type;
- rte_memcpy(&mv_f[i].macaddr,
+ memcpy(&mv_f[i].macaddr,
&f->mac_info.mac_addr,
ETH_ADDR_LEN);
}
@@ -385,7 +385,7 @@ i40e_vsi_set_tx_loopback(struct i40e_vsi *vsi, uint8_t on)
vsi->info.switch_id &= ~I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB;
memset(&ctxt, 0, sizeof(ctxt));
- rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
+ memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
ctxt.seid = vsi->seid;
ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
@@ -716,7 +716,7 @@ int rte_pmd_i40e_set_vf_vlan_insert(uint16_t port, uint16_t vf_id,
vsi->info.port_vlan_flags &= ~I40E_AQ_VSI_PVLAN_INSERT_PVID;
memset(&ctxt, 0, sizeof(ctxt));
- rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
+ memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
ctxt.seid = vsi->seid;
hw = I40E_VSI_TO_HW(vsi);
@@ -779,7 +779,7 @@ int rte_pmd_i40e_set_vf_broadcast(uint16_t port, uint16_t vf_id,
}
if (on) {
- rte_memcpy(&filter.mac_addr, &broadcast, RTE_ETHER_ADDR_LEN);
+ memcpy(&filter.mac_addr, &broadcast, RTE_ETHER_ADDR_LEN);
filter.filter_type = I40E_MACVLAN_PERFECT_MATCH;
ret = i40e_vsi_add_mac(vsi, &filter);
} else {
@@ -852,7 +852,7 @@ int rte_pmd_i40e_set_vf_vlan_tag(uint16_t port, uint16_t vf_id, uint8_t on)
}
memset(&ctxt, 0, sizeof(ctxt));
- rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
+ memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
ctxt.seid = vsi->seid;
hw = I40E_VSI_TO_HW(vsi);
@@ -2591,9 +2591,9 @@ i40e_vsi_update_queue_region_mapping(struct i40e_hw *hw,
return ret;
}
/* update the local VSI info with updated queue map */
- rte_memcpy(&vsi->info.tc_mapping, &ctxt.info.tc_mapping,
+ memcpy(&vsi->info.tc_mapping, &ctxt.info.tc_mapping,
sizeof(vsi->info.tc_mapping));
- rte_memcpy(&vsi->info.queue_mapping,
+ memcpy(&vsi->info.queue_mapping,
&ctxt.info.queue_mapping,
sizeof(vsi->info.queue_mapping));
vsi->info.mapping_flags = ctxt.info.mapping_flags;
--
2.51.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [RFC PATCH 4/8] net/ixgbe: replace use of DPDK-specific memcpy function
2026-05-19 16:05 [RFC PATCH 0/8] remove use of rte_memcpy from net/intel Bruce Richardson
` (2 preceding siblings ...)
2026-05-19 16:06 ` [RFC PATCH 3/8] net/i40e: " Bruce Richardson
@ 2026-05-19 16:06 ` Bruce Richardson
2026-05-19 16:06 ` [RFC PATCH 5/8] net/e1000: " Bruce Richardson
` (5 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2026-05-19 16:06 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
The driver use of memcpy is for control path work, for example, flow
configuration and so is fine using the standard libc memcpy function in
place of the DPDK-specific rte_memcpy version.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/ixgbe/ixgbe_ethdev.c | 4 ++--
drivers/net/intel/ixgbe/ixgbe_fdir.c | 6 ++---
drivers/net/intel/ixgbe/ixgbe_flow.c | 32 ++++++++++++-------------
drivers/net/intel/ixgbe/ixgbe_ipsec.c | 4 ++--
drivers/net/intel/ixgbe/ixgbe_pf.c | 5 ++--
drivers/net/intel/ixgbe/ixgbe_tm.c | 6 ++---
drivers/net/intel/ixgbe/rte_pmd_ixgbe.c | 2 +-
7 files changed, 29 insertions(+), 30 deletions(-)
diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.c b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
index 57d929cf2c..d4e3d643f8 100644
--- a/drivers/net/intel/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
@@ -6805,7 +6805,7 @@ ixgbe_add_del_ntuple_filter(struct rte_eth_dev *dev,
sizeof(struct ixgbe_5tuple_filter), 0);
if (filter == NULL)
return -ENOMEM;
- rte_memcpy(&filter->filter_info,
+ memcpy(&filter->filter_info,
&filter_5tuple,
sizeof(struct ixgbe_5tuple_filter_info));
filter->queue = ntuple_filter->queue;
@@ -7867,7 +7867,7 @@ ixgbe_dev_l2_tunnel_filter_add(struct rte_eth_dev *dev,
if (!node)
return -ENOMEM;
- rte_memcpy(&node->key,
+ memcpy(&node->key,
&key,
sizeof(struct ixgbe_l2_tn_key));
node->pool = l2_tunnel->pool;
diff --git a/drivers/net/intel/ixgbe/ixgbe_fdir.c b/drivers/net/intel/ixgbe/ixgbe_fdir.c
index 0bdfbd411a..003f8240bd 100644
--- a/drivers/net/intel/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/intel/ixgbe/ixgbe_fdir.c
@@ -53,7 +53,7 @@
#define IPV6_ADDR_TO_MASK(ipaddr, ipv6m) do { \
uint8_t ipv6_addr[16]; \
uint8_t i; \
- rte_memcpy(ipv6_addr, (ipaddr), sizeof(ipv6_addr));\
+ memcpy(ipv6_addr, (ipaddr), sizeof(ipv6_addr));\
(ipv6m) = 0; \
for (i = 0; i < sizeof(ipv6_addr); i++) { \
if (ipv6_addr[i] == UINT8_MAX) \
@@ -73,7 +73,7 @@
else \
ipv6_addr[i] = 0; \
} \
- rte_memcpy((ipaddr), ipv6_addr, sizeof(ipv6_addr));\
+ memcpy((ipaddr), ipv6_addr, sizeof(ipv6_addr));\
} while (0)
#define IXGBE_FDIRIP6M_INNER_MAC_SHIFT 4
@@ -1219,7 +1219,7 @@ ixgbe_fdir_filter_program(struct rte_eth_dev *dev,
0);
if (!node)
return -ENOMEM;
- rte_memcpy(&node->ixgbe_fdir,
+ memcpy(&node->ixgbe_fdir,
&rule->ixgbe_fdir,
sizeof(union ixgbe_atr_input));
node->fdirflags = fdircmd_flags;
diff --git a/drivers/net/intel/ixgbe/ixgbe_flow.c b/drivers/net/intel/ixgbe/ixgbe_flow.c
index 01cd4f9bde..8671761bc5 100644
--- a/drivers/net/intel/ixgbe/ixgbe_flow.c
+++ b/drivers/net/intel/ixgbe/ixgbe_flow.c
@@ -2024,9 +2024,9 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
if (item->spec) {
rule->b_spec = TRUE;
ipv6_spec = item->spec;
- rte_memcpy(rule->ixgbe_fdir.formatted.src_ip,
+ memcpy(rule->ixgbe_fdir.formatted.src_ip,
&ipv6_spec->hdr.src_addr, 16);
- rte_memcpy(rule->ixgbe_fdir.formatted.dst_ip,
+ memcpy(rule->ixgbe_fdir.formatted.dst_ip,
&ipv6_spec->hdr.dst_addr, 16);
}
@@ -2581,13 +2581,13 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
return -rte_errno;
}
- rte_memcpy(&rule->mask.tunnel_id_mask, vxlan_mask->hdr.vni,
+ memcpy(&rule->mask.tunnel_id_mask, vxlan_mask->hdr.vni,
RTE_DIM(vxlan_mask->hdr.vni));
if (item->spec) {
rule->b_spec = TRUE;
vxlan_spec = item->spec;
- rte_memcpy(((uint8_t *)
+ memcpy(((uint8_t *)
&rule->ixgbe_fdir.formatted.tni_vni),
vxlan_spec->hdr.vni, RTE_DIM(vxlan_spec->hdr.vni));
}
@@ -2658,7 +2658,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
return -rte_errno;
}
/* tni is a 24-bits bit field */
- rte_memcpy(&rule->mask.tunnel_id_mask, nvgre_mask->tni,
+ memcpy(&rule->mask.tunnel_id_mask, nvgre_mask->tni,
RTE_DIM(nvgre_mask->tni));
rule->mask.tunnel_id_mask <<= 8;
@@ -2684,7 +2684,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
return -rte_errno;
}
/* tni is a 24-bits bit field */
- rte_memcpy(&rule->ixgbe_fdir.formatted.tni_vni,
+ memcpy(&rule->ixgbe_fdir.formatted.tni_vni,
nvgre_spec->tni, RTE_DIM(nvgre_spec->tni));
}
}
@@ -3155,7 +3155,7 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
PMD_DRV_LOG(ERR, "failed to allocate memory");
goto out;
}
- rte_memcpy(&ntuple_filter_ptr->filter_info,
+ memcpy(&ntuple_filter_ptr->filter_info,
&ntuple_filter,
sizeof(struct rte_eth_ntuple_filter));
TAILQ_INSERT_TAIL(&filter_ntuple_list,
@@ -3181,7 +3181,7 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
PMD_DRV_LOG(ERR, "failed to allocate memory");
goto out;
}
- rte_memcpy(ðertype_filter_ptr->filter_info,
+ memcpy(ðertype_filter_ptr->filter_info,
ðertype_filter,
sizeof(struct rte_eth_ethertype_filter));
TAILQ_INSERT_TAIL(&filter_ethertype_list,
@@ -3205,7 +3205,7 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
PMD_DRV_LOG(ERR, "failed to allocate memory");
goto out;
}
- rte_memcpy(&syn_filter_ptr->filter_info,
+ memcpy(&syn_filter_ptr->filter_info,
&syn_filter,
sizeof(struct rte_eth_syn_filter));
TAILQ_INSERT_TAIL(&filter_syn_list,
@@ -3268,7 +3268,7 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
PMD_DRV_LOG(ERR, "failed to allocate memory");
goto out;
}
- rte_memcpy(&fdir_rule_ptr->filter_info,
+ memcpy(&fdir_rule_ptr->filter_info,
&fdir_rule,
sizeof(struct ixgbe_fdir_rule));
TAILQ_INSERT_TAIL(&filter_fdir_list,
@@ -3305,7 +3305,7 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
PMD_DRV_LOG(ERR, "failed to allocate memory");
goto out;
}
- rte_memcpy(&l2_tn_filter_ptr->filter_info,
+ memcpy(&l2_tn_filter_ptr->filter_info,
&l2_tn_filter,
sizeof(struct ixgbe_l2_tunnel_conf));
TAILQ_INSERT_TAIL(&filter_l2_tunnel_list,
@@ -3447,7 +3447,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
case RTE_ETH_FILTER_NTUPLE:
ntuple_filter_ptr = (struct ixgbe_ntuple_filter_ele *)
pmd_flow->rule;
- rte_memcpy(&ntuple_filter,
+ memcpy(&ntuple_filter,
&ntuple_filter_ptr->filter_info,
sizeof(struct rte_eth_ntuple_filter));
ret = ixgbe_add_del_ntuple_filter(dev, &ntuple_filter, FALSE);
@@ -3460,7 +3460,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
case RTE_ETH_FILTER_ETHERTYPE:
ethertype_filter_ptr = (struct ixgbe_ethertype_filter_ele *)
pmd_flow->rule;
- rte_memcpy(ðertype_filter,
+ memcpy(ðertype_filter,
ðertype_filter_ptr->filter_info,
sizeof(struct rte_eth_ethertype_filter));
ret = ixgbe_add_del_ethertype_filter(dev,
@@ -3474,7 +3474,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
case RTE_ETH_FILTER_SYN:
syn_filter_ptr = (struct ixgbe_eth_syn_filter_ele *)
pmd_flow->rule;
- rte_memcpy(&syn_filter,
+ memcpy(&syn_filter,
&syn_filter_ptr->filter_info,
sizeof(struct rte_eth_syn_filter));
ret = ixgbe_syn_filter_set(dev, &syn_filter, FALSE);
@@ -3486,7 +3486,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
break;
case RTE_ETH_FILTER_FDIR:
fdir_rule_ptr = (struct ixgbe_fdir_rule_ele *)pmd_flow->rule;
- rte_memcpy(&fdir_rule,
+ memcpy(&fdir_rule,
&fdir_rule_ptr->filter_info,
sizeof(struct ixgbe_fdir_rule));
ret = ixgbe_fdir_filter_program(dev, &fdir_rule, TRUE, FALSE);
@@ -3501,7 +3501,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
case RTE_ETH_FILTER_L2_TUNNEL:
l2_tn_filter_ptr = (struct ixgbe_eth_l2_tunnel_conf_ele *)
pmd_flow->rule;
- rte_memcpy(&l2_tn_filter, &l2_tn_filter_ptr->filter_info,
+ memcpy(&l2_tn_filter, &l2_tn_filter_ptr->filter_info,
sizeof(struct ixgbe_l2_tunnel_conf));
ret = ixgbe_dev_l2_tunnel_filter_del(dev, &l2_tn_filter);
if (!ret) {
diff --git a/drivers/net/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/intel/ixgbe/ixgbe_ipsec.c
index fe9a96c54d..fd3d7a6689 100644
--- a/drivers/net/intel/ixgbe/ixgbe_ipsec.c
+++ b/drivers/net/intel/ixgbe/ixgbe_ipsec.c
@@ -674,9 +674,9 @@ ixgbe_crypto_add_ingress_sa_from_flow(struct rte_security_session *sess,
const struct rte_flow_item_ipv6 *ipv6 = &spec->spec.ipv6;
ic_session->src_ip.type = IPv6;
ic_session->dst_ip.type = IPv6;
- rte_memcpy(ic_session->src_ip.ipv6,
+ memcpy(ic_session->src_ip.ipv6,
&ipv6->hdr.src_addr, 16);
- rte_memcpy(ic_session->dst_ip.ipv6,
+ memcpy(ic_session->dst_ip.ipv6,
&ipv6->hdr.dst_addr, 16);
} else {
const struct rte_flow_item_ipv4 *ipv4 = &spec->spec.ipv4;
diff --git a/drivers/net/intel/ixgbe/ixgbe_pf.c b/drivers/net/intel/ixgbe/ixgbe_pf.c
index d9a775f99a..d3db571918 100644
--- a/drivers/net/intel/ixgbe/ixgbe_pf.c
+++ b/drivers/net/intel/ixgbe/ixgbe_pf.c
@@ -16,7 +16,6 @@
#include <rte_eal.h>
#include <rte_ether.h>
#include <ethdev_driver.h>
-#include <rte_memcpy.h>
#include <rte_malloc.h>
#include <rte_random.h>
@@ -452,7 +451,7 @@ ixgbe_vf_reset(struct rte_eth_dev *dev, uint16_t vf, uint32_t *msgbuf)
/* reply to reset with success and vf mac address */
msgbuf[0] = IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_SUCCESS;
- rte_memcpy(new_mac, vf_mac, RTE_ETHER_ADDR_LEN);
+ memcpy(new_mac, vf_mac, RTE_ETHER_ADDR_LEN);
/*
* Piggyback the multicast filter type so VF can compute the
* correct vectors
@@ -474,7 +473,7 @@ ixgbe_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
if (rte_is_valid_assigned_ether_addr(
(struct rte_ether_addr *)new_mac)) {
- rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac, 6);
+ memcpy(vfinfo[vf].vf_mac_addresses, new_mac, 6);
return hw->mac.ops.set_rar(hw, rar_entry, new_mac, vf, IXGBE_RAH_AV);
}
return -1;
diff --git a/drivers/net/intel/ixgbe/ixgbe_tm.c b/drivers/net/intel/ixgbe/ixgbe_tm.c
index 27a821285d..e1d8364f46 100644
--- a/drivers/net/intel/ixgbe/ixgbe_tm.c
+++ b/drivers/net/intel/ixgbe/ixgbe_tm.c
@@ -289,7 +289,7 @@ ixgbe_shaper_profile_add(struct rte_eth_dev *dev,
if (!shaper_profile)
return -ENOMEM;
shaper_profile->shaper_profile_id = shaper_profile_id;
- rte_memcpy(&shaper_profile->profile, profile,
+ memcpy(&shaper_profile->profile, profile,
sizeof(struct rte_tm_shaper_params));
TAILQ_INSERT_TAIL(&tm_conf->shaper_profile_list,
shaper_profile, node);
@@ -637,7 +637,7 @@ ixgbe_node_add(struct rte_eth_dev *dev, uint32_t node_id,
tm_node->no = 0;
tm_node->parent = NULL;
tm_node->shaper_profile = shaper_profile;
- rte_memcpy(&tm_node->params, params,
+ memcpy(&tm_node->params, params,
sizeof(struct rte_tm_node_params));
tm_conf->root = tm_node;
@@ -718,7 +718,7 @@ ixgbe_node_add(struct rte_eth_dev *dev, uint32_t node_id,
tm_node->reference_count = 0;
tm_node->parent = parent_node;
tm_node->shaper_profile = shaper_profile;
- rte_memcpy(&tm_node->params, params,
+ memcpy(&tm_node->params, params,
sizeof(struct rte_tm_node_params));
if (parent_node_type == IXGBE_TM_NODE_TYPE_PORT) {
tm_node->no = parent_node->reference_count;
diff --git a/drivers/net/intel/ixgbe/rte_pmd_ixgbe.c b/drivers/net/intel/ixgbe/rte_pmd_ixgbe.c
index c2300a8955..30dec57be8 100644
--- a/drivers/net/intel/ixgbe/rte_pmd_ixgbe.c
+++ b/drivers/net/intel/ixgbe/rte_pmd_ixgbe.c
@@ -39,7 +39,7 @@ rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
if (rte_is_valid_assigned_ether_addr(
(struct rte_ether_addr *)new_mac)) {
- rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac,
+ memcpy(vfinfo[vf].vf_mac_addresses, new_mac,
RTE_ETHER_ADDR_LEN);
return hw->mac.ops.set_rar(hw, rar_entry, new_mac, vf,
IXGBE_RAH_AV);
--
2.51.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [RFC PATCH 5/8] net/e1000: replace use of DPDK-specific memcpy function
2026-05-19 16:05 [RFC PATCH 0/8] remove use of rte_memcpy from net/intel Bruce Richardson
` (3 preceding siblings ...)
2026-05-19 16:06 ` [RFC PATCH 4/8] net/ixgbe: " Bruce Richardson
@ 2026-05-19 16:06 ` Bruce Richardson
2026-05-19 16:06 ` [RFC PATCH 6/8] net/idpf: " Bruce Richardson
` (4 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2026-05-19 16:06 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
The driver use of memcpy is for control path work, for example, flow
configuration and so is fine using the standard libc memcpy function in
place of the DPDK-specific rte_memcpy version.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/e1000/em_rxtx.c | 1 -
drivers/net/intel/e1000/igb_flow.c | 8 ++++----
drivers/net/intel/e1000/igb_pf.c | 5 ++---
drivers/net/intel/e1000/igb_rxtx.c | 1 -
4 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/net/intel/e1000/em_rxtx.c b/drivers/net/intel/e1000/em_rxtx.c
index 54971fe285..5879013a1d 100644
--- a/drivers/net/intel/e1000/em_rxtx.c
+++ b/drivers/net/intel/e1000/em_rxtx.c
@@ -20,7 +20,6 @@
#include <rte_pci.h>
#include <bus_pci_driver.h>
#include <rte_memory.h>
-#include <rte_memcpy.h>
#include <rte_memzone.h>
#include <rte_launch.h>
#include <rte_eal.h>
diff --git a/drivers/net/intel/e1000/igb_flow.c b/drivers/net/intel/e1000/igb_flow.c
index ea9b290e1c..ca76bf5ae4 100644
--- a/drivers/net/intel/e1000/igb_flow.c
+++ b/drivers/net/intel/e1000/igb_flow.c
@@ -1484,7 +1484,7 @@ igb_flow_create(struct rte_eth_dev *dev,
goto out;
}
- rte_memcpy(&ntuple_filter_ptr->filter_info,
+ memcpy(&ntuple_filter_ptr->filter_info,
&ntuple_filter,
sizeof(struct rte_eth_ntuple_filter));
TAILQ_INSERT_TAIL(&igb_filter_ntuple_list,
@@ -1511,7 +1511,7 @@ igb_flow_create(struct rte_eth_dev *dev,
goto out;
}
- rte_memcpy(ðertype_filter_ptr->filter_info,
+ memcpy(ðertype_filter_ptr->filter_info,
ðertype_filter,
sizeof(struct rte_eth_ethertype_filter));
TAILQ_INSERT_TAIL(&igb_filter_ethertype_list,
@@ -1536,7 +1536,7 @@ igb_flow_create(struct rte_eth_dev *dev,
goto out;
}
- rte_memcpy(&syn_filter_ptr->filter_info,
+ memcpy(&syn_filter_ptr->filter_info,
&syn_filter,
sizeof(struct rte_eth_syn_filter));
TAILQ_INSERT_TAIL(&igb_filter_syn_list,
@@ -1562,7 +1562,7 @@ igb_flow_create(struct rte_eth_dev *dev,
goto out;
}
- rte_memcpy(&flex_filter_ptr->filter_info,
+ memcpy(&flex_filter_ptr->filter_info,
&flex_filter,
sizeof(struct igb_flex_filter));
TAILQ_INSERT_TAIL(&igb_filter_flex_list,
diff --git a/drivers/net/intel/e1000/igb_pf.c b/drivers/net/intel/e1000/igb_pf.c
index c7588ea57e..a3327e0bf0 100644
--- a/drivers/net/intel/e1000/igb_pf.c
+++ b/drivers/net/intel/e1000/igb_pf.c
@@ -17,7 +17,6 @@
#include <rte_eal.h>
#include <rte_ether.h>
#include <ethdev_driver.h>
-#include <rte_memcpy.h>
#include <rte_malloc.h>
#include <rte_random.h>
@@ -290,7 +289,7 @@ igb_vf_reset(struct rte_eth_dev *dev, uint16_t vf, uint32_t *msgbuf)
/* reply to reset with ack and vf mac address */
msgbuf[0] = E1000_VF_RESET | E1000_VT_MSGTYPE_ACK;
- rte_memcpy(new_mac, vf_mac, RTE_ETHER_ADDR_LEN);
+ memcpy(new_mac, vf_mac, RTE_ETHER_ADDR_LEN);
e1000_write_mbx(hw, msgbuf, 3, vf);
return 0;
@@ -308,7 +307,7 @@ igb_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
if (rte_is_unicast_ether_addr((struct rte_ether_addr *)new_mac)) {
if (!rte_is_zero_ether_addr((struct rte_ether_addr *)new_mac))
- rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac,
+ memcpy(vfinfo[vf].vf_mac_addresses, new_mac,
sizeof(vfinfo[vf].vf_mac_addresses));
hw->mac.ops.rar_set(hw, new_mac, rar_entry);
rah = E1000_READ_REG(hw, E1000_RAH(rar_entry));
diff --git a/drivers/net/intel/e1000/igb_rxtx.c b/drivers/net/intel/e1000/igb_rxtx.c
index 14b2858817..4fda5d57a0 100644
--- a/drivers/net/intel/e1000/igb_rxtx.c
+++ b/drivers/net/intel/e1000/igb_rxtx.c
@@ -19,7 +19,6 @@
#include <rte_debug.h>
#include <rte_pci.h>
#include <rte_memory.h>
-#include <rte_memcpy.h>
#include <rte_memzone.h>
#include <rte_launch.h>
#include <rte_eal.h>
--
2.51.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [RFC PATCH 6/8] net/idpf: replace use of DPDK-specific memcpy function
2026-05-19 16:05 [RFC PATCH 0/8] remove use of rte_memcpy from net/intel Bruce Richardson
` (4 preceding siblings ...)
2026-05-19 16:06 ` [RFC PATCH 5/8] net/e1000: " Bruce Richardson
@ 2026-05-19 16:06 ` Bruce Richardson
2026-05-19 16:06 ` [RFC PATCH 7/8] net/cpfl: " Bruce Richardson
` (3 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2026-05-19 16:06 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
The driver use of memcpy is for control path work, for example, flow
configuration and so is fine using the standard libc memcpy function in
place of the DPDK-specific rte_memcpy version.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/idpf/base/idpf_osdep.h | 5 ++---
drivers/net/intel/idpf/idpf_common_device.c | 2 +-
drivers/net/intel/idpf/idpf_common_virtchnl.c | 20 +++++++++----------
drivers/net/intel/idpf/idpf_ethdev.c | 10 +++++-----
drivers/net/intel/idpf/idpf_rxtx.c | 8 ++++----
5 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/drivers/net/intel/idpf/base/idpf_osdep.h b/drivers/net/intel/idpf/base/idpf_osdep.h
index 47b95d0da6..67bc33f2e6 100644
--- a/drivers/net/intel/idpf/base/idpf_osdep.h
+++ b/drivers/net/intel/idpf/base/idpf_osdep.h
@@ -14,7 +14,6 @@
#include <stdbool.h>
#include <rte_common.h>
-#include <rte_memcpy.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
#include <rte_byteorder.h>
@@ -199,8 +198,8 @@ struct __rte_packed_begin idpf_virt_mem {
#define idpf_free(h, m) rte_free(m)
#define idpf_memset(a, b, c, d) memset((a), (b), (c))
-#define idpf_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
-#define idpf_memdup(a, b, c, d) rte_memcpy(idpf_malloc(a, c), b, c)
+#define idpf_memcpy(a, b, c, d) memcpy((a), (b), (c))
+#define idpf_memdup(a, b, c, d) memcpy(idpf_malloc(a, c), b, c)
#define CPU_TO_BE16(o) rte_cpu_to_be_16(o)
#define CPU_TO_BE32(o) rte_cpu_to_be_32(o)
diff --git a/drivers/net/intel/idpf/idpf_common_device.c b/drivers/net/intel/idpf/idpf_common_device.c
index 24ee00db23..f27a911977 100644
--- a/drivers/net/intel/idpf/idpf_common_device.c
+++ b/drivers/net/intel/idpf/idpf_common_device.c
@@ -496,7 +496,7 @@ 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,
+ 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,
diff --git a/drivers/net/intel/idpf/idpf_common_virtchnl.c b/drivers/net/intel/idpf/idpf_common_virtchnl.c
index f8c487c537..4befd5fc83 100644
--- a/drivers/net/intel/idpf/idpf_common_virtchnl.c
+++ b/drivers/net/intel/idpf/idpf_common_virtchnl.c
@@ -141,7 +141,7 @@ idpf_read_msg_from_cp(struct idpf_adapter *adapter, uint16_t buf_len,
return result;
}
- rte_memcpy(buf, ctlq_msg.ctx.indirect.payload->va, buf_len);
+ memcpy(buf, ctlq_msg.ctx.indirect.payload->va, buf_len);
opcode = rte_le_to_cpu_32(ctlq_msg.cookie.mbx.chnl_opcode);
adapter->cmd_retval = rte_le_to_cpu_32(ctlq_msg.cookie.mbx.chnl_retval);
@@ -323,7 +323,7 @@ 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;
}
@@ -361,7 +361,7 @@ 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;
}
@@ -419,7 +419,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;
}
@@ -475,7 +475,7 @@ idpf_vc_rss_key_set(struct idpf_vport *vport)
rss_key->vport_id = vport->vport_id;
rss_key->key_len = vport->rss_key_size;
- rte_memcpy(rss_key->key, vport->rss_key,
+ memcpy(rss_key->key, vport->rss_key,
sizeof(rss_key->key[0]) * vport->rss_key_size);
memset(&args, 0, sizeof(args));
@@ -528,7 +528,7 @@ int idpf_vc_rss_key_get(struct idpf_vport *vport)
return -ENOMEM;
}
}
- rte_memcpy(vport->rss_key, rss_key_ret->key, vport->rss_key_size);
+ memcpy(vport->rss_key, rss_key_ret->key, vport->rss_key_size);
} else {
DRV_LOG(ERR, "Failed to execute command of VIRTCHNL2_OP_GET_RSS_KEY");
}
@@ -553,7 +553,7 @@ idpf_vc_rss_lut_set(struct idpf_vport *vport)
rss_lut->vport_id = vport->vport_id;
rss_lut->lut_entries = vport->rss_lut_size;
- rte_memcpy(rss_lut->lut, vport->rss_lut,
+ memcpy(rss_lut->lut, vport->rss_lut,
sizeof(rss_lut->lut[0]) * vport->rss_lut_size);
memset(&args, 0, sizeof(args));
@@ -605,7 +605,7 @@ idpf_vc_rss_lut_get(struct idpf_vport *vport)
return -ENOMEM;
}
}
- rte_memcpy(vport->rss_lut, rss_lut_ret->lut, rss_lut_ret->lut_entries);
+ memcpy(vport->rss_lut, rss_lut_ret->lut, rss_lut_ret->lut_entries);
vport->rss_lut_size = rss_lut_ret->lut_entries;
} else {
DRV_LOG(ERR, "Failed to execute command of VIRTCHNL2_OP_GET_RSS_LUT");
@@ -742,7 +742,7 @@ idpf_vc_vectors_alloc(struct idpf_vport *vport, uint16_t num_vectors)
if (err != 0)
DRV_LOG(ERR, "Failed to execute command VIRTCHNL2_OP_ALLOC_VECTORS");
- rte_memcpy(vport->recv_vectors, args.out_buffer, len);
+ memcpy(vport->recv_vectors, args.out_buffer, len);
rte_free(alloc_vec);
return err;
}
@@ -1007,7 +1007,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/net/intel/idpf/idpf_ethdev.c b/drivers/net/intel/idpf/idpf_ethdev.c
index 5e57a45775..6b3016ba77 100644
--- a/drivers/net/intel/idpf/idpf_ethdev.c
+++ b/drivers/net/intel/idpf/idpf_ethdev.c
@@ -439,7 +439,7 @@ idpf_init_rss(struct idpf_vport *vport)
vport->rss_key_size);
return -EINVAL;
} else {
- rte_memcpy(vport->rss_key, rss_conf->rss_key,
+ memcpy(vport->rss_key, rss_conf->rss_key,
vport->rss_key_size);
}
@@ -558,7 +558,7 @@ idpf_rss_hash_update(struct rte_eth_dev *dev,
return -EINVAL;
}
- rte_memcpy(vport->rss_key, rss_conf->rss_key,
+ memcpy(vport->rss_key, rss_conf->rss_key,
vport->rss_key_size);
ret = idpf_vc_rss_key_set(vport);
if (ret != 0) {
@@ -631,7 +631,7 @@ idpf_rss_hash_conf_get(struct rte_eth_dev *dev,
if (rss_conf->rss_key_len > vport->rss_key_size)
rss_conf->rss_key_len = vport->rss_key_size;
- rte_memcpy(rss_conf->rss_key, vport->rss_key, rss_conf->rss_key_len);
+ memcpy(rss_conf->rss_key, vport->rss_key, rss_conf->rss_key_len);
return 0;
}
@@ -1363,7 +1363,7 @@ idpf_handle_virtchnl_msg(struct idpf_adapter_ext *adapter_ex)
return;
}
- rte_memcpy(adapter->mbx_resp, ctlq_msg.ctx.indirect.payload->va,
+ memcpy(adapter->mbx_resp, ctlq_msg.ctx.indirect.payload->va,
IDPF_DFLT_MBX_BUF_SIZE);
mbx_op = rte_le_to_cpu_16(ctlq_msg.opcode);
@@ -1477,7 +1477,7 @@ idpf_adapter_ext_init(struct rte_pci_device *pci_dev, struct idpf_adapter_ext *a
strncpy(adapter->name, pci_dev->device.name, PCI_PRI_STR_SIZE);
- rte_memcpy(&base->caps, &req_caps, sizeof(struct virtchnl2_get_capabilities));
+ memcpy(&base->caps, &req_caps, sizeof(struct virtchnl2_get_capabilities));
ret = idpf_adapter_init(base);
if (ret != 0) {
diff --git a/drivers/net/intel/idpf/idpf_rxtx.c b/drivers/net/intel/idpf/idpf_rxtx.c
index b316c77b62..07f3df4a80 100644
--- a/drivers/net/intel/idpf/idpf_rxtx.c
+++ b/drivers/net/intel/idpf/idpf_rxtx.c
@@ -74,7 +74,7 @@ idpf_dma_zone_reserve(struct rte_eth_dev *dev, uint16_t queue_idx,
else
ring_size = RTE_ALIGN(len * sizeof(struct ci_tx_desc),
IDPF_DMA_MEM_ALIGN);
- rte_memcpy(ring_name, "idpf Tx ring", sizeof("idpf Tx ring"));
+ memcpy(ring_name, "idpf Tx ring", sizeof("idpf Tx ring"));
break;
case VIRTCHNL2_QUEUE_TYPE_RX:
if (splitq)
@@ -83,17 +83,17 @@ idpf_dma_zone_reserve(struct rte_eth_dev *dev, uint16_t queue_idx,
else
ring_size = RTE_ALIGN(len * sizeof(struct virtchnl2_singleq_rx_buf_desc),
IDPF_DMA_MEM_ALIGN);
- rte_memcpy(ring_name, "idpf Rx ring", sizeof("idpf Rx ring"));
+ memcpy(ring_name, "idpf Rx ring", sizeof("idpf Rx ring"));
break;
case VIRTCHNL2_QUEUE_TYPE_TX_COMPLETION:
ring_size = RTE_ALIGN(len * sizeof(struct idpf_splitq_tx_compl_desc),
IDPF_DMA_MEM_ALIGN);
- rte_memcpy(ring_name, "idpf Tx compl ring", sizeof("idpf Tx compl ring"));
+ memcpy(ring_name, "idpf Tx compl ring", sizeof("idpf Tx compl ring"));
break;
case VIRTCHNL2_QUEUE_TYPE_RX_BUFFER:
ring_size = RTE_ALIGN(len * sizeof(struct virtchnl2_splitq_rx_buf_desc),
IDPF_DMA_MEM_ALIGN);
- rte_memcpy(ring_name, "idpf Rx buf ring", sizeof("idpf Rx buf ring"));
+ memcpy(ring_name, "idpf Rx buf ring", sizeof("idpf Rx buf ring"));
break;
default:
PMD_INIT_LOG(ERR, "Invalid queue type");
--
2.51.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [RFC PATCH 7/8] net/cpfl: replace use of DPDK-specific memcpy function
2026-05-19 16:05 [RFC PATCH 0/8] remove use of rte_memcpy from net/intel Bruce Richardson
` (5 preceding siblings ...)
2026-05-19 16:06 ` [RFC PATCH 6/8] net/idpf: " Bruce Richardson
@ 2026-05-19 16:06 ` Bruce Richardson
2026-05-19 16:06 ` [RFC PATCH 8/8] net/ipn3ke: " Bruce Richardson
` (2 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2026-05-19 16:06 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
The driver use of memcpy is for control path work, and so is fine using
the standard libc memcpy function in place of the DPDK-specific
rte_memcpy version.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/cpfl/cpfl_ethdev.c | 4 ++--
drivers/net/intel/cpfl/cpfl_vchnl.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/intel/cpfl/cpfl_ethdev.c b/drivers/net/intel/cpfl/cpfl_ethdev.c
index 617b823f5a..552d1feb27 100644
--- a/drivers/net/intel/cpfl/cpfl_ethdev.c
+++ b/drivers/net/intel/cpfl/cpfl_ethdev.c
@@ -2112,7 +2112,7 @@ int vcpf_save_chunk_in_cfgq(struct cpfl_adapter_ext *adapter)
PMD_DRV_LOG(ERR, "Failed to allocate memory for add_q");
return -ENOMEM;
}
- rte_memcpy(adapter->cfgq_in.cfgq_add, add_q, struct_size);
+ memcpy(adapter->cfgq_in.cfgq_add, add_q, struct_size);
num_chunks = add_q->chunks.num_chunks;
for (u16 i = 0; i < num_chunks; i++) {
@@ -2536,7 +2536,7 @@ cpfl_adapter_ext_init(struct rte_pci_device *pci_dev, struct cpfl_adapter_ext *a
strncpy(adapter->name, pci_dev->device.name, PCI_PRI_STR_SIZE);
- rte_memcpy(&base->caps, &req_caps, sizeof(struct virtchnl2_get_capabilities));
+ memcpy(&base->caps, &req_caps, sizeof(struct virtchnl2_get_capabilities));
ret = idpf_adapter_init(base);
if (ret != 0) {
diff --git a/drivers/net/intel/cpfl/cpfl_vchnl.c b/drivers/net/intel/cpfl/cpfl_vchnl.c
index 9c842b60df..c9d122d2c3 100644
--- a/drivers/net/intel/cpfl/cpfl_vchnl.c
+++ b/drivers/net/intel/cpfl/cpfl_vchnl.c
@@ -32,7 +32,7 @@ cpfl_cc_vport_list_get(struct cpfl_adapter_ext *adapter,
return err;
}
- rte_memcpy(response, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE);
+ memcpy(response, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE);
return 0;
}
@@ -66,7 +66,7 @@ cpfl_cc_vport_info_get(struct cpfl_adapter_ext *adapter,
return err;
}
- rte_memcpy(response, args.out_buffer, sizeof(*response));
+ memcpy(response, args.out_buffer, sizeof(*response));
return 0;
}
@@ -139,7 +139,7 @@ vcpf_add_queues(struct cpfl_adapter_ext *adapter)
return err;
}
- rte_memcpy(adapter->addq_recv_info, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE);
+ memcpy(adapter->addq_recv_info, args.out_buffer, IDPF_DFLT_MBX_BUF_SIZE);
return err;
}
--
2.51.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [RFC PATCH 8/8] net/ipn3ke: replace use of DPDK-specific memcpy function
2026-05-19 16:05 [RFC PATCH 0/8] remove use of rte_memcpy from net/intel Bruce Richardson
` (6 preceding siblings ...)
2026-05-19 16:06 ` [RFC PATCH 7/8] net/cpfl: " Bruce Richardson
@ 2026-05-19 16:06 ` Bruce Richardson
2026-05-19 17:57 ` [RFC PATCH 0/8] remove use of rte_memcpy from net/intel Morten Brørup
2026-05-19 19:43 ` Stephen Hemminger
9 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2026-05-19 16:06 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
The driver use of memcpy is for control path work, for example, flow
configuration and so is fine using the standard libc memcpy function in
place of the DPDK-specific rte_memcpy version.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/ipn3ke/ipn3ke_ethdev.h | 1 -
drivers/net/intel/ipn3ke/ipn3ke_flow.c | 26 +++++++++----------
drivers/net/intel/ipn3ke/ipn3ke_representor.c | 8 +++---
drivers/net/intel/ipn3ke/ipn3ke_tm.c | 6 ++---
4 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/drivers/net/intel/ipn3ke/ipn3ke_ethdev.h b/drivers/net/intel/ipn3ke/ipn3ke_ethdev.h
index 4b93d2649e..0105fc9056 100644
--- a/drivers/net/intel/ipn3ke/ipn3ke_ethdev.h
+++ b/drivers/net/intel/ipn3ke/ipn3ke_ethdev.h
@@ -18,7 +18,6 @@
#include <ethdev_driver.h>
#include <ethdev_vdev.h>
#include <rte_malloc.h>
-#include <rte_memcpy.h>
#include <bus_vdev_driver.h>
#include <rte_kvargs.h>
#include <rte_spinlock.h>
diff --git a/drivers/net/intel/ipn3ke/ipn3ke_flow.c b/drivers/net/intel/ipn3ke/ipn3ke_flow.c
index a2f76268b5..941d2921fb 100644
--- a/drivers/net/intel/ipn3ke/ipn3ke_flow.c
+++ b/drivers/net/intel/ipn3ke/ipn3ke_flow.c
@@ -100,7 +100,7 @@ ipn3ke_pattern_vxlan(const struct rte_flow_item patterns[],
case RTE_FLOW_ITEM_TYPE_ETH:
eth = item->spec;
- rte_memcpy(&parser->key[0],
+ memcpy(&parser->key[0],
eth->hdr.src_addr.addr_bytes,
RTE_ETHER_ADDR_LEN);
break;
@@ -108,7 +108,7 @@ ipn3ke_pattern_vxlan(const struct rte_flow_item patterns[],
case RTE_FLOW_ITEM_TYPE_VXLAN:
vxlan = item->spec;
- rte_memcpy(&parser->key[6], vxlan->hdr.vni, 3);
+ memcpy(&parser->key[6], vxlan->hdr.vni, 3);
break;
default:
@@ -164,7 +164,7 @@ ipn3ke_pattern_mac(const struct rte_flow_item patterns[],
case RTE_FLOW_ITEM_TYPE_ETH:
eth = item->spec;
- rte_memcpy(parser->key,
+ memcpy(parser->key,
eth->hdr.src_addr.addr_bytes,
RTE_ETHER_ADDR_LEN);
break;
@@ -369,13 +369,13 @@ ipn3ke_pattern_ip_tcp(const struct rte_flow_item patterns[],
case RTE_FLOW_ITEM_TYPE_IPV4:
ipv4 = item->spec;
- rte_memcpy(&parser->key[0], &ipv4->hdr.src_addr, 4);
+ memcpy(&parser->key[0], &ipv4->hdr.src_addr, 4);
break;
case RTE_FLOW_ITEM_TYPE_TCP:
tcp = item->spec;
- rte_memcpy(&parser->key[4], &tcp->hdr.src_port, 2);
+ memcpy(&parser->key[4], &tcp->hdr.src_port, 2);
break;
default:
@@ -434,13 +434,13 @@ ipn3ke_pattern_ip_udp(const struct rte_flow_item patterns[],
case RTE_FLOW_ITEM_TYPE_IPV4:
ipv4 = item->spec;
- rte_memcpy(&parser->key[0], &ipv4->hdr.src_addr, 4);
+ memcpy(&parser->key[0], &ipv4->hdr.src_addr, 4);
break;
case RTE_FLOW_ITEM_TYPE_UDP:
udp = item->spec;
- rte_memcpy(&parser->key[4], &udp->hdr.src_port, 2);
+ memcpy(&parser->key[4], &udp->hdr.src_port, 2);
break;
default:
@@ -502,19 +502,19 @@ ipn3ke_pattern_ip_nvgre(const struct rte_flow_item patterns[],
case RTE_FLOW_ITEM_TYPE_IPV4:
ipv4 = item->spec;
- rte_memcpy(&parser->key[0], &ipv4->hdr.src_addr, 4);
+ memcpy(&parser->key[0], &ipv4->hdr.src_addr, 4);
break;
case RTE_FLOW_ITEM_TYPE_UDP:
udp = item->spec;
- rte_memcpy(&parser->key[4], &udp->hdr.src_port, 2);
+ memcpy(&parser->key[4], &udp->hdr.src_port, 2);
break;
case RTE_FLOW_ITEM_TYPE_NVGRE:
nvgre = item->spec;
- rte_memcpy(&parser->key[6], nvgre->tni, 3);
+ memcpy(&parser->key[6], nvgre->tni, 3);
break;
default:
@@ -576,19 +576,19 @@ ipn3ke_pattern_vxlan_ip_udp(const struct rte_flow_item patterns[],
case RTE_FLOW_ITEM_TYPE_VXLAN:
vxlan = item->spec;
- rte_memcpy(&parser->key[0], vxlan->hdr.vni, 3);
+ memcpy(&parser->key[0], vxlan->hdr.vni, 3);
break;
case RTE_FLOW_ITEM_TYPE_IPV4:
ipv4 = item->spec;
- rte_memcpy(&parser->key[3], &ipv4->hdr.src_addr, 4);
+ memcpy(&parser->key[3], &ipv4->hdr.src_addr, 4);
break;
case RTE_FLOW_ITEM_TYPE_UDP:
udp = item->spec;
- rte_memcpy(&parser->key[7], &udp->hdr.src_port, 2);
+ memcpy(&parser->key[7], &udp->hdr.src_port, 2);
break;
default:
diff --git a/drivers/net/intel/ipn3ke/ipn3ke_representor.c b/drivers/net/intel/ipn3ke/ipn3ke_representor.c
index cd34d08055..281c025820 100644
--- a/drivers/net/intel/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/intel/ipn3ke/ipn3ke_representor.c
@@ -137,7 +137,7 @@ ipn3ke_rpst_dev_start(struct rte_eth_dev *dev)
if (hw->retimer.mac_type == IFPGA_RAWDEV_RETIMER_MAC_TYPE_10GE_XFI) {
/* Set mac address */
- rte_memcpy(((char *)(&val)),
+ memcpy(((char *)(&val)),
(char *)&dev->data->mac_addrs->addr_bytes[0],
sizeof(uint32_t));
(*hw->f_mac_write)(hw,
@@ -145,7 +145,7 @@ ipn3ke_rpst_dev_start(struct rte_eth_dev *dev)
IPN3KE_MAC_PRIMARY_MAC_ADDR0,
rpst->port_id,
0);
- rte_memcpy(((char *)(&val)),
+ memcpy(((char *)(&val)),
(char *)&dev->data->mac_addrs->addr_bytes[4],
sizeof(uint16_t));
(*hw->f_mac_write)(hw,
@@ -2746,13 +2746,13 @@ ipn3ke_rpst_mac_addr_set(struct rte_eth_dev *ethdev,
rte_ether_addr_copy(&mac_addr[0], &rpst->mac_addr);
/* Set mac address */
- rte_memcpy(((char *)(&val)), &mac_addr[0], sizeof(uint32_t));
+ memcpy(((char *)(&val)), &mac_addr[0], sizeof(uint32_t));
(*hw->f_mac_write)(hw,
val,
IPN3KE_MAC_PRIMARY_MAC_ADDR0,
rpst->port_id,
0);
- rte_memcpy(((char *)(&val)), &mac_addr[4], sizeof(uint16_t));
+ memcpy(((char *)(&val)), &mac_addr[4], sizeof(uint16_t));
(*hw->f_mac_write)(hw,
val,
IPN3KE_MAC_PRIMARY_MAC_ADDR0,
diff --git a/drivers/net/intel/ipn3ke/ipn3ke_tm.c b/drivers/net/intel/ipn3ke/ipn3ke_tm.c
index 04677138e1..47b7734d4f 100644
--- a/drivers/net/intel/ipn3ke/ipn3ke_tm.c
+++ b/drivers/net/intel/ipn3ke/ipn3ke_tm.c
@@ -814,7 +814,7 @@ ipn3ke_tm_shaper_profile_add(struct rte_eth_dev *dev,
rte_strerror(EINVAL));
} else {
sp->valid = 1;
- rte_memcpy(&sp->params, profile, sizeof(sp->params));
+ memcpy(&sp->params, profile, sizeof(sp->params));
}
tm->h.n_shaper_profiles++;
@@ -960,7 +960,7 @@ ipn3ke_tm_tdrop_profile_add(struct rte_eth_dev *dev,
IPN3KE_TDROP_TH2_MASK);
tp->th1 = th1;
tp->th2 = th2;
- rte_memcpy(&tp->params, profile, sizeof(tp->params));
+ memcpy(&tp->params, profile, sizeof(tp->params));
/* Add to list */
tm->h.n_tdrop_profiles++;
@@ -1308,7 +1308,7 @@ ipn3ke_tm_node_add(struct rte_eth_dev *dev,
n->tdrop_profile = ipn3ke_hw_tm_tdrop_profile_search(hw,
params->leaf.wred.wred_profile_id);
- rte_memcpy(&n->params, params, sizeof(n->params));
+ memcpy(&n->params, params, sizeof(n->params));
return 0;
}
--
2.51.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* RE: [RFC PATCH 0/8] remove use of rte_memcpy from net/intel
2026-05-19 16:05 [RFC PATCH 0/8] remove use of rte_memcpy from net/intel Bruce Richardson
` (7 preceding siblings ...)
2026-05-19 16:06 ` [RFC PATCH 8/8] net/ipn3ke: " Bruce Richardson
@ 2026-05-19 17:57 ` Morten Brørup
2026-05-19 19:43 ` Stephen Hemminger
9 siblings, 0 replies; 15+ messages in thread
From: Morten Brørup @ 2026-05-19 17:57 UTC (permalink / raw)
To: Bruce Richardson, stephen; +Cc: dev
> From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> Sent: Tuesday, 19 May 2026 18.06
>
> This RFC proposed to replace all instances of rte_memcpy in Intel
> (and former-Intel) net drivers with just regular memcpy. This is
> done on the basis that the memcpy use is not datapath, but is used
> for flow configuration, virt-channel (to firmware or PF) messaging
> and other control path functions.
>
Series-acked-by: Morten Brørup <mb@smartsharesystems.com>
Interesting that using rte_memcpy() emits stringop-overflow warnings when not disabled [1], while using memcpy() doesn't [2].
The warnings are not correct, but still an interesting difference.
[1]: https://github.com/ovsrobot/dpdk/actions/runs/25104438552/job/74968218420
[2]: https://github.com/ovsrobot/dpdk/actions/runs/26110738743/job/76786987619
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [RFC PATCH 0/8] remove use of rte_memcpy from net/intel
2026-05-19 16:05 [RFC PATCH 0/8] remove use of rte_memcpy from net/intel Bruce Richardson
` (8 preceding siblings ...)
2026-05-19 17:57 ` [RFC PATCH 0/8] remove use of rte_memcpy from net/intel Morten Brørup
@ 2026-05-19 19:43 ` Stephen Hemminger
2026-05-20 7:44 ` Bruce Richardson
9 siblings, 1 reply; 15+ messages in thread
From: Stephen Hemminger @ 2026-05-19 19:43 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Tue, 19 May 2026 16:05:57 +0000
Bruce Richardson <bruce.richardson@intel.com> wrote:
> This RFC proposed to replace all instances of rte_memcpy in Intel
> (and former-Intel) net drivers with just regular memcpy. This is
> done on the basis that the memcpy use is not datapath, but is used
> for flow configuration, virt-channel (to firmware or PF) messaging
> and other control path functions.
Makes sense. You might also want to look for where structure
assignment can be used instead of memcpy. Keeping data types
is a good thing.
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [RFC PATCH 0/8] remove use of rte_memcpy from net/intel
2026-05-19 19:43 ` Stephen Hemminger
@ 2026-05-20 7:44 ` Bruce Richardson
2026-05-20 13:50 ` Morten Brørup
2026-05-20 16:45 ` Stephen Hemminger
0 siblings, 2 replies; 15+ messages in thread
From: Bruce Richardson @ 2026-05-20 7:44 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
On Tue, May 19, 2026 at 12:43:32PM -0700, Stephen Hemminger wrote:
> On Tue, 19 May 2026 16:05:57 +0000
> Bruce Richardson <bruce.richardson@intel.com> wrote:
>
> > This RFC proposed to replace all instances of rte_memcpy in Intel
> > (and former-Intel) net drivers with just regular memcpy. This is
> > done on the basis that the memcpy use is not datapath, but is used
> > for flow configuration, virt-channel (to firmware or PF) messaging
> > and other control path functions.
>
> Makes sense. You might also want to look for where structure
> assignment can be used instead of memcpy. Keeping data types
> is a good thing.
Yes, it would be nice to use in places. However, it's not a mechanical
change so I've not taken the time to do the analysis. Just a quick set of
sed replacements for this RFC.
/Bruce
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [RFC PATCH 0/8] remove use of rte_memcpy from net/intel
2026-05-20 7:44 ` Bruce Richardson
@ 2026-05-20 13:50 ` Morten Brørup
2026-05-20 14:53 ` Bruce Richardson
2026-05-20 16:45 ` Stephen Hemminger
1 sibling, 1 reply; 15+ messages in thread
From: Morten Brørup @ 2026-05-20 13:50 UTC (permalink / raw)
To: Bruce Richardson, Stephen Hemminger; +Cc: dev
> From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> Sent: Wednesday, 20 May 2026 09.45
PATCH 0/8] remove use of rte_memcpy from net/intel
>
> On Tue, May 19, 2026 at 12:43:32PM -0700, Stephen Hemminger wrote:
> > On Tue, 19 May 2026 16:05:57 +0000
> > Bruce Richardson <bruce.richardson@intel.com> wrote:
> >
> > > This RFC proposed to replace all instances of rte_memcpy in Intel
> > > (and former-Intel) net drivers with just regular memcpy. This is
> > > done on the basis that the memcpy use is not datapath, but is used
> > > for flow configuration, virt-channel (to firmware or PF) messaging
> > > and other control path functions.
> >
> > Makes sense. You might also want to look for where structure
> > assignment can be used instead of memcpy. Keeping data types
> > is a good thing.
>
> Yes, it would be nice to use in places. However, it's not a mechanical
> change so I've not taken the time to do the analysis. Just a quick set
> of sed replacements for this RFC.
If you consider structure assignment, look out for fixed-size structures ending with field[1]; they are really (ill defined) flex-arrays.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC PATCH 0/8] remove use of rte_memcpy from net/intel
2026-05-20 13:50 ` Morten Brørup
@ 2026-05-20 14:53 ` Bruce Richardson
0 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2026-05-20 14:53 UTC (permalink / raw)
To: Morten Brørup; +Cc: Stephen Hemminger, dev
On Wed, May 20, 2026 at 03:50:34PM +0200, Morten Brørup wrote:
> > From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> > Sent: Wednesday, 20 May 2026 09.45
> PATCH 0/8] remove use of rte_memcpy from net/intel
> >
> > On Tue, May 19, 2026 at 12:43:32PM -0700, Stephen Hemminger wrote:
> > > On Tue, 19 May 2026 16:05:57 +0000
> > > Bruce Richardson <bruce.richardson@intel.com> wrote:
> > >
> > > > This RFC proposed to replace all instances of rte_memcpy in Intel
> > > > (and former-Intel) net drivers with just regular memcpy. This is
> > > > done on the basis that the memcpy use is not datapath, but is used
> > > > for flow configuration, virt-channel (to firmware or PF) messaging
> > > > and other control path functions.
> > >
> > > Makes sense. You might also want to look for where structure
> > > assignment can be used instead of memcpy. Keeping data types
> > > is a good thing.
> >
> > Yes, it would be nice to use in places. However, it's not a mechanical
> > change so I've not taken the time to do the analysis. Just a quick set
> > of sed replacements for this RFC.
>
> If you consider structure assignment, look out for fixed-size structures ending with field[1]; they are really (ill defined) flex-arrays.
>
Yep, they were mentioned in a previous discussion on-list with Anatoly too.
Three is always more cleanup to be done! :-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC PATCH 0/8] remove use of rte_memcpy from net/intel
2026-05-20 7:44 ` Bruce Richardson
2026-05-20 13:50 ` Morten Brørup
@ 2026-05-20 16:45 ` Stephen Hemminger
1 sibling, 0 replies; 15+ messages in thread
From: Stephen Hemminger @ 2026-05-20 16:45 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Wed, 20 May 2026 08:44:59 +0100
Bruce Richardson <bruce.richardson@intel.com> wrote:
> On Tue, May 19, 2026 at 12:43:32PM -0700, Stephen Hemminger wrote:
> > On Tue, 19 May 2026 16:05:57 +0000
> > Bruce Richardson <bruce.richardson@intel.com> wrote:
> >
> > > This RFC proposed to replace all instances of rte_memcpy in Intel
> > > (and former-Intel) net drivers with just regular memcpy. This is
> > > done on the basis that the memcpy use is not datapath, but is used
> > > for flow configuration, virt-channel (to firmware or PF) messaging
> > > and other control path functions.
> >
> > Makes sense. You might also want to look for where structure
> > assignment can be used instead of memcpy. Keeping data types
> > is a good thing.
>
> Yes, it would be nice to use in places. However, it's not a mechanical
> change so I've not taken the time to do the analysis. Just a quick set of
> sed replacements for this RFC.
>
> /Bruce
There is a coccinelle script already to do this.
It is slow but does find things.
There doesn't seem to find any matches even after this patchset
^ permalink raw reply [flat|nested] 15+ messages in thread