diff mbox series

[API-NEXT,v1,1/3] api: packet: add subtype call

Message ID 1533816007-30726-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v1,1/3] api: packet: add subtype call | expand

Commit Message

Github ODP bot Aug. 9, 2018, noon UTC
From: Petri Savolainen <petri.savolainen@linaro.org>


This call is useful when packet subtype needs to be checked sometime
after an event has been converted into a packet. The first
application stage (receiving and converting events) does not have to
record packet subtype for following application stages that process
only packets, not events.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 669 (psavol:next-packet-subtype)
 ** https://github.com/Linaro/odp/pull/669
 ** Patch: https://github.com/Linaro/odp/pull/669.patch
 ** Base sha: 9b2b5a9695ad66977c964c83691cd2fef4c45b85
 ** Merge commit sha: 3a6201b601ab55e07cbfd561fa9904ba48035478
 **/
 include/odp/api/spec/packet.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff mbox series

Patch

diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h
index 66665e121..78e519ac3 100644
--- a/include/odp/api/spec/packet.h
+++ b/include/odp/api/spec/packet.h
@@ -224,6 +224,19 @@  typedef enum odp_packet_chksum_status_t {
 
 } odp_packet_chksum_status_t;
 
+/**
+ * Event subtype of a packet
+ *
+ * Returns the subtype of a packet event. Subtype tells if the packet contains
+ * only basic metadata (ODP_EVENT_PACKET_BASIC) or in addition to that some
+ * specific metadata (e.g. ODP_EVENT_PACKET_CRYPTO or ODP_EVENT_PACKET_IPSEC).
+ *
+ * @param      packet   Packet handle
+ *
+ * @return Packet subtype
+ */
+odp_event_subtype_t odp_packet_subtype(odp_packet_t packet);
+
 /*
  *
  * Alloc and free