> On Jan 9, 2019, at 5:39 PM, Rami Rosen <roszenr...@gmail.com> wrote: > > Hi, Yongseok, > > Maybe you should consider using the pool member of the mbuf, instead of > passing it as a parameter for rte_mbuf_buf_addr_default(). > The pool member of mbuf indicates the pool from which it was allocated. > See > http://git.dpdk.org/dpdk/tree/lib/librte_mbuf/rte_mbuf.h#n631 > > And actually the is exactly what you do in the second method, > rte_mbuf_data_baddr_default(), when invoking the first, this is also kind of > non consistency.
Original intention is to not access mbuf struct to avoid any potential load stall. I've mentioned it in the comments. For example, on Rx, mbuf mempool is known to PMD and there's only one mempool, it doesn't need to pull the pointer from mbuf struct. So, idea is to know the initial buf_addr without accessing mbuf struct. Thanks, Yongseok > >> David Marchand wrote: > > So for me s/rte_mbuf_buf_addr_default/rte_mbuf_buf_addr/g > > Or just rte_mbuf_data_addr_default() ? > + 1 > >> David Marchand wrote: > >Those are new functions, they should go through the EXPERIMENTAL api > >marking process. > > +1 > > Regards, > Rami Rosen > > בתאריך יום ד׳, 9 בינו׳ 2019, 15:47, מאת David Marchand > <david.march...@redhat.com>: > On Wed, Jan 9, 2019 at 2:19 PM Yongseok Koh <ys...@mellanox.com> wrote: > > > This patch introduces two new functions - rte_mbuf_buf_addr_default() and > > rte_mbuf_data_baddr_default(). > > > > rte_mbuf_buf_addr_default() reutrns the default buffer address of given > > mbuf which comes after mbuf structure and private data. > > > > The buffer address should always be the same for a given mbuf, there is no > "default" value for it, there is only one value. > So for me s/rte_mbuf_buf_addr_default/rte_mbuf_buf_addr/g. > > > > rte_mbuf_data_baddr_default() returns the default address of mbuf data > > taking the headroom into account. > > > > Or just rte_mbuf_data_addr_default() ? > > > > Signed-off-by: Yongseok Koh <ys...@mellanox.com> > > > > Those are new functions, they should go through the EXPERIMENTAL api > marking process. > > > -- > David Marchand