Use uint32_t for buffer size to be align with packet API lenghts
and offsets.

Signed-off-by: Petri Savolainen <[email protected]>
---
 platform/linux-generic/include/api/odp_buffer.h      | 2 +-
 platform/linux-generic/include/odp_buffer_internal.h | 2 +-
 platform/linux-generic/odp_buffer.c                  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/platform/linux-generic/include/api/odp_buffer.h 
b/platform/linux-generic/include/api/odp_buffer.h
index 3c23035..0670464 100644
--- a/platform/linux-generic/include/api/odp_buffer.h
+++ b/platform/linux-generic/include/api/odp_buffer.h
@@ -44,7 +44,7 @@ void *odp_buffer_addr(odp_buffer_t buf);
  *
  * @return Buffer maximum data size
  */
-size_t odp_buffer_size(odp_buffer_t buf);
+uint32_t odp_buffer_size(odp_buffer_t buf);
 
 /**
  * Buffer type
diff --git a/platform/linux-generic/include/odp_buffer_internal.h 
b/platform/linux-generic/include/odp_buffer_internal.h
index 60f06c9..a315f00 100644
--- a/platform/linux-generic/include/odp_buffer_internal.h
+++ b/platform/linux-generic/include/odp_buffer_internal.h
@@ -118,7 +118,7 @@ typedef struct odp_buffer_hdr_t {
                };
        } flags;
        int                      type;       /* buffer type */
-       size_t                   size;       /* max data size */
+       uint32_t                 size;       /* max data size */
        odp_atomic_u32_t         ref_count;  /* reference count */
        odp_buffer_pool_t        pool_hdl;   /* buffer pool handle */
        union {
diff --git a/platform/linux-generic/odp_buffer.c 
b/platform/linux-generic/odp_buffer.c
index dd37ab3..57ba408 100644
--- a/platform/linux-generic/odp_buffer.c
+++ b/platform/linux-generic/odp_buffer.c
@@ -22,7 +22,7 @@ void *odp_buffer_addr(odp_buffer_t buf)
 }
 
 
-size_t odp_buffer_size(odp_buffer_t buf)
+uint32_t odp_buffer_size(odp_buffer_t buf)
 {
        odp_buffer_hdr_t *hdr = odp_buf_to_hdr(buf);
 
@@ -63,7 +63,7 @@ int odp_buffer_snprint(char *str, uint32_t n, odp_buffer_t 
buf)
        len += snprintf(&str[len], n-len,
                        "  addr         %p\n",        hdr->addr);
        len += snprintf(&str[len], n-len,
-                       "  size         %zu\n",       hdr->size);
+                       "  size         %u\n",        hdr->size);
        len += snprintf(&str[len], n-len,
                        "  ref_count    %i\n",
                        odp_atomic_load_u32(&hdr->ref_count));
-- 
2.2.1


_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to