[dpdk-dev] [PATCH v2 1/2] mbuf: add function returning default buffer address
Rami Rosen
roszenrami at gmail.com
Thu Jan 10 02:39:29 CET 2019
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.
>> 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.marchand at redhat.com>:
> On Wed, Jan 9, 2019 at 2:19 PM Yongseok Koh <yskoh at 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 <yskoh at mellanox.com>
> >
>
> Those are new functions, they should go through the EXPERIMENTAL api
> marking process.
>
>
> --
> David Marchand
>
More information about the dev
mailing list