[PATCH dpdk v2 06/16] net: add ipv6 address utilities
Stephen Hemminger
stephen at networkplumber.org
Tue Oct 1 17:35:40 CEST 2024
On Tue, 1 Oct 2024 10:17:18 +0200
Robin Jarry <rjarry at redhat.com> wrote:
> +/** Shorthand to initialize IPv6 address values */
> +#define RTE_IPV6_ADDR(...) ((struct rte_ipv6_addr){.a = {__VA_ARGS__}})
> +
> +/**
> + * Copy an IPv6 address into another one.
> + *
> + * @param dst
> + * The address into which to copy data.
> + * @param src
> + * The address from which to copy.
> + */
> +static inline void
> +rte_ipv6_addr_cpy(struct rte_ipv6_addr *dst, const struct rte_ipv6_addr *src)
> +{
> + rte_memcpy(dst, src, sizeof(*dst));
> +}
> +
> +/**
Please do not introduce more rte_memcpy() there is no reason not to just
use structure assignment, which makes the whole need for this function go away.
More information about the dev
mailing list