From patchwork Wed Sep 3 11:41:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Barbu X-Patchwork-Id: 36595 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 99777202E4 for ; Wed, 3 Sep 2014 11:42:14 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id f73sf29696738yha.11 for ; Wed, 03 Sep 2014 04:42:14 -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:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=RgWvcbATkC4L84kVWPPz5XPV1HjAVJCpTxAmFC0HHo8=; b=jWBNldXC6Gvacvr56Vlfx8nqeD4x8r8Vb/KvNwKhDxkFgqXihx3nhakGPVEBtAfVq3 3mcjaOHurJK94NRdYXQh/KGYVtmDNai3B4YXObfRvJRxwi3RbFjjJlSwRYN/nbBwGTT0 ZT2GZtJxC/RkdyO7Td42DVXC+W6PuDZt5PrR3joIX+K/4AOjWIJPND6YQXPP0vBq4EuQ an4RjDliBd5OQSJM4zQaLV1CTj4WW5r5Qk8s0ICxGzOvTAPikU0wK4zreZfXnEGiSLEg 5M2aHAejBDjIiwyhKs/V5JqNLi3W7hOF1fu8dGuEEeDkn1usZ5xaYij1JWY9vW3rx+4D 7xyQ== X-Gm-Message-State: ALoCoQmNgOadSPj9kuEmOAjCq5PMAAvv+2uaMo85PzIzx9paMNz8gj2osuHc2qq+pvyo6wew8omv X-Received: by 10.236.104.199 with SMTP id i47mr20880061yhg.33.1409744534453; Wed, 03 Sep 2014 04:42:14 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.34 with SMTP id c31ls1542239qge.92.gmail; Wed, 03 Sep 2014 04:42:14 -0700 (PDT) X-Received: by 10.52.248.211 with SMTP id yo19mr86282vdc.67.1409744534348; Wed, 03 Sep 2014 04:42:14 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id j6si3495706vcs.30.2014.09.03.04.42.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 04:42:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id hq11so8611089vcb.36 for ; Wed, 03 Sep 2014 04:42:14 -0700 (PDT) X-Received: by 10.220.190.134 with SMTP id di6mr340095vcb.43.1409744534236; Wed, 03 Sep 2014 04:42: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.221.45.67 with SMTP id uj3csp666822vcb; Wed, 3 Sep 2014 04:42:13 -0700 (PDT) X-Received: by 10.229.229.135 with SMTP id ji7mr65186277qcb.15.1409744533619; Wed, 03 Sep 2014 04:42:13 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id 10si6716754qgg.57.2014.09.03.04.42.13 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Sep 2014 04:42: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-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XP8x2-0005lq-Ak; Wed, 03 Sep 2014 11:42:12 +0000 Received: from mail-lb0-f182.google.com ([209.85.217.182]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XP8wp-0005lG-Ri for lng-odp@lists.linaro.org; Wed, 03 Sep 2014 11:42:00 +0000 Received: by mail-lb0-f182.google.com with SMTP id u10so9144745lbd.41 for ; Wed, 03 Sep 2014 04:41:54 -0700 (PDT) X-Received: by 10.112.50.230 with SMTP id f6mr38918457lbo.56.1409744513757; Wed, 03 Sep 2014 04:41:53 -0700 (PDT) Received: from sestofb10.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id jf6sm1056346lac.42.2014.09.03.04.41.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Sep 2014 04:41:52 -0700 (PDT) From: Ciprian Barbu To: lng-odp@lists.linaro.org Date: Wed, 3 Sep 2014 13:41:42 +0200 Message-Id: <1409744502-32304-3-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1409744502-32304-1-git-send-email-ciprian.barbu@linaro.org> References: <1409744502-32304-1-git-send-email-ciprian.barbu@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/2] linux-generic: netmap: renamed helper 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: ciprian.barbu@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.220.177 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: Ciprian Barbu --- example/packet_netmap/odp_pktio_netmap.c | 2 +- platform/linux-generic/include/odp_packet_netmap.h | 2 +- platform/linux-generic/odp_packet_netmap.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/example/packet_netmap/odp_pktio_netmap.c b/example/packet_netmap/odp_pktio_netmap.c index cc2607b..88af2e5 100644 --- a/example/packet_netmap/odp_pktio_netmap.c +++ b/example/packet_netmap/odp_pktio_netmap.c @@ -190,7 +190,7 @@ static void *pktio_queue_thread(void *arg) if (pktio_info->netmap_mode == ODP_NETMAP_MODE_HW) { odp_packet_t pkt_copy; - pkt_copy = odp_packet_alloc(pkt_pool); + pkt_copy = odph_packet_alloc(pkt_pool); if (odp_packet_copy(pkt_copy, pkt) != 0) { ODP_ERR("Packet copy failed!\n"); diff --git a/platform/linux-generic/include/odp_packet_netmap.h b/platform/linux-generic/include/odp_packet_netmap.h index 57d9f2c..1ab50d0 100644 --- a/platform/linux-generic/include/odp_packet_netmap.h +++ b/platform/linux-generic/include/odp_packet_netmap.h @@ -45,7 +45,7 @@ typedef struct { /** * Configure an interface to work in netmap mode */ -int setup_pkt_netmap(pkt_netmap_t * const pkt_nm, char *netdev, +int setup_pkt_netmap(pkt_netmap_t * const pkt_nm, const char *netdev, odp_buffer_pool_t pool, netmap_params_t *nm_params); /** diff --git a/platform/linux-generic/odp_packet_netmap.c b/platform/linux-generic/odp_packet_netmap.c index 5942789..524492d 100644 --- a/platform/linux-generic/odp_packet_netmap.c +++ b/platform/linux-generic/odp_packet_netmap.c @@ -120,8 +120,8 @@ int setup_pkt_netmap(pkt_netmap_t * const pkt_nm, const char *netdev, return -1; pkt_nm->pool = pool; - pkt = odp_packet_alloc(pool); - if (!odp_packet_is_valid(pkt)) + pkt = odph_packet_alloc(pool); + if (!odph_packet_is_valid(pkt)) return -1; pkt_buf = odp_packet_buf_addr(pkt); @@ -129,7 +129,7 @@ int setup_pkt_netmap(pkt_netmap_t * const pkt_nm, const char *netdev, /* Store eth buffer offset for buffers from this pool */ pkt_nm->frame_offset = (uintptr_t)l2_hdr - (uintptr_t)pkt_buf; /* pkt buffer size */ - pkt_nm->buf_size = odp_packet_buf_size(pkt); + pkt_nm->buf_size = odph_packet_buf_size(pkt); /* max frame len taking into account the l2-offset */ pkt_nm->max_frame_len = pkt_nm->buf_size - pkt_nm->frame_offset; /* save netmap_mode for later use */ @@ -300,7 +300,7 @@ int recv_pkt_netmap(pkt_netmap_t * const pkt_nm, odp_packet_t pkt_table[], uint32_t cur; if (odp_likely(pkt == ODP_PACKET_INVALID)) { - pkt = odp_packet_alloc(pkt_nm->pool); + pkt = odph_packet_alloc(pkt_nm->pool); if (odp_unlikely(pkt == ODP_PACKET_INVALID)) break; }