diff mbox

[2/5] netdev-odp: rename buffer_pool to pool

Message ID 1426792468-12598-3-git-send-email-zoltan.kiss@linaro.org
State New
Headers show

Commit Message

Zoltan Kiss March 19, 2015, 7:14 p.m. UTC
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
---
 lib/netdev-odp.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
diff mbox

Patch

diff --git a/lib/netdev-odp.c b/lib/netdev-odp.c
index 7176992..7a0780e 100644
--- a/lib/netdev-odp.c
+++ b/lib/netdev-odp.c
@@ -57,8 +57,8 @@  VLOG_DEFINE_THIS_MODULE(odp);
 
 static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
 
-static odp_buffer_pool_t pool;
-static odp_buffer_pool_t struct_pool;
+static odp_pool_t pool;
+static odp_pool_t struct_pool;
 
 static int odp_initialized = 0;
 
@@ -66,7 +66,7 @@  struct netdev_odp {
     struct netdev up;
     odp_buffer_t odp_buf; /* odp_buffer_t that holds this struct */
     odp_pktio_t pktio;
-    odp_buffer_pool_t pkt_pool;
+    odp_pool_t pkt_pool;
     size_t frame_offset;
     size_t max_frame_len;
 
@@ -127,7 +127,7 @@  odp_init(int argc, char *argv[])
 static int
 odp_class_init(void)
 {
-    odp_buffer_pool_param_t params;
+    odp_pool_param_t params;
     int result = 0, i;
     odp_packet_t* pkts;
 
@@ -138,13 +138,13 @@  odp_class_init(void)
     params.num_bufs = SHM_PKT_POOL_NUM_BUFS;
     params.buf_type = ODP_BUFFER_TYPE_PACKET;
 
-    pool = odp_buffer_pool_create("packet_pool", ODP_SHM_NULL, &params);
+    pool = odp_pool_create("packet_pool", ODP_SHM_NULL, &params);
 
-    if (pool == ODP_BUFFER_POOL_INVALID) {
+    if (pool == ODP_POOL_INVALID) {
             VLOG_ERR("Error: packet pool create failed.\n");
             return -1;
     }
-    odp_buffer_pool_print(pool);
+    odp_pool_print(pool);
 
     /* Allocate all the packets from the pool and initialize ofpbuf part */
     pkts = malloc(sizeof(odp_packet_t) * params.num_bufs);
@@ -173,20 +173,20 @@  odp_class_init(void)
         odp_packet_free(pkts[i]);
     free(pkts);
 
-    odp_buffer_pool_print(pool);
+    odp_pool_print(pool);
 
     /* create pool for structures */
 
     params.buf_size = SHM_STRUCT_POOL_BUF_SIZE;
     params.num_bufs = SHM_STRUCT_POOL_NUM_BUFS;
 
-   struct_pool = odp_buffer_pool_create("struct_pool", ODP_SHM_NULL, &params);
+   struct_pool = odp_pool_create("struct_pool", ODP_SHM_NULL, &params);
 
-    if (struct_pool == ODP_BUFFER_POOL_INVALID) {
+    if (struct_pool == ODP_POOL_INVALID) {
             VLOG_ERR("Error: packet pool create failed.\n");
             return -1;
     }
-    odp_buffer_pool_print(struct_pool);
+    odp_pool_print(struct_pool);
 
     return result;
 }
@@ -215,7 +215,7 @@  netdev_odp_construct(struct netdev *netdev_)
     int err = 0;
     char *odp_if;
     struct netdev_odp *netdev = netdev_odp_cast(netdev_);
-    odp_buffer_pool_info_t info;
+    odp_pool_info_t info;
 
     odp_if = netdev_->name + 4; /* Names always start with "odp:" */
 
@@ -234,7 +234,7 @@  netdev_odp_construct(struct netdev *netdev_)
 
     netdev->pkt_pool = pool;
 
-    err = odp_buffer_pool_info(netdev->pkt_pool, &info);
+    err = odp_pool_info(netdev->pkt_pool, &info);
     if ( err != 0) {
 	VLOG_ERR("Error: Couldn't get default packet buffer size\n");
         goto out_err;