* [PATCH] mbuf: delete dynamic fields copy in hdr copy
@ 2021-12-14 7:56 Gaoxiang Liu
2022-01-11 16:45 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Gaoxiang Liu @ 2021-12-14 7:56 UTC (permalink / raw)
To: dev, Olivier Matz; +Cc: liugaoxiang, Gaoxiang Liu
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@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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mbuf: delete dynamic fields copy in hdr copy
2021-12-14 7:56 [PATCH] mbuf: delete dynamic fields copy in hdr copy Gaoxiang Liu
@ 2022-01-11 16:45 ` Thomas Monjalon
2022-01-26 13:13 ` Olivier Matz
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2022-01-11 16:45 UTC (permalink / raw)
To: liugaoxiang; +Cc: dev, Olivier Matz, Gaoxiang Liu
14/12/2021 08:56, Gaoxiang Liu:
> 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.
Yes, removing operations will improve the performance,
but it looks wrong.
This is copying all dynamic fields, not matter which one is registered.
We cannot ask the application to manage dynamic fields copy,
especially if the copy is done inside a library.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mbuf: delete dynamic fields copy in hdr copy
2022-01-11 16:45 ` Thomas Monjalon
@ 2022-01-26 13:13 ` Olivier Matz
0 siblings, 0 replies; 3+ messages in thread
From: Olivier Matz @ 2022-01-26 13:13 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: liugaoxiang, dev, Gaoxiang Liu
Hi,
On Tue, Jan 11, 2022 at 05:45:49PM +0100, Thomas Monjalon wrote:
> 14/12/2021 08:56, Gaoxiang Liu:
> > 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.
>
> Yes, removing operations will improve the performance,
> but it looks wrong.
> This is copying all dynamic fields, not matter which one is registered.
> We cannot ask the application to manage dynamic fields copy,
> especially if the copy is done inside a library.
+1
Dynamic fields/flags can be registered by applications, libraries,
drivers, ...
There is no entity that is aware of which field/flag has to be copied,
so the only possibility is to copy all of them.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-26 13:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 7:56 [PATCH] mbuf: delete dynamic fields copy in hdr copy Gaoxiang Liu
2022-01-11 16:45 ` Thomas Monjalon
2022-01-26 13:13 ` Olivier Matz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).