> -----Original Message----- > From: Stephen Hemminger <step...@networkplumber.org> > Sent: Monday, January 20, 2020 22:48 > To: Slava Ovsiienko <viachesl...@mellanox.com> > Cc: dev@dpdk.org; Matan Azrad <ma...@mellanox.com>; Raslan Darawsheh > <rasl...@mellanox.com>; Ori Kam <or...@mellanox.com>; Shahaf Shuler > <shah...@mellanox.com>; olivier.m...@6wind.com; tho...@mellanox.net > Subject: Re: [PATCH v6 3/5] mbuf: create packet pool with external memory > buffers > > On Mon, 20 Jan 2020 19:16:24 +0000 > Viacheslav Ovsiienko <viachesl...@mellanox.com> wrote: > > > + ((user_mbp_priv->flags & > RTE_PKTMBUF_POOL_F_PINNED_EXT_BUF) ? > > + sizeof(struct rte_mbuf_ext_shared_info) : > > + user_mbp_priv->mbuf_data_room_size > > Should rte_pktmbuf_data_room_size() be used, and have it return the right > value for external mbuf?
The pool initialization is not completed yet (private structure of mbuf pool is not copied yet, so in this point rte_pktmbuf_data_room_size() is unable to fetch the valid data room size. Beside this, rte_pktmbuf_data_room_size() returns the valid value for the mbuf with pinned external buffers after pool initialization is done. With best regards, Slava