Added odp_pktio_recv_queue for direct packet receive from pktio input
hash queues.

Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com>
---
 include/odp/api/packet_io.h | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h
index 7706049..3f5a065 100644
--- a/include/odp/api/packet_io.h
+++ b/include/odp/api/packet_io.h
@@ -233,16 +233,31 @@ int odp_pktio_close(odp_pktio_t pktio);
 odp_pktio_t odp_pktio_lookup(const char *dev);
 
 /**
- * Receive packets
+ * Receive packets directly from interface
  *
- * @param pktio       Packet IO handle
- * @param pkt_table[] Storage for received packets (filled by function)
- * @param len         Length of pkt_table[], i.e. max number of pkts to receive
+ * @param      pktio      Packet IO handle
+ * @param[out] packets[]  Array of packet handles for received packets
+ * @param      num        Maximum number of packets to receive
  *
  * @return Number of packets received
  * @retval <0 on failure
  */
-int odp_pktio_recv(odp_pktio_t pktio, odp_packet_t pkt_table[], int len);
+int odp_pktio_recv(odp_pktio_t pktio, odp_packet_t packets[], int num);
+
+/**
+ * Receive packets directly from a queue of an interface
+ *
+ * @param      pktio      Packet IO handle
+ * @param      queue      The input hash queue from which to receive packets.
+ *                        The queue must belong to the pktio interface.
+ * @param[out] packets[]  Array of packet handles for received packets
+ * @param      num        Maximum number of packets to receive
+ *
+ * @return Number of packets received
+ * @retval <0 on failure
+ */
+int odp_pktio_recv_queue(odp_pktio_t pktio, odp_queue_t queue,
+                        odp_packet_t packets[], int num);
 
 /**
  * Send packets
-- 
2.6.2

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to