From patchwork Thu Mar 19 19:14:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 46083 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0294721580 for ; Thu, 19 Mar 2015 19:15:16 +0000 (UTC) Received: by wivz2 with SMTP id z2sf14495766wiv.1 for ; Thu, 19 Mar 2015 12:15:15 -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=sNqlKQRsoiELDFY4gnHy5Uzn+ArX7jlbPiATenT6Bf8=; b=D8JWB+i3risem9gHsVsAWs1NfrLlP+39GkRhWCC6+LFyxfgQuq6scWlvkhJDJAR9Fi tEiGp0LI7ujZw2tdRlP/S2nEnNjYABwp2HAROPN0Axnov6IOd9xh0WCbB25e4TxEJVf5 nJgdsfM4ouBszUgH7hv32PVnxTyXICoaEOnbA7QU8xDkrLGiytveIlp0PfK/RQe/8CdV //gSgIRwsG1paK6zaX4BeeMa88z8SzIKda8ipaZso/QG2iJ3c+lKFKoCHN21K4hH3R5j 9gXa/EE4v92jCqo1H0V9La3etmnZVq3al+fWPX4xbsCu69NJhMKee3PAqcYtpTha+9Tw sqeA== X-Gm-Message-State: ALoCoQn66nFPLuYrj4T2QO6/t4vuT2nut/bTaDDDyTOw2bOGTleAqxjw8/jHAw3EVZEV4VGW9LXN X-Received: by 10.180.90.169 with SMTP id bx9mr2055544wib.6.1426792515249; Thu, 19 Mar 2015 12:15:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.228.169 with SMTP id sj9ls353975lac.35.gmail; Thu, 19 Mar 2015 12:15:14 -0700 (PDT) X-Received: by 10.112.185.66 with SMTP id fa2mr68797456lbc.117.1426792514932; Thu, 19 Mar 2015 12:15:14 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id x16si1651189lbg.47.2015.03.19.12.15.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 12:15:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by lamx15 with SMTP id x15so70410738lam.3 for ; Thu, 19 Mar 2015 12:15:14 -0700 (PDT) X-Received: by 10.152.121.33 with SMTP id lh1mr70225216lab.86.1426792514785; Thu, 19 Mar 2015 12:15:14 -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.35.133 with SMTP id h5csp589431lbj; Thu, 19 Mar 2015 12:15:14 -0700 (PDT) X-Received: by 10.55.31.83 with SMTP id f80mr111032968qkf.57.1426792513481; Thu, 19 Mar 2015 12:15:13 -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 r23si2203321qkr.8.2015.03.19.12.15.12 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Mar 2015 12:15:13 -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 1YYfuL-0001LR-NR; Thu, 19 Mar 2015 19:15:05 +0000 Received: from mail-wi0-f178.google.com ([209.85.212.178]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YYftz-0001E7-Fl for lng-odp@lists.linaro.org; Thu, 19 Mar 2015 19:14:43 +0000 Received: by wibg7 with SMTP id g7so14852030wib.1 for ; Thu, 19 Mar 2015 12:14:38 -0700 (PDT) X-Received: by 10.181.11.202 with SMTP id ek10mr13293719wid.37.1426792478023; Thu, 19 Mar 2015 12:14:38 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id xy2sm3176956wjc.14.2015.03.19.12.14.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Mar 2015 12:14:37 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Thu, 19 Mar 2015 19:14:25 +0000 Message-Id: <1426792468-12598-3-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426792468-12598-1-git-send-email-zoltan.kiss@linaro.org> References: <1426792468-12598-1-git-send-email-zoltan.kiss@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 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.41 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 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, ¶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); @@ -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, ¶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; } @@ -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;