On 12/12/2014 08:26 PM, Stuart Haslam wrote:
The buffer being returned shouldn't be enqueued as this will cause it to
be returned again on the next dequeue, by which point it may have been
freed via the returned reference.
Signed-off-by: Stuart Haslam <[email protected]>
---
Changes in v2 - rebased as it conflicted with the classification changes.
platform/linux-generic/odp_packet_io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/platform/linux-generic/odp_packet_io.c
b/platform/linux-generic/odp_packet_io.c
index a03eeb1..aa37179 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -483,8 +483,8 @@ odp_buffer_hdr_t *pktin_dequeue(queue_entry_t *qentry)
tmp_hdr_tbl[j++] = buf_hdr;
}
- if (j)
- queue_enq_multi(qentry, tmp_hdr_tbl, j);
+ if (j > 1)
+ queue_enq_multi(qentry, &tmp_hdr_tbl[1], j-1);
buf_hdr = tmp_hdr_tbl[0];
return buf_hdr;
}
Reviewed-by: Maxim Uvarov <[email protected]>
Ok that is good. I also send one more patch for that chunk.
Maxim.
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp