[dpdk-dev] [PATCH v3] mbuf: extend pktmbuf pool private structure
Shahaf Shuler
shahafs at mellanox.com
Sun Nov 24 19:10:34 CET 2019
Sunday, November 24, 2019 8:05 PM, Thomas Monjalon:
> Subject: Re: [dpdk-dev] [PATCH v3] mbuf: extend pktmbuf pool private
> structure
>
> 24/11/2019 18:50, Stephen Hemminger:
> > On Sun, 24 Nov 2019 05:53:46 +0000
> > Shahaf Shuler <shahafs at mellanox.com> wrote:
> >
> > > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
> > > index 35df1c4c38..8fa7f49645 100644
> > > --- a/lib/librte_mbuf/rte_mbuf.c
> > > +++ b/lib/librte_mbuf/rte_mbuf.c
> > > @@ -49,7 +49,7 @@ rte_pktmbuf_pool_init(struct rte_mempool *mp,
> void *opaque_arg)
> > > /* if no structure is provided, assume no mbuf private area */
> > > user_mbp_priv = opaque_arg;
> > > if (user_mbp_priv == NULL) {
> > > - default_mbp_priv.mbuf_priv_size = 0;
> > > + memset(&default_mbp_priv, 0, sizeof(default_mbp_priv));
> >
> > An alternative would be to use structure initialization.
> >
> > struct rte_pktmbuf_pool_private default_mbp_priv = { };
>
> I think we used to have issues with such structure initialization.
> If I remember well, icc was not always happy with such construct...
Yes. Some versions of clang also didn't like it.
> memset is safe
>
+1.
More information about the dev
mailing list