From patchwork Thu Mar 19 19:14:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 46084 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 931A52153C for ; Thu, 19 Mar 2015 19:15:21 +0000 (UTC) Received: by lbvn10 with SMTP id n10sf14193713lbv.1 for ; Thu, 19 Mar 2015 12:15:20 -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=pj5bVSUxIaD/HQNN6EhnIHrs9SrzbwI5gvHKZMdu6RQ=; b=gQctpFSL8N8K+Ixy+u4sgqDM1qbFZz1t75hDyXTzu+qLfxDljHtH2tWcHWlMS6Pora uBkFN1oV21locjAJ3G/BiB+HtzR4IhkHoTCrN3lIcTVtHFKXqWA6nL/ctJr/4R6zbbNZ ef8blt5Vh+l0A5aUGKzc/bnw+uQtZjpta4oOIc9JuigWItdAlpD8gthuyVTnftplLE6Y L7f1KZj7KsHINg8ZTedcjCjCZD5SheugMLncO0nqUmbYbez+OL3OkplaTQ7l0DqOOemB lXI39T8+5eszWv2wI3W7hN9Si9GT3+kY49sSr4rfY9jzjWh3lCDEh8dcAZs5OA2hJ2qh u1dg== X-Gm-Message-State: ALoCoQnhTlSM77hupSSmKnPMQKyemotKg8p/aAaB3McY75UO6IsOoFOseEgWJk4T8AB0Ms4jmGoL X-Received: by 10.180.182.201 with SMTP id eg9mr2052616wic.3.1426792520390; Thu, 19 Mar 2015 12:15:20 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.201 with SMTP id n9ls347964lag.41.gmail; Thu, 19 Mar 2015 12:15:20 -0700 (PDT) X-Received: by 10.152.184.100 with SMTP id et4mr70263616lac.8.1426792520221; Thu, 19 Mar 2015 12:15:20 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id b8si1669466lbs.16.2015.03.19.12.15.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 12:15:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbcgn8 with SMTP id gn8so60049598lbc.2 for ; Thu, 19 Mar 2015 12:15:20 -0700 (PDT) X-Received: by 10.152.26.201 with SMTP id n9mr69243914lag.29.1426792520070; Thu, 19 Mar 2015 12:15:20 -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 h5csp589481lbj; Thu, 19 Mar 2015 12:15:19 -0700 (PDT) X-Received: by 10.140.202.144 with SMTP id x138mr100167941qha.14.1426792518417; Thu, 19 Mar 2015 12:15:18 -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 j9si2202815qci.12.2015.03.19.12.15.15 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Mar 2015 12:15:18 -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 1YYfuU-0001Mt-DX; Thu, 19 Mar 2015 19:15:14 +0000 Received: from mail-we0-f179.google.com ([74.125.82.179]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YYfu1-0001Ec-TA for lng-odp@lists.linaro.org; Thu, 19 Mar 2015 19:14:46 +0000 Received: by webcq43 with SMTP id cq43so65346247web.2 for ; Thu, 19 Mar 2015 12:14:40 -0700 (PDT) X-Received: by 10.180.75.167 with SMTP id d7mr18708598wiw.63.1426792480412; Thu, 19 Mar 2015 12:14:40 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id xy2sm3176956wjc.14.2015.03.19.12.14.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Mar 2015 12:14:39 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Thu, 19 Mar 2015 19:14:27 +0000 Message-Id: <1426792468-12598-5-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 4/5] netdev-odp: rename odp_packet_* functions 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.217.180 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/netdev-odp.c b/lib/netdev-odp.c index 2a04d24..72c2368 100644 --- a/lib/netdev-odp.c +++ b/lib/netdev-odp.c @@ -156,7 +156,7 @@ odp_class_init(void) VLOG_ERR("Error: packet allocation failed.\n"); return -1; } - start = (char *)odp_buffer_addr(odp_packet_to_buffer(pkts[i])); + start = (char *)odp_packet_data(pkts[i]); /* TODO: This 256 magic value is needed for ODP-DPDK, when the buffer is * allocated by rte_eth_rx_burst the start is at a different place. * Probably due to headroom, this is a workaround here at the moment */ @@ -289,7 +289,7 @@ static int drop_err_pkts(odp_packet_t pkt_tbl[], unsigned len) for (i = 0, j = 0; i < len; ++i) { pkt = pkt_tbl[i]; - if (odp_unlikely(odp_packet_error(pkt))) { + if (odp_unlikely(odp_packet_has_error(pkt))) { odp_packet_free(pkt); /* Drop */ pkt_cnt--; } else if (odp_unlikely(i != j++)) { @@ -622,7 +622,7 @@ netdev_odp_rxq_recv(struct netdev_rxq *rxq_, struct dpif_packet **packets, /* Build the array of dpif_packet pointers */ for (i = 0; i < pkts_ok; i++) { char *start; - start = (char*)odp_buffer_addr(odp_packet_to_buffer(pkt_tbl[i])); + start = (char*)odp_packet_data(pkt_tbl[i]); packets[i] = (struct dpif_packet*) (start + SHM_PKT_POOL_BUF_SIZE); ofpbuf_init_odp(&packets[i]->ofpbuf, 0); rx_bytes += odp_packet_len(pkt_tbl[i]);