[PATCH v2 05/19] net/xsc: add ioctl command interface
WanRenyong
wanry at yunsilicon.com
Thu Sep 12 06:07:49 CEST 2024
On 2024/9/11 11:49, Stephen Hemminger wrote:
> On Wed, 11 Sep 2024 10:07:26 +0800
> "WanRenyong" <wanry at 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
Hello, Stephen,
Thanks for your review, will fix it in next version.
--
Thanks,
WanRenyong
More information about the dev
mailing list