On 02/03/2015 11:04 PM, Ola Liljedahl wrote:
> My alternative approach that should achieve that same goals as Petri
> but give more freedom to implementations. You don't have to approve of
> it, I just want to show that given a defined and understood problem,
> many potential solutions exist and the first alternative might not be
> the best. Let's work together.
> 
> * init_seg_len:
>         On input: user's required (desired) minimal length of initial
> segment (including headroom)
>         On output: implementation's best effort to match user's request
>         Purpose: ensure that those packet headers the application
> normally will process are stored in a consecutive memory area.
>         Applications do not have to check any configuration in order
> to initialize a configuration which the implementation anyway has to
> check if it can support.
>         Applications should check output values to see if its desired
> values were matched. The application decides whether a failure to
> match is a fatal error or the application can handle the situation
> anyway (e.g. with degraded performance because it has to do some
> workarounds in SW).
> 
> * seg_len:
>         On input: user's desired length of other segments
>         On output: implementation's best effort to match user's request
>         Purpose: a hint from the user how to partition to pool into
> segments for best trade-off between memory utilization and SW
> processing performance.
>         Note: I know some HW can support multiple segment sizes so I
> think it is useful for the API to allow for this. Targets which only
> support one segment size (per packet pool) could use e.g.
> max(int_seg_len, seg_len). Some targets may not allow user-defined
> segment sizes at all, the ODP implementation will just return the
> actual values and the application can check whether those are
> acceptable.
> 
> * init_seg_num:
>        On input: Number of initial segments.
>        On output: Updated with actual number of segments if a shared
> memory region was specified?
> * seg_num:
>         On input: Number of other segments.
>        On output: Updated with actual number of segments if a shared
> memory region was specified?

Wouldn't it be simpler to create two pools and assign both to Pktio?

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to