Bill Fischofer(Bill-Fischofer-Linaro) replied on github web page: platform/linux-generic/include/odp/api/plat/pool_types.h line 16 @@ -48,6 +48,19 @@ typedef enum odp_pool_type_t { #endif +/** @internal Pool field accessor */ +#define _odp_pool_get(pool, cast, field) \ + (*(cast *)(uintptr_t)((uint8_t *)pool + _odp_pool_inline.field)) + +/** @internal Pool header field offsets for inline functions */ +typedef struct _odp_pool_inline_offset_t { + /** @internal field offset */ + uint16_t pool_hdl; + /** @internal field offset */ + uint16_t uarea_size; + +} _odp_pool_inline_offset_t; +
Comment: @matiaselo I agree this is correctly placed here. > Bill Fischofer(Bill-Fischofer-Linaro) wrote: > 2.0 is based on api-next, not master. This will be one of several conflicts > that will need to be resolved at merge time. >> muvarov wrote >> @matiaselo yes, I see. While reading patches in that web interface sometime >> I miss some pieces of code. Just above you changed that. >>> Matias Elo(matiaselo) wrote: >>> While packing the pkt_dpdk_t struct I changed pkt_dpdk_t.lockless_rx and >>> pkt_dpdk_t.lockless_tx to uint8_t. I'm using the same type here. >>>> muvarov wrote >>>> why is that needed? >>>>> Dmitry Eremin-Solenikov(lumag) wrote: >>>>> This is not planned untill TigerMoth. >>>>>> nagarahalli wrote >>>>>> It is about 2.0 merge to master, it will happen sometime in the future. >>>>>>> Dmitry Eremin-Solenikov(lumag) wrote: >>>>>>> @nagarahalli Any reason why we shouldn't have it in master? >>>>>>>> nagarahalli wrote >>>>>>>> This change is done already in 2.0. >>>>>>>>> Dmitry Eremin-Solenikov(lumag) wrote: >>>>>>>>> @matiaselo ok. >>>>>>>>>> Matias Elo(matiaselo) wrote: >>>>>>>>>> Since there are currently no functions in sight to put into >>>>>>>>>> pool_inlines.h I would suggest not to add a new header file. If/when >>>>>>>>>> some pool inline function are added later on the header can be >>>>>>>>>> created them. Is this OK for you? >>>>>>>>>>> Dmitry Eremin-Solenikov(lumag) wrote: >>>>>>>>>>> Just wanted to have pool functions in pool header, etc. >>>>>>>>>>>> Matias Elo(matiaselo) wrote: >>>>>>>>>>>> I followed the same pattern as the packet inlines. >>>>>>>>>>>> _odp_packet_inline_offset_t is defined in packet_types.h. >>>>>>>>>>>>> Matias Elo(matiaselo) wrote: >>>>>>>>>>>>> pool_inlines.h would only include these two lines and looking at >>>>>>>>>>>>> pool API there aren't any additional functions which should be >>>>>>>>>>>>> inlined. Do you have a particular use case in mind for this >>>>>>>>>>>>> header? >>>>>>>>>>>>>> Dmitry Eremin-Solenikov(lumag) wrote: >>>>>>>>>>>>>> And this to pool_inline_types.h. >>>>>>>>>>>>>>> Dmitry Eremin-Solenikov(lumag) wrote: >>>>>>>>>>>>>>> This should go to pool_inlines.h https://github.com/Linaro/odp/pull/281#discussion_r150680373 updated_at 2017-11-13 22:11:00