On 07/24/2015 11:10 AM, Bala Manoharan wrote:
>
>
> On 23 July 2015 at 12:09, Nicolas Morey-Chaisemartin <[email protected] 
> <mailto:[email protected]>> wrote:
>
>
>
>     On 07/23/2015 07:43 AM, Bala Manoharan wrote:
>>
>>
>>     On 21 July 2015 at 13:05, Nicolas Morey-Chaisemartin <[email protected] 
>> <mailto:[email protected]>> wrote:
>>
>>
>>
>>
>>         This maybe a little to linux-generic otiented I guess. What I'm 
>> looking for is a clean way to handle segment length vs packet length in 
>> pools.
>>
>>
>>     The optimisations specific to linux-generic should be in internal header 
>> and not in config files as any change in config file will have to be handled 
>> by all the platforms.
>
>     Agreed. But supporting segmentation is still  a platform/HW related 
> feature. And I think it has its place somewhere in config.h. Although 
> probably not in this form.
>
>     Maybe something as simple as ODP_CONFIG_SEGMENTATION_SUPPORT ?
>
>
> IMO, this configuration is not needed as application need not know if the 
> underlying HW is supporting the requested pool configuration through segments 
> or unsegmented pools. As all the APIs for getting the packet pointer returns 
> the length in the current segment the application can be agnostic about how 
> the packet is stored in the pool.

The one thing it allows to do is avoid copyin/copyout to read/write packets. If 
you do not use any fragmentation, you only have one segment and can always work 
directly within the segment.
You can do it now by checking that the len of data in the segment is equal to 
the total len of data in the packet.
But it needs two API calls to check that, instead of one check handled at 
compile tim.

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

Reply via email to