[dpdk-dev] [PATCH] port: add file descriptor SWX port

Stephen Hemminger stephen at networkplumber.org
Tue Mar 23 19:24:50 CET 2021


On Fri, 19 Mar 2021 08:02:06 -0400
Venkata Suresh Kumar P <venkata.suresh.kumar.p at intel.com> wrote:

> +static void
> +reader_stats_read(void *port, struct rte_swx_port_in_stats *stats)
> +{
> +	struct reader *p = port;
> +
> +	memcpy(stats, &p->stats, sizeof(p->stats));
> +}

Why not use structure assignment (which is type safe) instead of memcpy?


More information about the dev mailing list