diff mbox

[API-NEXT,PATCHv3,4/6] api: packet: add odp_packet_input_index() api

Message ID 1460829337-31120-4-git-send-email-bill.fischofer@linaro.org
State Accepted
Commit 2b3053d5e9d6fce32129329f7e79172d8dc93baf
Headers show

Commit Message

Bill Fischofer April 16, 2016, 5:55 p.m. UTC
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Bogdan Pricope <Bogdan.Pricope@enea.com>
---
 include/odp/api/spec/packet.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff mbox

Patch

diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h
index 7da353b..58183af 100644
--- a/include/odp/api/spec/packet.h
+++ b/include/odp/api/spec/packet.h
@@ -458,6 +458,19 @@  odp_pool_t odp_packet_pool(odp_packet_t pkt);
 odp_pktio_t odp_packet_input(odp_packet_t pkt);
 
 /**
+ * Packet input interface index
+ *
+ * Returns the index of the packet I/O interface that received the packet, or
+ * <0 when the packet was allocated/reset by the application.
+ *
+ * @param pkt   Packet handle
+ *
+ * @return Packet interface index (0..odp_config_pktio_entries()-1)
+ * @retval <0  Packet was not received on any interface
+ */
+int odp_packet_input_index(odp_packet_t pkt);
+
+/**
  * User context pointer
  *
  * Return previously stored user context pointer.