From patchwork Thu Mar 26 19:23:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 46387 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 780CF21585 for ; Thu, 26 Mar 2015 19:25:09 +0000 (UTC) Received: by wgqa9 with SMTP id a9sf6720852wgq.2 for ; Thu, 26 Mar 2015 12:25:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=cdPieUuITlTR2Xp9rHOs+Y8+jdqCIhHAAbjcgHFAtsY=; b=F/Jf3hMKgIg8ihkoE4Y/cKWXJfiLsLeP8p+CdEmn4zUmzXHBvYPHVc+DVO0ev7+g72 X/wAStvQ4MP2vV/Y3rbEKWTFVLEYo5UZSFqhrOJgvE05Pc35emRbAywcKZB8aRheopzm OiN1CLXqVvQWt+m/M9ZXrESN+CBX7gz5u3psKgEoKVFTsKg1tXExQRLrNwXIF79ZFDBx d9eXF4H8PrP8j073Zs9wPYhyMMmfVeTzrCcnv6YYcqo95AwwI88dmd9SYDA8MVW5fTWy iiMVx/6t5wOJgfhJqVpOfBb/ivPMCavI9KeSMkAN45M/9QjCVk/KinUDxbDASbwbaOFw w9Ig== X-Gm-Message-State: ALoCoQlIFAfrYH+Hz2/reW3PS3y8udd7Ewc3cjzJE2D9AEFeFFjtCX12xDY6jzmPbVnU0CoOchd1 X-Received: by 10.194.236.196 with SMTP id uw4mr3752848wjc.5.1427397908698; Thu, 26 Mar 2015 12:25:08 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.179.131 with SMTP id dg3ls281530lac.74.gmail; Thu, 26 Mar 2015 12:25:08 -0700 (PDT) X-Received: by 10.152.203.134 with SMTP id kq6mr14751581lac.110.1427397908538; Thu, 26 Mar 2015 12:25:08 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id s10si5344809lae.17.2015.03.26.12.25.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2015 12:25:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by lahp7 with SMTP id p7so34916972lah.2 for ; Thu, 26 Mar 2015 12:25:08 -0700 (PDT) X-Received: by 10.112.162.232 with SMTP id yd8mr14464794lbb.41.1427397908449; Thu, 26 Mar 2015 12:25:08 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.57.201 with SMTP id k9csp813931lbq; Thu, 26 Mar 2015 12:25:07 -0700 (PDT) X-Received: by 10.140.148.20 with SMTP id 20mr19905040qhu.67.1427397906931; Thu, 26 Mar 2015 12:25:06 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id i90si5869312qge.83.2015.03.26.12.25.05 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 26 Mar 2015 12:25:06 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YbDOq-0000IY-44; Thu, 26 Mar 2015 19:25:04 +0000 Received: from mail-wg0-f48.google.com ([74.125.82.48]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YbDO0-00009j-2p for lng-odp@lists.linaro.org; Thu, 26 Mar 2015 19:24:12 +0000 Received: by wgbcc7 with SMTP id cc7so74823590wgb.0 for ; Thu, 26 Mar 2015 12:24:06 -0700 (PDT) X-Received: by 10.180.35.97 with SMTP id g1mr49544927wij.17.1427397846716; Thu, 26 Mar 2015 12:24:06 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id kr5sm9708209wjc.1.2015.03.26.12.24.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Mar 2015 12:24:06 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Thu, 26 Mar 2015 19:23:53 +0000 Message-Id: <1427397836-27442-3-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427397836-27442-1-git-send-email-zoltan.kiss@linaro.org> References: <1427397836-27442-1-git-send-email-zoltan.kiss@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v2 2/5] netdev-odp: rename buffer_pool to pool X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zoltan.kiss@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Zoltan Kiss --- lib/netdev-odp.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/netdev-odp.c b/lib/netdev-odp.c index 765edee..bdea022 100644 --- a/lib/netdev-odp.c +++ b/lib/netdev-odp.c @@ -56,8 +56,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; @@ -65,7 +65,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; @@ -126,7 +126,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; @@ -137,13 +137,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, ¶ms); + pool = odp_pool_create("packet_pool", ODP_SHM_NULL, ¶ms); - 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); @@ -170,20 +170,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, ¶ms); + struct_pool = odp_pool_create("struct_pool", ODP_SHM_NULL, ¶ms); - 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; } @@ -212,7 +212,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:" */ @@ -231,7 +231,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;