From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v3 7/8] ip_frag: remove use of rte_memcpy
Date: Wed, 1 Jul 2026 09:20:32 -0700 [thread overview]
Message-ID: <20260701162127.207318-8-stephen@networkplumber.org> (raw)
In-Reply-To: <20260701162127.207318-1-stephen@networkplumber.org>
Replace rte_memcpy with assignment or plain memcpy to
get more static checking.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
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;
--
2.53.0
next prev parent reply other threads:[~2026-07-01 16:22 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 21:05 [PATCH 0/6] ip_frag: fix reassembly defects and add test Stephen Hemminger
2026-06-16 21:05 ` [PATCH 1/6] ip_frag: tolerate duplicate fragments Stephen Hemminger
2026-06-30 8:08 ` Konstantin Ananyev
2026-06-30 13:32 ` Stephen Hemminger
2026-06-16 21:05 ` [PATCH 2/6] ip_frag: discard datagrams with overlapping fragments Stephen Hemminger
2026-06-19 13:12 ` Morten Brørup
2026-06-19 17:01 ` Stephen Hemminger
2026-06-22 15:01 ` Morten Brørup
2026-06-22 15:03 ` Stephen Hemminger
2026-06-30 8:16 ` Konstantin Ananyev
2026-06-16 21:05 ` [PATCH 3/6] ip_frag: include protocol in IPv4 reassembly key Stephen Hemminger
2026-06-30 8:17 ` Konstantin Ananyev
2026-06-16 21:05 ` [PATCH 4/6] ip_frag: drop IPv6 fragments with unexpected headers Stephen Hemminger
2026-06-30 9:21 ` Konstantin Ananyev
2026-06-16 21:05 ` [PATCH 5/6] ip_frag: reject oversized reassembled datagrams Stephen Hemminger
2026-06-30 9:32 ` Konstantin Ananyev
2026-06-16 21:05 ` [PATCH 6/6] app/test: add test for IP reassembly Stephen Hemminger
2026-06-19 13:24 ` [PATCH 0/6] ip_frag: fix reassembly defects and add test Morten Brørup
2026-06-22 15:03 ` Morten Brørup
2026-06-30 15:36 ` [PATCH v2 0/8] " Stephen Hemminger
2026-06-30 15:36 ` [PATCH v2 1/8] ip_frag: tolerate duplicate fragments Stephen Hemminger
2026-06-30 15:36 ` [PATCH v2 2/8] ip_frag: discard datagrams with overlapping fragments Stephen Hemminger
2026-07-01 8:13 ` Konstantin Ananyev
2026-06-30 15:36 ` [PATCH v2 3/8] ip_frag: include protocol in IPv4 reassembly key Stephen Hemminger
2026-06-30 15:36 ` [PATCH v2 4/8] ip_frag: drop IPv6 fragments with per-fragment headers Stephen Hemminger
2026-06-30 15:36 ` [PATCH v2 5/8] ip_frag: reject oversized reassembled datagrams Stephen Hemminger
2026-06-30 15:36 ` [PATCH v2 6/8] app/test: add test for IP reassembly Stephen Hemminger
2026-06-30 15:36 ` [PATCH v2 7/8] ip_frag: remove use of rte_memcpy Stephen Hemminger
2026-06-30 15:36 ` [PATCH v2 8/8] doc: add release note about ip_frag changes Stephen Hemminger
2026-06-30 19:19 ` Stephen Hemminger
2026-07-01 8:22 ` Konstantin Ananyev
2026-07-01 16:20 ` [PATCH v3 0/8] ip_frag: fix reassembly defects and add test Stephen Hemminger
2026-07-01 16:20 ` [PATCH v3 1/8] ip_frag: tolerate duplicate fragments Stephen Hemminger
2026-07-01 16:20 ` [PATCH v3 2/8] ip_frag: discard datagrams with overlapping fragments Stephen Hemminger
2026-07-01 16:20 ` [PATCH v3 3/8] ip_frag: include protocol in IPv4 reassembly key Stephen Hemminger
2026-07-01 16:20 ` [PATCH v3 4/8] ip_frag: drop IPv6 fragments with per-fragment headers Stephen Hemminger
2026-07-01 16:52 ` Konstantin Ananyev
2026-07-01 16:20 ` [PATCH v3 5/8] ip_frag: reject oversized reassembled datagrams Stephen Hemminger
2026-07-01 16:20 ` [PATCH v3 6/8] app/test: add test for IP reassembly Stephen Hemminger
2026-07-01 16:20 ` Stephen Hemminger [this message]
2026-07-01 16:53 ` [PATCH v3 7/8] ip_frag: remove use of rte_memcpy Konstantin Ananyev
2026-07-01 16:20 ` [PATCH v3 8/8] doc: add release note about ip_frag changes Stephen Hemminger
2026-07-01 16:42 ` Konstantin Ananyev
2026-07-02 20:55 ` [PATCH v3 0/8] ip_frag: fix reassembly defects and add test Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260701162127.207318-8-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.