diff options
author | Matias Elo <matias.elo@nokia.com> | 2024-04-25 11:12:48 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2024-04-30 18:22:33 +0300 |
commit | 88dbe4213a93121f15bbc8113316b08bb91e00e2 (patch) | |
tree | 5de247fa2377cf6c8d116a41f43327d820fb2441 | |
parent | 9e5872810d78021d7f8863b285b55362b9720383 (diff) |
api: packet: add new odp_packet_reset_meta() function
Add new odp_packet_reset_meta() function for resetting only packet metadata
without modifying packet data.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Acked-by: Ashwin Sekhar T K <asekhar@marvell.com>
-rw-r--r-- | include/odp/api/spec/packet.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index 16f801324..624c3c7c3 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -156,6 +156,25 @@ int odp_packet_reset(odp_packet_t pkt, uint32_t len); * @return Maximum packet data length for odp_packet_reset() */ uint32_t odp_packet_reset_max_len(odp_packet_t pkt); + +/** + * Reset packet metadata + * + * Resets all packet metadata to their default values, except the ones listed + * below which are not modified: + * - Data pointer and length + * - Headroom and tailroom pointers and lengths + * - Packet segmentation + * - User area content + * - Dynamic reference count + * + * This function must not be called for packets with static references or + * incomplete reassembly status (ODP_PACKET_REASS_INCOMPLETE). + * + * @param pkt Packet handle + */ +void odp_packet_reset_meta(odp_packet_t pkt); + /** * Get packet handle from event * |