Message ID | 1452270940-8973-1-git-send-email-zoltan.kiss@linaro.org |
---|---|
State | Accepted |
Commit | 6bd01ba32d5adcac0d96e57b5532893b448e5dfc |
Headers | show |
Merged, Maxim. On 01/08/2016 19:35, Zoltan Kiss wrote: > This reverts commit 798c450fc41ee4195977a5af855dbc98d8aaec16. The use case > is not strong enough for this feature. > > Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> > --- > include/odp/api/packet.h | 3 --- > include/odp/api/pool.h | 26 -------------------------- > 2 files changed, 29 deletions(-) > > diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h > index 8651a47..9c63b5f 100644 > --- a/include/odp/api/packet.h > +++ b/include/odp/api/packet.h > @@ -93,9 +93,6 @@ extern "C" { > * @note The default headroom and tailroom used for packets is specified by > * the ODP_CONFIG_PACKET_HEADROOM and ODP_CONFIG_PACKET_TAILROOM defines in > * odp_config.h. > - * @note Data changed in user area might be preserved by the platform from > - * previous usage of the buffer, so values preset in uarea_init() are not > - * guaranteed. > */ > odp_packet_t odp_packet_alloc(odp_pool_t pool, uint32_t len); > > diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h > index 01f770f..2e79a55 100644 > --- a/include/odp/api/pool.h > +++ b/include/odp/api/pool.h > @@ -21,7 +21,6 @@ extern "C" { > > > #include <odp/std_types.h> > -#include <odp/packet.h> > > /** @defgroup odp_pool ODP POOL > * Operations on a pool. > @@ -42,23 +41,6 @@ extern "C" { > #define ODP_POOL_NAME_LEN 32 > > /** > - * Packet user area initializer callback function for pools. > - * > - * @param pkt Handle of the packet > - * @param uarea_init_arg Opaque pointer defined in odp_pool_param_t > - * > - * @note If the application specifies this pointer, it expects that every buffer > - * is initialized exactly once with it when the underlying memory is allocated. > - * It is not called from odp_packet_alloc(), unless the platform chooses to > - * allocate the memory at that point. Applications can only assume that this > - * callback is called once before the packet is first used. Any subsequent > - * change to the user area might be preserved after odp_packet_free() is called, > - * so applications should take care of (re)initialization if they change data > - * preset by this function. > - */ > -typedef void (odp_packet_uarea_init_t)(odp_packet_t pkt, void *uarea_init_arg); > - > -/** > * Pool parameters > * Used to communicate pool creation options. > */ > @@ -100,14 +82,6 @@ typedef struct odp_pool_param_t { > /** User area size in bytes. Specify as 0 if no user > area is needed. */ > uint32_t uarea_size; > - > - /** Initialize every packet's user area at allocation > - time. Use NULL if no initialization needed. */ > - odp_packet_uarea_init_t *uarea_init; > - > - /** Opaque pointer passed to packet user area > - constructor. */ > - void *uarea_init_arg; > } pkt; > struct { > /** Number of timeouts in the pool */
Ahh, sorry, I forgot the implementation was also in the repo. I'll send a patch to revert that too. On 12/01/16 13:06, Elo, Matias (Nokia - FI/Espoo) wrote: > This seems to breaks build: > > odp_pool.c: In function 'packet_uarea_init': > odp_pool.c:152:52: error: 'struct <anonymous>' has no member named 'uarea_init' > if (params->type == ODP_POOL_PACKET && params->pkt.uarea_init) { > ^ > odp_pool.c:155:14: error: 'struct <anonymous>' has no member named 'uarea_init' > params->pkt.uarea_init(pkt, params->pkt.uarea_init_arg); > ^ > odp_pool.c:155:42: error: 'struct <anonymous>' has no member named 'uarea_init_arg' > params->pkt.uarea_init(pkt, params->pkt.uarea_init_arg); > ^ > make[1]: *** [odp_pool.lo] Error 1 > make[1]: Leaving directory `/home/matelo/dev/odp.git/platform/linux-generic' > make: *** [check-recursive] Error 1 > > > -Matias > >> -----Original Message----- >> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of EXT Maxim >> Uvarov >> Sent: Tuesday, January 12, 2016 1:38 PM >> To: lng-odp@lists.linaro.org >> Subject: Re: [lng-odp] [API-NEXT PATCH] Revert "api: pool: add packet user area >> initializer for pool creation parameters" >> >> Merged, >> Maxim. >> >> On 01/08/2016 19:35, Zoltan Kiss wrote: >>> This reverts commit 798c450fc41ee4195977a5af855dbc98d8aaec16. The use >> case >>> is not strong enough for this feature. >>> >>> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> >>> --- >>> include/odp/api/packet.h | 3 --- >>> include/odp/api/pool.h | 26 -------------------------- >>> 2 files changed, 29 deletions(-) >>> >>> diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h >>> index 8651a47..9c63b5f 100644 >>> --- a/include/odp/api/packet.h >>> +++ b/include/odp/api/packet.h >>> @@ -93,9 +93,6 @@ extern "C" { >>> * @note The default headroom and tailroom used for packets is specified by >>> * the ODP_CONFIG_PACKET_HEADROOM and >> ODP_CONFIG_PACKET_TAILROOM defines in >>> * odp_config.h. >>> - * @note Data changed in user area might be preserved by the platform from >>> - * previous usage of the buffer, so values preset in uarea_init() are not >>> - * guaranteed. >>> */ >>> odp_packet_t odp_packet_alloc(odp_pool_t pool, uint32_t len); >>> >>> diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h >>> index 01f770f..2e79a55 100644 >>> --- a/include/odp/api/pool.h >>> +++ b/include/odp/api/pool.h >>> @@ -21,7 +21,6 @@ extern "C" { >>> >>> >>> #include <odp/std_types.h> >>> -#include <odp/packet.h> >>> >>> /** @defgroup odp_pool ODP POOL >>> * Operations on a pool. >>> @@ -42,23 +41,6 @@ extern "C" { >>> #define ODP_POOL_NAME_LEN 32 >>> >>> /** >>> - * Packet user area initializer callback function for pools. >>> - * >>> - * @param pkt Handle of the packet >>> - * @param uarea_init_arg Opaque pointer defined in odp_pool_param_t >>> - * >>> - * @note If the application specifies this pointer, it expects that every buffer >>> - * is initialized exactly once with it when the underlying memory is allocated. >>> - * It is not called from odp_packet_alloc(), unless the platform chooses to >>> - * allocate the memory at that point. Applications can only assume that this >>> - * callback is called once before the packet is first used. Any subsequent >>> - * change to the user area might be preserved after odp_packet_free() is >> called, >>> - * so applications should take care of (re)initialization if they change data >>> - * preset by this function. >>> - */ >>> -typedef void (odp_packet_uarea_init_t)(odp_packet_t pkt, void >> *uarea_init_arg); >>> - >>> -/** >>> * Pool parameters >>> * Used to communicate pool creation options. >>> */ >>> @@ -100,14 +82,6 @@ typedef struct odp_pool_param_t { >>> /** User area size in bytes. Specify as 0 if no user >>> area is needed. */ >>> uint32_t uarea_size; >>> - >>> - /** Initialize every packet's user area at allocation >>> - time. Use NULL if no initialization needed. */ >>> - odp_packet_uarea_init_t *uarea_init; >>> - >>> - /** Opaque pointer passed to packet user area >>> - constructor. */ >>> - void *uarea_init_arg; >>> } pkt; >>> struct { >>> /** Number of timeouts in the pool */ >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> https://lists.linaro.org/mailman/listinfo/lng-odp > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h index 8651a47..9c63b5f 100644 --- a/include/odp/api/packet.h +++ b/include/odp/api/packet.h @@ -93,9 +93,6 @@ extern "C" { * @note The default headroom and tailroom used for packets is specified by * the ODP_CONFIG_PACKET_HEADROOM and ODP_CONFIG_PACKET_TAILROOM defines in * odp_config.h. - * @note Data changed in user area might be preserved by the platform from - * previous usage of the buffer, so values preset in uarea_init() are not - * guaranteed. */ odp_packet_t odp_packet_alloc(odp_pool_t pool, uint32_t len); diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h index 01f770f..2e79a55 100644 --- a/include/odp/api/pool.h +++ b/include/odp/api/pool.h @@ -21,7 +21,6 @@ extern "C" { #include <odp/std_types.h> -#include <odp/packet.h> /** @defgroup odp_pool ODP POOL * Operations on a pool. @@ -42,23 +41,6 @@ extern "C" { #define ODP_POOL_NAME_LEN 32 /** - * Packet user area initializer callback function for pools. - * - * @param pkt Handle of the packet - * @param uarea_init_arg Opaque pointer defined in odp_pool_param_t - * - * @note If the application specifies this pointer, it expects that every buffer - * is initialized exactly once with it when the underlying memory is allocated. - * It is not called from odp_packet_alloc(), unless the platform chooses to - * allocate the memory at that point. Applications can only assume that this - * callback is called once before the packet is first used. Any subsequent - * change to the user area might be preserved after odp_packet_free() is called, - * so applications should take care of (re)initialization if they change data - * preset by this function. - */ -typedef void (odp_packet_uarea_init_t)(odp_packet_t pkt, void *uarea_init_arg); - -/** * Pool parameters * Used to communicate pool creation options. */ @@ -100,14 +82,6 @@ typedef struct odp_pool_param_t { /** User area size in bytes. Specify as 0 if no user area is needed. */ uint32_t uarea_size; - - /** Initialize every packet's user area at allocation - time. Use NULL if no initialization needed. */ - odp_packet_uarea_init_t *uarea_init; - - /** Opaque pointer passed to packet user area - constructor. */ - void *uarea_init_arg; } pkt; struct { /** Number of timeouts in the pool */
This reverts commit 798c450fc41ee4195977a5af855dbc98d8aaec16. The use case is not strong enough for this feature. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> --- include/odp/api/packet.h | 3 --- include/odp/api/pool.h | 26 -------------------------- 2 files changed, 29 deletions(-)