diff options
author | Petri Savolainen <petri.savolainen@linaro.org> | 2018-01-12 12:53:11 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-02-26 13:34:59 +0300 |
commit | 8f3b7a2e4f58979e3777598fe078bec0169fd674 (patch) | |
tree | 00f49f9245ce49b670ee1940fe72a6427f7e141a /include | |
parent | 5e015195ffb1574051cbb10d69881cbbb9708919 (diff) |
api: packet: initialize user ptr to NULL
Require that implementation initializes the pointer value
to NULL. Application can use the pointer more robustly when
it can tell if the pointer has been set previously or not.
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/odp/api/spec/packet.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index a1111325e..3222ff5c2 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -1341,7 +1341,10 @@ int odp_packet_input_index(odp_packet_t pkt); /** * User context pointer * - * Return previously stored user context pointer. + * Return previously stored user context pointer. If not otherwise documented, + * the pointer value is maintained over packet manipulating operations. + * Implementation initializes the pointer value to NULL during new packet + * creation (e.g. alloc and packet input) and reset. * * @param pkt Packet handle * @@ -1357,10 +1360,10 @@ void *odp_packet_user_ptr(odp_packet_t pkt); * value of type intptr_t. ODP may use the pointer for data prefetching, but * must ignore any invalid addresses. * - * @param pkt Packet handle - * @param ctx User context pointer + * @param pkt Packet handle + * @param user_ptr User context pointer */ -void odp_packet_user_ptr_set(odp_packet_t pkt, const void *ctx); +void odp_packet_user_ptr_set(odp_packet_t pkt, const void *user_ptr); /** * User area address |