From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7192D45967; Thu, 12 Sep 2024 06:08:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5483E40693; Thu, 12 Sep 2024 06:08:06 +0200 (CEST) Received: from lf-2-51.ptr.blmpb.com (lf-2-51.ptr.blmpb.com [101.36.218.51]) by mails.dpdk.org (Postfix) with ESMTP id 66F6E40687 for ; Thu, 12 Sep 2024 06:08:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=feishu2403070942; d=yunsilicon.com; t=1726114072; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=PY3U4ly/A2EI161+S/eYIz3WT7SnmgQfvQB/9GIRCVQ=; b=QtUULVFC5xg+YDw5vJligEIQeCINBNc1YOjRoO8obLFaaguSaYirjBeCUkEPjP8uPCrCvo wcqk6DNsdyed1MSi6T3v2BygdvFiJf9iXhjWZD0BG3GBs9/AdahnR4KhShE1o85cjAZsVm AJzuSyIIqyoS3QOZ3732AdK0RHIjXsySeXp66qixOoQbBS0qit/JoJ62g2OnVc/lwpppil 2tW4MWJsVlbDNOJiIS5L4fob0h0eIb/MO6c21kDlEKVWJNIWXGFYSEgq/chp/tHTurYq+e OYR+8qFRJ9TSQpuPJ5OIAPBnFXh++3UvRSLn4rr4KqRo8+pkqyuXh14K0bL4gA== X-Original-From: WanRenyong Received: from [127.0.0.1] ([180.158.103.102]) by smtp.feishu.cn with ESMTPS; Thu, 12 Sep 2024 12:07:50 +0800 X-Lms-Return-Path: User-Agent: Mozilla Thunderbird From: "WanRenyong" Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Thu, 12 Sep 2024 12:07:49 +0800 References: <20240911020740.3950704-6-wanry@yunsilicon.com> <20240910204951.5baa3116@hermes.local> In-Reply-To: <20240910204951.5baa3116@hermes.local> Content-Transfer-Encoding: quoted-printable To: "Stephen Hemminger" Cc: , , Subject: Re: [PATCH v2 05/19] net/xsc: add ioctl command interface X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2024/9/11 11:49, Stephen Hemminger wrote: > On Wed, 11 Sep 2024 10:07:26 +0800 > "WanRenyong" wrote: > >> + if (data_in !=3D NULL && in_len > 0) >> + rte_memcpy(hdr + 1, data_in, in_len); >> + >> + ret =3D ioctl(dev->ctrl_fd, cmd, hdr); >> + if (ret =3D=3D 0) { >> + if (hdr->attr.error !=3D 0) >> + ret =3D hdr->attr.error; >> + else if (data_out !=3D NULL && out_len > 0) >> + rte_memcpy(data_out, hdr + 1, out_len); > Don't need to use rte_memcpy() here. Better to use regular memcpy() which > has more checking Hello, Stephen, Thanks for your review,=C2=A0 will fix it in next version. --=20 Thanks, WanRenyong