[PATCH v2 34/68] net/failsafe: replace use of rte_memcpy

Stephen Hemminger <[email protected]>
Newsgroups org.dpdk.dev
Message-ID <[email protected]>
Don't need rte_memcpy for addresses in control path.

The use of rte_memcpy() when saving the multicast address list is
control path only. Regular memcpy() has no performance disadvantage
there and gets more compile time checking of the arguments.

Signed-off-by: Stephen Hemminger <[email protected]>
---
 drivers/net/failsafe/failsafe_ops.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index ddc8808ebe..f393476571 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -909,16 +909,16 @@ fs_stats_get(struct rte_eth_dev *dev,
 	ret = fs_lock(dev, 0);
 	if (ret != 0)
 		return ret;
-	rte_memcpy(stats, &PRIV(dev)->stats_accumulator, sizeof(*stats));
+	memcpy(stats, &PRIV(dev)->stats_accumulator, sizeof(*stats));
 	FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) {
 		struct rte_eth_stats *snapshot = &sdev->stats_snapshot.stats;
 		uint64_t *timestamp = &sdev->stats_snapshot.timestamp;
 
-		rte_memcpy(&backup, snapshot, sizeof(backup));
+		memcpy(&backup, snapshot, sizeof(backup));
 		ret = rte_eth_stats_get(PORT_ID(sdev), snapshot);
 		if (ret) {
 			if (!fs_err(sdev, ret)) {
-				rte_memcpy(snapshot, &backup, sizeof(backup));
+				memcpy(snapshot, &backup, sizeof(backup));
 				goto inc;
 			}
 			ERROR("Operation rte_eth_stats_get failed for sub_device %d with error %d",
@@ -1523,8 +1523,8 @@ fs_set_mc_addr_list(struct rte_eth_dev *dev,
 		ret = -ENOMEM;
 		goto rollback;
 	}
-	rte_memcpy(mcast_addrs, mc_addr_set,
-		   nb_mc_addr * sizeof(PRIV(dev)->mcast_addrs[0]));
+	memcpy(mcast_addrs, mc_addr_set,
+	       nb_mc_addr * sizeof(PRIV(dev)->mcast_addrs[0]));
 	PRIV(dev)->nb_mcast_addr = nb_mc_addr;
 	PRIV(dev)->mcast_addrs = mcast_addrs;
 
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.