@@ -126,6 +126,11 @@ extern "C" {
*/
#define ODP_CONFIG_PACKET_BUF_LEN_MAX (ODP_CONFIG_PACKET_SEG_LEN_MIN*6)
+/**
+ * Maximum packet references.
+ */
+#define ODP_CONFIG_PACKET_REFS 2
+
/** Maximum number of shared memory blocks.
*
* This the the number of separate SHM areas that can be reserved concurrently
@@ -125,6 +125,15 @@ odp_packet_t odp_packet_from_event(odp_event_t ev);
*/
odp_event_t odp_packet_to_event(odp_packet_t pkt);
+/**
+ * Create reference for packet handle
+ *
+ * @param pkt Packet handle
+ *
+ * @return New packet handle
+ */
+odp_packet_t odp_packet_create_ref(odp_packet_t pkt);
+
/*
*
* Pointers and lengths
Add api for packet reference count support. Which is useful in case: - multicast support - TCP retransmission - traffic generator Introduced new call: newpkt = odp_packet_create_ref(pkt) which creates reference to original packet, but handles for reference packet and original are different. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- include/odp/api/config.h | 5 +++++ include/odp/api/packet.h | 9 +++++++++ 2 files changed, 14 insertions(+)