Applied On 9 January 2015 at 06:21, Savolainen, Petri (NSN - FI/Espoo) < [email protected]> wrote:
> Ping. This patch should be merged. The "patch v2 1/2 api: buffer_pool: > Correct buf_size pool param documentation" may be hold for now, since event > definition will change that part anyway. > > -Petri > > > -----Original Message----- > > From: ext Petri Savolainen [mailto:[email protected]] > > Sent: Tuesday, December 23, 2014 1:29 PM > > To: [email protected] > > Cc: Petri Savolainen > > Subject: [PATCH v2 2/2] api: buffer: Change buffer size from size_t to > > uint32_t > > > > 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 > -- *Mike Holmes* Linaro Sr Technical Manager LNG - ODP
_______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
