@@ -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 ODP packet IO handle
* @param pkt_table[] Array of packets to send
* @param len length of pkt_table[]
@@ -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 eventss 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
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> --- v4: - improve commit message - move changes into the body of the description include/odp/api/packet_io.h | 5 +++++ include/odp/api/queue.h | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-)