On 24 July 2015 at 14:44, Nicolas Morey-Chaisemartin <[email protected]> wrote:
> > > On 07/24/2015 11:10 AM, Bala Manoharan wrote: > > > > On 23 July 2015 at 12:09, Nicolas Morey-Chaisemartin < <[email protected]> > [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]> >> 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. > Not sure if I understand your point completely, Copying a data plane packet is usually a costly operation and most applications should try to avoid this scenario. Segmentation usually helps in resource optimization as the total memory of the system can be efficiently handled by storing the packet as segments. > 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. > This optimization will be useful only for platforms which do not support segmentation as then the application can be sure that the packet are in first segment but for platforms which support segmentation the application will have to decide at run time depending upon the size of the segments which is optimized per implementation. Maybe if you can provide some use-case example for having the above as a config parameter. It might be easy to understand the requirements from your side. > > Nicolas > Regards, Bala
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
