27/10/2020 11:45, Olivier Matz: > On Mon, Oct 26, 2020 at 11:20:07PM +0100, Thomas Monjalon wrote: > > The segment count, used for MSS guess, > > was stored in the deprecated mbuf field udata64. > > It is moved to a dynamic field in order to allow removal of udata64. > > > > Signed-off-by: Thomas Monjalon <tho...@monjalon.net> > > After seeing this commit, I wonder if we shouldn't introduce an > enhancement in the dynamic field API. > > Previously, the driver used udata64 only internally, so without any > risk. The risky usages of udata64 were when the mbuf goes out of a > module. > > Changing to dynamic field makes the code safe for any use, but consumes > more memory. > > I wonder if we shouldn't (later) introduce a flag RTE_MBUF_DYN_F_SHARED, > or something similar, to say that this field is only used inside a > module, and that its memory can be shared with other dynamic fields.
Yes can be a later improvement if the sharing limitations are properly defined. We can also share some offsets which are used differently in Rx and Tx.