From: Stephen Hemminger <stephen@networkplumber.org>
To: "WanRenyong" <wanry@yunsilicon.com>
Cc: <dev@dpdk.org>, <ferruh.yigit@amd.com>, <thomas@monjalon.net>
Subject: Re: [PATCH v2 05/19] net/xsc: add ioctl command interface
Date: Tue, 10 Sep 2024 20:49:51 -0700 [thread overview]
Message-ID: <20240910204951.5baa3116@hermes.local> (raw)
In-Reply-To: <20240911020740.3950704-6-wanry@yunsilicon.com>
On Wed, 11 Sep 2024 10:07:26 +0800
"WanRenyong" <wanry@yunsilicon.com> wrote:
> + if (data_in != NULL && in_len > 0)
> + rte_memcpy(hdr + 1, data_in, in_len);
> +
> + ret = ioctl(dev->ctrl_fd, cmd, hdr);
> + if (ret == 0) {
> + if (hdr->attr.error != 0)
> + ret = hdr->attr.error;
> + else if (data_out != 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
next prev parent reply other threads:[~2024-09-11 3:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 2:07 WanRenyong
2024-09-11 3:48 ` Stephen Hemminger
2024-09-12 4:07 ` WanRenyong
2024-09-11 3:49 ` Stephen Hemminger [this message]
2024-09-12 4:07 ` WanRenyong
2024-09-11 3:50 ` Stephen Hemminger
2024-09-12 4:14 ` WanRenyong
2024-09-12 5:50 ` Stephen Hemminger
2024-09-12 8:19 ` WanRenyong
2024-09-12 9:18 ` fengchengwen
2024-09-13 2:55 ` WanRenyong
2024-09-14 2:54 ` Stephen Hemminger
2024-09-14 6:33 ` fengchengwen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240910204951.5baa3116@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=thomas@monjalon.net \
--cc=wanry@yunsilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).