Message ID | 1460512542-16544-5-git-send-email-bill.fischofer@linaro.org |
---|---|
State | Superseded |
Headers | show |
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 4202a90..2abb227 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -211,7 +211,9 @@ void *odp_packet_head(odp_packet_t pkt) uint32_t odp_packet_buf_len(odp_packet_t pkt) { - return odp_packet_hdr(pkt)->buf_hdr.size; + odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); + + return pkt_hdr->buf_hdr.size * pkt_hdr->buf_hdr.segcount; } void *odp_packet_data(odp_packet_t pkt)
odp_packet_buf_len() must return buffer length over all segments Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- platform/linux-generic/odp_packet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)