diff mbox

[3/3] api: buffer_pool: Rename buf_size pool_param

Message ID 1419002899-17314-3-git-send-email-petri.savolainen@linaro.org
State New
Headers show

Commit Message

Petri Savolainen Dec. 19, 2014, 3:28 p.m. UTC
Renamed pool parameter buf_size to buf_len, so that buf_len is
used consistently in buffer/pool/packet APIs.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
---
 example/generator/odp_generator.c                    |  2 +-
 example/ipsec/odp_ipsec.c                            |  6 +++---
 example/l2fwd/odp_l2fwd.c                            |  2 +-
 example/odp_example/odp_example.c                    |  2 +-
 example/packet/odp_pktio.c                           |  2 +-
 example/timer/odp_timer_test.c                       |  2 +-
 platform/linux-generic/include/api/odp_buffer_pool.h |  2 +-
 platform/linux-generic/odp_buffer_pool.c             | 12 ++++++------
 platform/linux-generic/odp_packet.c                  |  6 +++---
 platform/linux-generic/odp_schedule.c                |  2 +-
 test/api_test/odp_timer_ping.c                       |  2 +-
 11 files changed, 20 insertions(+), 20 deletions(-)

Comments

Bill Fischofer Dec. 20, 2014, 3:58 a.m. UTC | #1
On Fri, Dec 19, 2014 at 9:28 AM, Petri Savolainen <
petri.savolainen@linaro.org> wrote:
>
> Renamed pool parameter buf_size to buf_len, so that buf_len is
> used consistently in buffer/pool/packet APIs.
>
> Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
> ---
>  example/generator/odp_generator.c                    |  2 +-
>  example/ipsec/odp_ipsec.c                            |  6 +++---
>  example/l2fwd/odp_l2fwd.c                            |  2 +-
>  example/odp_example/odp_example.c                    |  2 +-
>  example/packet/odp_pktio.c                           |  2 +-
>  example/timer/odp_timer_test.c                       |  2 +-
>  platform/linux-generic/include/api/odp_buffer_pool.h |  2 +-
>  platform/linux-generic/odp_buffer_pool.c             | 12 ++++++------
>  platform/linux-generic/odp_packet.c                  |  6 +++---
>  platform/linux-generic/odp_schedule.c                |  2 +-
>  test/api_test/odp_timer_ping.c                       |  2 +-
>  11 files changed, 20 insertions(+), 20 deletions(-)
>
> diff --git a/example/generator/odp_generator.c
> b/example/generator/odp_generator.c
> index d4bea92..d15f645 100644
> --- a/example/generator/odp_generator.c
> +++ b/example/generator/odp_generator.c
> @@ -593,7 +593,7 @@ int main(int argc, char *argv[])
>         printf("First core:         %i\n\n", first_core);
>
>         /* Create packet pool */
> -       params.buf_size  = SHM_PKT_POOL_BUF_SIZE;
> +       params.buf_len   = SHM_PKT_POOL_BUF_SIZE;
>         params.buf_align = 0;
>         params.num_bufs  = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
>         params.buf_type  = ODP_BUFFER_TYPE_PACKET;
> diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
> index 223ca61..174b1c1 100644
> --- a/example/ipsec/odp_ipsec.c
> +++ b/example/ipsec/odp_ipsec.c
> @@ -399,7 +399,7 @@ void ipsec_init_pre(void)
>         }
>
>         /* Create output buffer pool */
> -       params.buf_size  = SHM_OUT_POOL_BUF_SIZE;
> +       params.buf_len   = SHM_OUT_POOL_BUF_SIZE;
>         params.buf_align = 0;
>         params.num_bufs  = SHM_PKT_POOL_BUF_COUNT;
>         params.buf_type  = ODP_BUFFER_TYPE_PACKET;
> @@ -1236,7 +1236,7 @@ main(int argc, char *argv[])
>         printf("First core:         %i\n\n", first_core);
>
>         /* Create packet buffer pool */
> -       params.buf_size  = SHM_PKT_POOL_BUF_SIZE;
> +       params.buf_len   = SHM_PKT_POOL_BUF_SIZE;
>         params.buf_align = 0;
>         params.num_bufs  = SHM_PKT_POOL_BUF_COUNT;
>         params.buf_type  = ODP_BUFFER_TYPE_PACKET;
> @@ -1250,7 +1250,7 @@ main(int argc, char *argv[])
>         }
>
>         /* Create context buffer pool */
> -       params.buf_size  = SHM_CTX_POOL_BUF_SIZE;
> +       params.buf_len   = SHM_CTX_POOL_BUF_SIZE;
>         params.buf_align = 0;
>         params.num_bufs  = SHM_CTX_POOL_BUF_COUNT;
>         params.buf_type  = ODP_BUFFER_TYPE_RAW;
> diff --git a/example/l2fwd/odp_l2fwd.c b/example/l2fwd/odp_l2fwd.c
> index 3e11b60..900f8ea 100644
> --- a/example/l2fwd/odp_l2fwd.c
> +++ b/example/l2fwd/odp_l2fwd.c
> @@ -382,7 +382,7 @@ int main(int argc, char *argv[])
>         printf("First core:         %i\n\n", first_core);
>
>         /* Create packet pool */
> -       params.buf_size  = SHM_PKT_POOL_BUF_SIZE;
> +       params.buf_len   = SHM_PKT_POOL_BUF_SIZE;
>         params.buf_align = 0;
>         params.num_bufs  = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
>         params.buf_type  = ODP_BUFFER_TYPE_PACKET;
> diff --git a/example/odp_example/odp_example.c
> b/example/odp_example/odp_example.c
> index 8373f12..cc1cc4c 100644
> --- a/example/odp_example/odp_example.c
> +++ b/example/odp_example/odp_example.c
> @@ -1043,7 +1043,7 @@ int main(int argc, char *argv[])
>          * Create message pool
>          */
>
> -       params.buf_size  = sizeof(test_message_t);
> +       params.buf_len   = sizeof(test_message_t);
>         params.buf_align = 0;
>         params.num_bufs  = MSG_POOL_SIZE/sizeof(test_message_t);
>         params.buf_type  = ODP_BUFFER_TYPE_RAW;
> diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c
> index a323ec2..78a70b0 100644
> --- a/example/packet/odp_pktio.c
> +++ b/example/packet/odp_pktio.c
> @@ -382,7 +382,7 @@ int main(int argc, char *argv[])
>         printf("First core:         %i\n\n", first_core);
>
>         /* Create packet pool */
> -       params.buf_size  = SHM_PKT_POOL_BUF_SIZE;
> +       params.buf_len   = SHM_PKT_POOL_BUF_SIZE;
>         params.buf_align = 0;
>         params.num_bufs  = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
>         params.buf_type  = ODP_BUFFER_TYPE_PACKET;
> diff --git a/example/timer/odp_timer_test.c
> b/example/timer/odp_timer_test.c
> index 0d6e31a..b8c701f 100644
> --- a/example/timer/odp_timer_test.c
> +++ b/example/timer/odp_timer_test.c
> @@ -314,7 +314,7 @@ int main(int argc, char *argv[])
>         shm = odp_shm_reserve("msg_pool",
>                               MSG_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0);
>
> -       params.buf_size  = 0;
> +       params.buf_len   = 0;
>         params.buf_align = 0;
>         params.num_bufs  = MSG_POOL_SIZE;
>         params.buf_type  = ODP_BUFFER_TYPE_TIMEOUT;
> diff --git a/platform/linux-generic/include/api/odp_buffer_pool.h
> b/platform/linux-generic/include/api/odp_buffer_pool.h
> index 27e816d..ac3cec5 100644
> --- a/platform/linux-generic/include/api/odp_buffer_pool.h
> +++ b/platform/linux-generic/include/api/odp_buffer_pool.h
> @@ -40,7 +40,7 @@ extern "C" {
>   * ODP_CONFIG_BUFFER_ALIGN_MAX
>   */
>  typedef struct odp_buffer_pool_param_t {
> -       uint32_t buf_size;  /**< Minimum buffer length in bytes. For
> packets,
> +       uint32_t buf_len;   /**< Minimum buffer length in bytes. For
> packets,
>                                  this is the minimum segment buffer
> length. The
>                                  length includes head-/tailroom bytes. Use
> 0 for
>                                  default length. */
> diff --git a/platform/linux-generic/odp_buffer_pool.c
> b/platform/linux-generic/odp_buffer_pool.c
> index 021571a..2d2932b 100644
> --- a/platform/linux-generic/odp_buffer_pool.c
> +++ b/platform/linux-generic/odp_buffer_pool.c
> @@ -148,7 +148,7 @@ odp_buffer_pool_t odp_buffer_pool_create(const char
> *name,
>         switch (params->buf_type) {
>         case ODP_BUFFER_TYPE_RAW:
>         case ODP_BUFFER_TYPE_TIMEOUT:
> -               blk_size = params->buf_size;
> +               blk_size = params->buf_len;
>
>                 /* Optimize small raw buffers */
>                 if (blk_size > ODP_MAX_INLINE_BUF || params->buf_align !=
> 0)
> @@ -165,11 +165,11 @@ odp_buffer_pool_t odp_buffer_pool_create(const char
> *name,
>                 tailroom = ODP_CONFIG_PACKET_TAILROOM;
>                 if (unsegmented)
>                         blk_size = ODP_ALIGN_ROUNDUP(
> -                               headroom + params->buf_size + tailroom,
> +                               headroom + params->buf_len + tailroom,
>                                 buf_align);
>                 else
>                         blk_size = ODP_ALIGN_ROUNDUP(
> -                               headroom + params->buf_size + tailroom,
> +                               headroom + params->buf_len + tailroom,
>                                 ODP_CONFIG_PACKET_BUF_LEN_MIN);
>                 buf_stride = params->buf_type == ODP_BUFFER_TYPE_PACKET ?
>                         sizeof(odp_packet_hdr_stride) :
> @@ -405,7 +405,7 @@ int odp_buffer_pool_info(odp_buffer_pool_t pool_hdl,
>         info->name = pool->s.name;
>         info->shm  = pool->s.flags.user_supplied_shm ?
>                 pool->s.pool_shm : ODP_SHM_NULL;
> -       info->params.buf_size  = pool->s.params.buf_size;
> +       info->params.buf_len   = pool->s.params.buf_len;
>         info->params.buf_align = pool->s.params.buf_align;
>         info->params.num_bufs  = pool->s.params.num_bufs;
>         info->params.buf_type  = pool->s.params.buf_type;
> @@ -506,7 +506,7 @@ odp_buffer_t buffer_alloc(odp_buffer_pool_t pool_hdl,
> size_t size)
>  odp_buffer_t odp_buffer_alloc(odp_buffer_pool_t pool_hdl)
>  {
>         return buffer_alloc(pool_hdl,
> -
>  odp_pool_to_entry(pool_hdl)->s.params.buf_size);
> +                           odp_pool_to_entry(pool_hdl)->s.params.buf_len);
>  }
>
>  void odp_buffer_free(odp_buffer_t buf)
> @@ -575,7 +575,7 @@ void odp_buffer_pool_print(odp_buffer_pool_t pool_hdl)
>         ODP_DBG(" pool mdata base %p\n",  pool->s.pool_mdata_addr);
>         ODP_DBG(" udata size      %zu\n", pool->s.init_params.udata_size);
>         ODP_DBG(" headroom        %u\n",  pool->s.headroom);
> -       ODP_DBG(" buf size        %zu\n", pool->s.params.buf_size);
> +       ODP_DBG(" buf size        %zu\n", pool->s.params.buf_len);
>

Should change display text from buf size to buf len as well for consistency.


>         ODP_DBG(" tailroom        %u\n",  pool->s.tailroom);
>         ODP_DBG(" buf align       %u requested, %u used\n",
>                 pool->s.params.buf_align, pool->s.buf_align);
> diff --git a/platform/linux-generic/odp_packet.c
> b/platform/linux-generic/odp_packet.c
> index 5bf7b60..c4c448b 100644
> --- a/platform/linux-generic/odp_packet.c
> +++ b/platform/linux-generic/odp_packet.c
> @@ -36,10 +36,10 @@ odp_packet_t odp_packet_alloc(odp_buffer_pool_t
> pool_hdl, uint32_t len)
>         if (len == 0) {
>                 odp_packet_t pkt =
>                         (odp_packet_t)buffer_alloc(pool_hdl,
> -
> pool->s.params.buf_size);
> +                                                  pool->s.params.buf_len);
>                 if (pkt != ODP_PACKET_INVALID)
>                         pull_tail(odp_packet_hdr(pkt),
> -                                 pool->s.params.buf_size);
> +                                 pool->s.params.buf_len);
>
>                 return pkt;
>         }
> @@ -619,7 +619,7 @@ odp_packet_t _odp_packet_alloc(odp_buffer_pool_t
> pool_hdl)
>                 return ODP_PACKET_INVALID;
>
>         return (odp_packet_t)buffer_alloc(pool_hdl,
> -                                         pool->s.params.buf_size);
> +                                         pool->s.params.buf_len);
>  }
>
>  /**
> diff --git a/platform/linux-generic/odp_schedule.c
> b/platform/linux-generic/odp_schedule.c
> index a14de4f..0564130 100644
> --- a/platform/linux-generic/odp_schedule.c
> +++ b/platform/linux-generic/odp_schedule.c
> @@ -100,7 +100,7 @@ int odp_schedule_init_global(void)
>                 return -1;
>         }
>
> -       params.buf_size  = sizeof(queue_desc_t);
> +       params.buf_len   = sizeof(queue_desc_t);
>         params.buf_align = 0;
>         params.num_bufs  = SCHED_POOL_SIZE/sizeof(queue_desc_t);
>         params.buf_type  = ODP_BUFFER_TYPE_RAW;
> diff --git a/test/api_test/odp_timer_ping.c
> b/test/api_test/odp_timer_ping.c
> index fb640d8..c9e3086 100644
> --- a/test/api_test/odp_timer_ping.c
> +++ b/test/api_test/odp_timer_ping.c
> @@ -337,7 +337,7 @@ int main(int argc __attribute__((__unused__)),
>          * Create message pool
>          */
>
> -       params.buf_size  = BUF_SIZE;
> +       params.buf_len   = BUF_SIZE;
>         params.buf_align = 0;
>         params.num_bufs  = MSG_POOL_SIZE/BUF_SIZE;
>         params.buf_type  = ODP_BUFFER_TYPE_RAW;
> --
> 2.2.1
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
diff mbox

Patch

diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index d4bea92..d15f645 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -593,7 +593,7 @@  int main(int argc, char *argv[])
 	printf("First core:         %i\n\n", first_core);
 
 	/* Create packet pool */
-	params.buf_size  = SHM_PKT_POOL_BUF_SIZE;
+	params.buf_len   = SHM_PKT_POOL_BUF_SIZE;
 	params.buf_align = 0;
 	params.num_bufs  = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
 	params.buf_type  = ODP_BUFFER_TYPE_PACKET;
diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index 223ca61..174b1c1 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -399,7 +399,7 @@  void ipsec_init_pre(void)
 	}
 
 	/* Create output buffer pool */
-	params.buf_size  = SHM_OUT_POOL_BUF_SIZE;
+	params.buf_len   = SHM_OUT_POOL_BUF_SIZE;
 	params.buf_align = 0;
 	params.num_bufs  = SHM_PKT_POOL_BUF_COUNT;
 	params.buf_type  = ODP_BUFFER_TYPE_PACKET;
@@ -1236,7 +1236,7 @@  main(int argc, char *argv[])
 	printf("First core:         %i\n\n", first_core);
 
 	/* Create packet buffer pool */
-	params.buf_size  = SHM_PKT_POOL_BUF_SIZE;
+	params.buf_len   = SHM_PKT_POOL_BUF_SIZE;
 	params.buf_align = 0;
 	params.num_bufs  = SHM_PKT_POOL_BUF_COUNT;
 	params.buf_type  = ODP_BUFFER_TYPE_PACKET;
@@ -1250,7 +1250,7 @@  main(int argc, char *argv[])
 	}
 
 	/* Create context buffer pool */
-	params.buf_size  = SHM_CTX_POOL_BUF_SIZE;
+	params.buf_len   = SHM_CTX_POOL_BUF_SIZE;
 	params.buf_align = 0;
 	params.num_bufs  = SHM_CTX_POOL_BUF_COUNT;
 	params.buf_type  = ODP_BUFFER_TYPE_RAW;
diff --git a/example/l2fwd/odp_l2fwd.c b/example/l2fwd/odp_l2fwd.c
index 3e11b60..900f8ea 100644
--- a/example/l2fwd/odp_l2fwd.c
+++ b/example/l2fwd/odp_l2fwd.c
@@ -382,7 +382,7 @@  int main(int argc, char *argv[])
 	printf("First core:         %i\n\n", first_core);
 
 	/* Create packet pool */
-	params.buf_size  = SHM_PKT_POOL_BUF_SIZE;
+	params.buf_len   = SHM_PKT_POOL_BUF_SIZE;
 	params.buf_align = 0;
 	params.num_bufs  = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
 	params.buf_type  = ODP_BUFFER_TYPE_PACKET;
diff --git a/example/odp_example/odp_example.c b/example/odp_example/odp_example.c
index 8373f12..cc1cc4c 100644
--- a/example/odp_example/odp_example.c
+++ b/example/odp_example/odp_example.c
@@ -1043,7 +1043,7 @@  int main(int argc, char *argv[])
 	 * Create message pool
 	 */
 
-	params.buf_size  = sizeof(test_message_t);
+	params.buf_len   = sizeof(test_message_t);
 	params.buf_align = 0;
 	params.num_bufs  = MSG_POOL_SIZE/sizeof(test_message_t);
 	params.buf_type  = ODP_BUFFER_TYPE_RAW;
diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c
index a323ec2..78a70b0 100644
--- a/example/packet/odp_pktio.c
+++ b/example/packet/odp_pktio.c
@@ -382,7 +382,7 @@  int main(int argc, char *argv[])
 	printf("First core:         %i\n\n", first_core);
 
 	/* Create packet pool */
-	params.buf_size  = SHM_PKT_POOL_BUF_SIZE;
+	params.buf_len   = SHM_PKT_POOL_BUF_SIZE;
 	params.buf_align = 0;
 	params.num_bufs  = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
 	params.buf_type  = ODP_BUFFER_TYPE_PACKET;
diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c
index 0d6e31a..b8c701f 100644
--- a/example/timer/odp_timer_test.c
+++ b/example/timer/odp_timer_test.c
@@ -314,7 +314,7 @@  int main(int argc, char *argv[])
 	shm = odp_shm_reserve("msg_pool",
 			      MSG_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0);
 
-	params.buf_size  = 0;
+	params.buf_len   = 0;
 	params.buf_align = 0;
 	params.num_bufs  = MSG_POOL_SIZE;
 	params.buf_type  = ODP_BUFFER_TYPE_TIMEOUT;
diff --git a/platform/linux-generic/include/api/odp_buffer_pool.h b/platform/linux-generic/include/api/odp_buffer_pool.h
index 27e816d..ac3cec5 100644
--- a/platform/linux-generic/include/api/odp_buffer_pool.h
+++ b/platform/linux-generic/include/api/odp_buffer_pool.h
@@ -40,7 +40,7 @@  extern "C" {
  * ODP_CONFIG_BUFFER_ALIGN_MAX
  */
 typedef struct odp_buffer_pool_param_t {
-	uint32_t buf_size;  /**< Minimum buffer length in bytes. For packets,
+	uint32_t buf_len;   /**< Minimum buffer length in bytes. For packets,
 				 this is the minimum segment buffer length. The
 				 length includes head-/tailroom bytes. Use 0 for
 				 default length. */
diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c
index 021571a..2d2932b 100644
--- a/platform/linux-generic/odp_buffer_pool.c
+++ b/platform/linux-generic/odp_buffer_pool.c
@@ -148,7 +148,7 @@  odp_buffer_pool_t odp_buffer_pool_create(const char *name,
 	switch (params->buf_type) {
 	case ODP_BUFFER_TYPE_RAW:
 	case ODP_BUFFER_TYPE_TIMEOUT:
-		blk_size = params->buf_size;
+		blk_size = params->buf_len;
 
 		/* Optimize small raw buffers */
 		if (blk_size > ODP_MAX_INLINE_BUF || params->buf_align != 0)
@@ -165,11 +165,11 @@  odp_buffer_pool_t odp_buffer_pool_create(const char *name,
 		tailroom = ODP_CONFIG_PACKET_TAILROOM;
 		if (unsegmented)
 			blk_size = ODP_ALIGN_ROUNDUP(
-				headroom + params->buf_size + tailroom,
+				headroom + params->buf_len + tailroom,
 				buf_align);
 		else
 			blk_size = ODP_ALIGN_ROUNDUP(
-				headroom + params->buf_size + tailroom,
+				headroom + params->buf_len + tailroom,
 				ODP_CONFIG_PACKET_BUF_LEN_MIN);
 		buf_stride = params->buf_type == ODP_BUFFER_TYPE_PACKET ?
 			sizeof(odp_packet_hdr_stride) :
@@ -405,7 +405,7 @@  int odp_buffer_pool_info(odp_buffer_pool_t pool_hdl,
 	info->name = pool->s.name;
 	info->shm  = pool->s.flags.user_supplied_shm ?
 		pool->s.pool_shm : ODP_SHM_NULL;
-	info->params.buf_size  = pool->s.params.buf_size;
+	info->params.buf_len   = pool->s.params.buf_len;
 	info->params.buf_align = pool->s.params.buf_align;
 	info->params.num_bufs  = pool->s.params.num_bufs;
 	info->params.buf_type  = pool->s.params.buf_type;
@@ -506,7 +506,7 @@  odp_buffer_t buffer_alloc(odp_buffer_pool_t pool_hdl, size_t size)
 odp_buffer_t odp_buffer_alloc(odp_buffer_pool_t pool_hdl)
 {
 	return buffer_alloc(pool_hdl,
-			    odp_pool_to_entry(pool_hdl)->s.params.buf_size);
+			    odp_pool_to_entry(pool_hdl)->s.params.buf_len);
 }
 
 void odp_buffer_free(odp_buffer_t buf)
@@ -575,7 +575,7 @@  void odp_buffer_pool_print(odp_buffer_pool_t pool_hdl)
 	ODP_DBG(" pool mdata base %p\n",  pool->s.pool_mdata_addr);
 	ODP_DBG(" udata size      %zu\n", pool->s.init_params.udata_size);
 	ODP_DBG(" headroom        %u\n",  pool->s.headroom);
-	ODP_DBG(" buf size        %zu\n", pool->s.params.buf_size);
+	ODP_DBG(" buf size        %zu\n", pool->s.params.buf_len);
 	ODP_DBG(" tailroom        %u\n",  pool->s.tailroom);
 	ODP_DBG(" buf align       %u requested, %u used\n",
 		pool->s.params.buf_align, pool->s.buf_align);
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index 5bf7b60..c4c448b 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -36,10 +36,10 @@  odp_packet_t odp_packet_alloc(odp_buffer_pool_t pool_hdl, uint32_t len)
 	if (len == 0) {
 		odp_packet_t pkt =
 			(odp_packet_t)buffer_alloc(pool_hdl,
-						   pool->s.params.buf_size);
+						   pool->s.params.buf_len);
 		if (pkt != ODP_PACKET_INVALID)
 			pull_tail(odp_packet_hdr(pkt),
-				  pool->s.params.buf_size);
+				  pool->s.params.buf_len);
 
 		return pkt;
 	}
@@ -619,7 +619,7 @@  odp_packet_t _odp_packet_alloc(odp_buffer_pool_t pool_hdl)
 		return ODP_PACKET_INVALID;
 
 	return (odp_packet_t)buffer_alloc(pool_hdl,
-					  pool->s.params.buf_size);
+					  pool->s.params.buf_len);
 }
 
 /**
diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c
index a14de4f..0564130 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -100,7 +100,7 @@  int odp_schedule_init_global(void)
 		return -1;
 	}
 
-	params.buf_size  = sizeof(queue_desc_t);
+	params.buf_len   = sizeof(queue_desc_t);
 	params.buf_align = 0;
 	params.num_bufs  = SCHED_POOL_SIZE/sizeof(queue_desc_t);
 	params.buf_type  = ODP_BUFFER_TYPE_RAW;
diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c
index fb640d8..c9e3086 100644
--- a/test/api_test/odp_timer_ping.c
+++ b/test/api_test/odp_timer_ping.c
@@ -337,7 +337,7 @@  int main(int argc __attribute__((__unused__)),
 	 * Create message pool
 	 */
 
-	params.buf_size  = BUF_SIZE;
+	params.buf_len   = BUF_SIZE;
 	params.buf_align = 0;
 	params.num_bufs  = MSG_POOL_SIZE/BUF_SIZE;
 	params.buf_type  = ODP_BUFFER_TYPE_RAW;