On 11/27/2014 06:56 PM, Stuart Haslam wrote:
Attempts to enq to a pktin queue or deq from a pktout queue are
programming errors, so abort.
Signed-off-by: Stuart Haslam <[email protected]>
---
(This code contribution is provided under the terms of agreement LES-LTM-21309)
platform/linux-generic/odp_packet_io.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/platform/linux-generic/odp_packet_io.c
b/platform/linux-generic/odp_packet_io.c
index f527e45..161f2ce 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -384,6 +384,9 @@ int pktout_enqueue(queue_entry_t *qentry, odp_buffer_hdr_t
*buf_hdr)
odp_buffer_hdr_t *pktout_dequeue(queue_entry_t *qentry)
{
(void)qentry;
+
+ ODP_ABORT("attempted dequeue from a pktout queue");
+
return NULL;
}
@@ -408,13 +411,19 @@ int pktout_deq_multi(queue_entry_t *qentry,
odp_buffer_hdr_t *buf_hdr[],
(void)buf_hdr;
(void)num;
+ ODP_ABORT("attempted dequeue from a pktout queue");
+
return 0;
}
int pktin_enqueue(queue_entry_t *qentry, odp_buffer_hdr_t *buf_hdr)
{
- /* Use default action */
- return queue_enq(qentry, buf_hdr);
+ (void)qentry;
+ (void)buf_hdr;
We used to use ODP_UNUSED attribute. Otherwise
Reviewed-by: Taras Kondratiuk <[email protected]>
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp