Term "area" highlights better that the per packet user area is fixed in size and position. E.g. odp_packet_data(), odp_packet_seg_data() return pointers which are (likely) modified during packet processing.
Signed-off-by: Petri Savolainen <[email protected]> --- include/odp/api/packet.h | 24 ++++++++++++++---------- include/odp/api/pool.h | 7 +++---- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h index 840e152..cbd06d5 100644 --- a/include/odp/api/packet.h +++ b/include/odp/api/packet.h @@ -467,24 +467,28 @@ uint64_t odp_packet_user_u64(odp_packet_t pkt); void odp_packet_user_u64_set(odp_packet_t pkt, uint64_t ctx); /** - * Get address of user metadata associated with a packet + * User area address * - * @param pkt Packet handle + * Each packet has an area for user data. Size of the area is fixed and defined + * in packet pool parameters. * - * @retval addr Address of the user metadata associated with pkt - * @retval NULL The packet has no user metadata. + * @param pkt Packet handle + * + * @return User area address associated with the packet + * @retval NULL The packet does not have user area */ -void *odp_packet_user_data(odp_packet_t pkt); +void *odp_packet_user_area(odp_packet_t pkt); /** - * Get size of user metadata associated with a packet + * User area size * - * @param pkt Packet handle + * The size is fixed and defined in packet pool parameters. * - * @return Number of bytes of user metadata associated - * with pkt. + * @param pkt Packet handle + * + * @return User area size in bytes */ -uint32_t odp_packet_user_data_size(odp_packet_t pkt); +uint32_t odp_packet_user_area_size(odp_packet_t pkt); /** * Layer 2 start pointer diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h index 0092132..9dd2593 100644 --- a/include/odp/api/pool.h +++ b/include/odp/api/pool.h @@ -76,10 +76,9 @@ typedef struct odp_pool_param_t { The maximum value is defined by ODP_CONFIG_PACKET_SEG_LEN_MAX. Use 0 for default. */ - uint32_t udata_size; /**< User metadata size in - bytes. Specify as 0 if no - user metadata is to be - associated with the pkt */ + /** User area size in bytes. Specify as 0 if no user + area is needed. */ + uint32_t uarea_size; } pkt; struct { uint32_t num; /**< Number of timeouts in the pool */ -- 2.3.5 _______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
