From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 58249A0548;
	Tue,  7 Jun 2022 19:18:32 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id F41FC42B7C;
	Tue,  7 Jun 2022 19:18:00 +0200 (CEST)
Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com
 [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id EF49D42B74
 for <dev@dpdk.org>; Tue,  7 Jun 2022 19:17:58 +0200 (CEST)
Received: by mail-pj1-f48.google.com with SMTP id
 d12-20020a17090abf8c00b001e2eb431ce4so15999561pjs.1
 for <dev@dpdk.org>; Tue, 07 Jun 2022 10:17:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20210112.gappssmtp.com; s=20210112;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=zXI2LEwHRrzPbRcBOsbSgP9r692BSJkFZP6Q/hYRx/o=;
 b=INJJJMSCchQCPLxqNg7NtLCVzTCR94wAW+Kp2IzIDawLUzI+DVw6+35rLADU/kP90Q
 AWbN0OkL62wDRtb1+pmLFkB5cnMXCC1nclXUkcwlUdvDloxm29M7pGcVdYS3mZJ9enxN
 erCpt7T0PdjT3A/zt3931fdZZEzRbCRpUkjKXf2aYoXt3fJrp/Z1FjC8nnbFVpDgaIiu
 tq/ojzohJdVCrfCns5VNY26lewRC2hhYuiWO0a+wR3C3bF5aL2Brg11u+jb/9hfTRa5t
 UEA7YQ7/CVxCGbUJDKiJRF1Sqkrb7FU0PtoqS2KHBA5sh+MzFnT8vXBGmEptv4Q+X/L9
 adQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=zXI2LEwHRrzPbRcBOsbSgP9r692BSJkFZP6Q/hYRx/o=;
 b=FkNLB5CK4C05+MgeuLttPDYg5hHD7++Ca33an6ACdqrjiQgNsu7Hjzkvz6kK1RBZ3M
 pkfrrL9GcNqzf2/2sc97iO5AR40oOqz8LS8UxtLRgELCKqwGvuHG2jRqh+/5AV5JzQgM
 wXAIwlybaVwLrRKHk3xve82fnKde5CVXiIwe0jZADVKQk5ClELdWZT8/V23F9sEH7dfe
 fQviUi0DqMnYSi56DHIpVZtipffqwYPIsyDDPu+8iIyLTM5Xfui6Oh9j3As2WxNwuxFU
 Ql5BbeuwiSECOWXkVPy0uVZwUImVcmuvZyrts7L/vL9TRQO31bk49zWOye8YI9RIQLZi
 kaqA==
X-Gm-Message-State: AOAM531pzkBnG9eUsTMLLcGYXZ8T6yu/o3Xd2LcUfc945lmmPWrFpOe2
 oDPFZD2JuPdPPMUo1xL22rlvWid3kIqbcQ==
X-Google-Smtp-Source: ABdhPJwUnkuLWA2XFDNVN1KUJdd9+jXZ5/8uaN04kZC5qi1b28qQi07MpzecQlwcPRZV05Wiy3ENVA==
X-Received: by 2002:a17:902:ce8f:b0:163:cc85:ba89 with SMTP id
 f15-20020a170902ce8f00b00163cc85ba89mr29295302plg.79.1654622277776; 
 Tue, 07 Jun 2022 10:17:57 -0700 (PDT)
Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199])
 by smtp.gmail.com with ESMTPSA id
 x2-20020a627c02000000b005087c23ad8dsm13185281pfc.0.2022.06.07.10.17.56
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 07 Jun 2022 10:17:57 -0700 (PDT)
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
 Maxime Coquelin <maxime.coquelin@redhat.com>,
 Chenbo Xia <chenbo.xia@intel.com>
Subject: [RFC 7/8] vhost: replace rte_memcpy to fix warning
Date: Tue,  7 Jun 2022 10:17:45 -0700
Message-Id: <20220607171746.461772-8-stephen@networkplumber.org>
X-Mailer: git-send-email 2.35.1
In-Reply-To: <20220607171746.461772-1-stephen@networkplumber.org>
References: <20220607171746.461772-1-stephen@networkplumber.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

Using rte_memcpy is not needed here. Just use memcpy() which
is safer and just as fast for this non-critical place.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/vhost/vhost_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
index b1c0eb6a0f97..e8727f076fdd 100644
--- a/lib/vhost/vhost_crypto.c
+++ b/lib/vhost/vhost_crypto.c
@@ -585,7 +585,7 @@ copy_data(void *dst_data, struct vhost_crypto_data_req *vc_req,
 	if (unlikely(!src || !dlen))
 		return -1;
 
-	rte_memcpy((uint8_t *)data, src, dlen);
+	memcpy(data, src, dlen);
 	data += dlen;
 
 	if (unlikely(dlen < to_copy)) {
-- 
2.35.1