On Thu, May 19, 2016 at 3:09 AM, Savolainen, Petri (Nokia - FI/Espoo) <
[email protected]> wrote:

>
>
> > -----Original Message-----
> > From: lng-odp [mailto:[email protected]] On Behalf Of
> > Christophe Milard
> > Sent: Thursday, May 19, 2016 10:43 AM
> > To: Bill Fischofer <[email protected]>
> > Cc: LNG ODP Mailman List <[email protected]>
> > Subject: Re: [lng-odp] [PATCH 1/2] doc: userguide: add section describing
> > helpers
> >
> > On 19 May 2016 at 06:05, Bill Fischofer <[email protected]>
> wrote:
> >
> > > Signed-off-by: Bill Fischofer <[email protected]>
>
>
> > >
> > > +=== ODP Helpers
> > > +ODP also provides a set of _helper_ functions that are
> > > +distinguished by the `odph_` prefix. These are not part of the ODP API
> > > +specification, but may be useful to both applications and
> > implementations.
> > >
> >
> > This statement allows for circular dependancy:
> > Using helpers from the application means that helpers will use ODP, as
> > helpers will perform usual stuff that application needs to do: for
> > instance
> > helpers uses the ODP cpu_mask for creating threads, and helpers may do
> > other common application things toward ODP according to this definition.
> > Having things such as IP header description in helpers means that helpers
> > are needed by ODP:
> > In other words: helper is needed by ODP and needs ODP!
> > I know this is the situation today, but I am not sure we should write
> this
> > in stone. Maybe the helpers should be splitted as ODP_helpers and
> > APP_helpers?
>

I don't see the need to make this distinction. While it is true that some
helpers use ODP APIs that's perfectly fine since ODP implementations are
free to use ODP APIs themselves, and we do that a lot to simplify the code
in many places. To have a true circular reference would be to have an
unresolvable recursive reference, which is not the case here.


> >
>
> Helpers are for applications (reuse code and definitions in examples and
> tests). Implementations should contain  their own (protocol header)
> definitions, so no dependency to the helper lib.
>

The reason we put the header mappings in the helpers in the first place is
to avoid this sort of unnecessary duplication, so this statement seems
odd.  There is, of course, no requirement that implementations use these or
any other helper functions. They are simply there as a matter of
application and/or implementation convenience.


>
> -Petri
>
>
>
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to