aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorZoltan Kiss <zoltan.kiss@linaro.org>2015-07-01 18:06:11 +0100
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-07-16 16:14:41 +0300
commit90efae45b044c7dd1731ffef242181d61508b902 (patch)
treee641298a638b4dc2756a59e4f12f4b15316c29d6 /include
parentf37a493f8cfa273b2fc58177d2e0af35ce79f39a (diff)
api: packet_io: clarify what happens when not all packets are sent
Clarify that the user owns all events not sent/enqueued successfully. Currently our examples are not handling this situation as well. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/odp/api/packet_io.h5
-rw-r--r--include/odp/api/queue.h10
2 files changed, 14 insertions, 1 deletions
diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h
index 81dcae4a..580febaf 100644
--- a/include/odp/api/packet_io.h
+++ b/include/odp/api/packet_io.h
@@ -107,6 +107,11 @@ int odp_pktio_recv(odp_pktio_t pktio, odp_packet_t pkt_table[], int len);
/**
* Send packets
*
+ * Sends out a number of packets. A successful call returns the actual number of
+ * packets sent. If return value is less than 'len', the remaining packets at
+ * the end of pkt_table[] are not consumed, and the caller has to take care of
+ * them.
+ *
* @param pktio Packet IO handle
* @param pkt_table[] Array of packets to send
* @param len length of pkt_table[]
diff --git a/include/odp/api/queue.h b/include/odp/api/queue.h
index 6a8b15f6..b0d8d1e1 100644
--- a/include/odp/api/queue.h
+++ b/include/odp/api/queue.h
@@ -238,17 +238,25 @@ void *odp_queue_get_context(odp_queue_t queue);
/**
* Queue enqueue
*
+ * Enqueue the 'ev' on 'queue'. On failure the event is not consumed, the caller
+ * has to take care of it.
+ *
* @param queue Queue handle
* @param ev Event handle
*
* @retval 0 on success
- * @retval <0 on failure (e.g. queue full)
+ * @retval <0 on failure
*/
int odp_queue_enq(odp_queue_t queue, odp_event_t ev);
/**
* Enqueue multiple events to a queue
*
+ * Enqueue the events from 'events[]' on 'queue'. A successful call returns the
+ * actual number of events enqueued. If return value is less than 'num', the
+ * remaining events at the end of events[] are not consumed, and the caller
+ * has to take care of them.
+ *
* @param queue Queue handle
* @param[in] events Array of event handles
* @param num Number of event handles to enqueue