[PATCH v2 05/19] net/xsc: add ioctl command interface
Stephen Hemminger
stephen at networkplumber.org
Wed Sep 11 05:49:51 CEST 2024
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
More information about the dev
mailing list