> Replace rte_memcpy with assignment or plain memcpy to
> get more static checking.
> 
> Signed-off-by: Stephen Hemminger <[email protected]>
> ---
>  lib/ip_frag/rte_ipv6_fragmentation.c | 3 +--
>  lib/ip_frag/rte_ipv6_reassembly.c    | 5 ++---
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/ip_frag/rte_ipv6_fragmentation.c
> b/lib/ip_frag/rte_ipv6_fragmentation.c
> index c81f2402e3..86dd2e65ce 100644
> --- a/lib/ip_frag/rte_ipv6_fragmentation.c
> +++ b/lib/ip_frag/rte_ipv6_fragmentation.c
> @@ -6,7 +6,6 @@
>  #include <errno.h>
> 
>  #include <eal_export.h>
> -#include <rte_memcpy.h>
> 
>  #include "ip_frag_common.h"
> 
> @@ -24,7 +23,7 @@ __fill_ipv6hdr_frag(struct rte_ipv6_hdr *dst,
>  {
>       struct rte_ipv6_fragment_ext *fh;
> 
> -     rte_memcpy(dst, src, sizeof(*dst));
> +     *dst = *src;
>       dst->payload_len = rte_cpu_to_be_16(len);
>       dst->proto = IPPROTO_FRAGMENT;
> 
> diff --git a/lib/ip_frag/rte_ipv6_reassembly.c 
> b/lib/ip_frag/rte_ipv6_reassembly.c
> index 9aa2f2d08b..cae4266f97 100644
> --- a/lib/ip_frag/rte_ipv6_reassembly.c
> +++ b/lib/ip_frag/rte_ipv6_reassembly.c
> @@ -5,7 +5,6 @@
>  #include <stddef.h>
> 
>  #include <eal_export.h>
> -#include <rte_memcpy.h>
> 
>  #include "ip_frag_common.h"
> 
> @@ -145,8 +144,8 @@ rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl
> *tbl,
>       int32_t ip_len;
>       int32_t trim;
> 
> -     rte_memcpy(&key.src_dst[0], &ip_hdr->src_addr, 16);
> -     rte_memcpy(&key.src_dst[2], &ip_hdr->dst_addr, 16);
> +     memcpy(&key.src_dst[0], &ip_hdr->src_addr, 16);
> +     memcpy(&key.src_dst[2], &ip_hdr->dst_addr, 16);
> 
>       key.id = frag_hdr->id;
>       key.key_len = IPV6_KEYLEN;
> --

Acked-by: Konstantin Ananyev <[email protected]>

> 2.53.0

Reply via email to