[PATCH] mbuf: delete dynamic fields copy in hdr copy

Gaoxiang Liu gaoxiangliu0 at 163.com
Tue Dec 14 08:56:05 CET 2021


Because dynamic fields are registered by the DPDK application,
so it is up to the application to decide whether to copy the value of
dynamic fields.
So delete dynamic fields copy in __rte_pktmbuf_copy_hdr.
It's more flexible for the DPDK application,
and is useful for improving performance.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")

Signed-off-by: Gaoxiang Liu <liugaoxiang at huawei.com>
---
 lib/mbuf/rte_mbuf.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h
index dedf83c38d..e2dfd47442 100644
--- a/lib/mbuf/rte_mbuf.h
+++ b/lib/mbuf/rte_mbuf.h
@@ -1101,7 +1101,6 @@ __rte_pktmbuf_copy_hdr(struct rte_mbuf *mdst, const struct rte_mbuf *msrc)
 	mdst->tx_offload = msrc->tx_offload;
 	mdst->hash = msrc->hash;
 	mdst->packet_type = msrc->packet_type;
-	rte_mbuf_dynfield_copy(mdst, msrc);
 }
 
 /**
-- 
2.32.0




More information about the dev mailing list