Should we have separate header files for buffer pool and buffers? Or should
we perhaps have a different kind of separation?

In my Timer API design (patch sent out earlier today), odp_timer.h defines
both the timer pool and the timer data structures and operations. There's
even a timeout data type... I don't want three different header files.

If one header file (e.g. odp_buffer_pool.h) always has to include another
(e.g. odp_buffer.h) in order to get necessary data types defined, how do we
benefit from the separation?
Perhaps we should separate between headers that define types (including
defines for invalid values etc) and header files that define API's
(function calls)?
All ODP types could be defined in the same header file (different for
different implementations of course). The existing set of header files
would just include the type header file and define its own API, no need to
include other header files (like odp_buffer_pool.h today includes
odp_buffer.h because it needs the odp_buffer_t definition but you get the
function calls "for free").



On 2 September 2014 22:53, Victor Kamensky <[email protected]>
wrote:

> In OO speak are not those methods of pool, i.e
> pool can produce and free buffers. I think odp_buffer_pool.h
> is right place for those. I.e factory OOD pattern.
>
> BTW while reading ODP specs I always struggle to rebuild
> mental UML diagramd between different ODP entities, its
> attributes, methods and relationships between entities. I wish
> we could have those diagrams explicitly ... Is there any one
> looking into this? I think in some conversation with Taras,
> he mentioned that somebody is about to do that.
>
> Thanks,
> Victor
>
> On 2 September 2014 13:44, Mike Holmes <[email protected]> wrote:
> > http://docs.opendataplane.org/html/odp__buffer__pool_8h.html
> >
> >
> > odp_buffer_alloc and odp_buffer_free are in odp_buffer_pool.h but they
> look
> > like they should be in odp_buffer.h since they take or return
> odp_buffer_t
> > not odp_buffer_pool_t
> >
> > Is there a reason to have them with the pool API ?
> >
> >
> > --
> > Mike Holmes
> > Linaro Technical Manager / Lead
> > LNG - ODP
> >
> > _______________________________________________
> > lng-odp mailing list
> > [email protected]
> > http://lists.linaro.org/mailman/listinfo/lng-odp
> >
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to