From patchwork Tue Feb 24 16:00:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robbie King X-Patchwork-Id: 44951 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6955B2029F for ; Tue, 24 Feb 2015 16:02:17 +0000 (UTC) Received: by lamq1 with SMTP id q1sf17792208lam.0 for ; Tue, 24 Feb 2015 08:02:16 -0800 (PST) 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=djbd8mtRy/fJ3UfrSkBemJWUO2gj2KJcPeMoK9qwN44=; b=g1TWV21RC0l/00vDqX5sdxHa1isO7pK6R3Hc4og7WstRSZThg655SGkiqHRzKCSZrv 29N3bGPuXjmnTLhVyaOcZvLe+lANrk9gtHvK4zncWm5sSZ0mkmoR6/pjxm0g0ws2w71c z6D+HSq4Bp6cI7xObX23IlRcNGP1fY+qiUrA26EB/0jDmrF461hj85lFe8AYKFCYm6np suYYTYdimGY/yM79s20iaVH9d0lFtvrFT7mAMyWbyecqiqg9o0FX1Dq6LJVeL3nmyrxo UDDfm9QsScCLITVpLNwaH7x3o028HTYidpCTCxUgNTTo75JTDlMhsET5McbfuqWTiEpp N2Tg== X-Gm-Message-State: ALoCoQlvxFo94o+SCqPacsO+b+ZEgz1pxm5AX2TcefOH86Z3ydZ7BwvZ8DILaYWs5VIpWmQPTX3s X-Received: by 10.112.168.104 with SMTP id zv8mr2224597lbb.10.1424793736378; Tue, 24 Feb 2015 08:02:16 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.172 with SMTP id dd12ls607748lad.20.gmail; Tue, 24 Feb 2015 08:02:16 -0800 (PST) X-Received: by 10.112.73.104 with SMTP id k8mr220883lbv.120.1424793736198; Tue, 24 Feb 2015 08:02:16 -0800 (PST) Received: from mail-lb0-x232.google.com (mail-lb0-x232.google.com. [2a00:1450:4010:c04::232]) by mx.google.com with ESMTPS id kv8si24231391lac.88.2015.02.24.08.02.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 08:02:16 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::232 as permitted sender) client-ip=2a00:1450:4010:c04::232; Received: by lbiz12 with SMTP id z12so25642341lbi.11 for ; Tue, 24 Feb 2015 08:02:16 -0800 (PST) X-Received: by 10.112.181.41 with SMTP id dt9mr4597700lbc.56.1424793736061; Tue, 24 Feb 2015 08:02:16 -0800 (PST) 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 h5csp2000989lbj; Tue, 24 Feb 2015 08:02:15 -0800 (PST) X-Received: by 10.236.105.210 with SMTP id k58mr14791553yhg.52.1424793734480; Tue, 24 Feb 2015 08:02:14 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id k4si32426807qai.132.2015.02.24.08.02.12 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 24 Feb 2015 08:02:14 -0800 (PST) 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 1YQHw3-0006jy-Cj; Tue, 24 Feb 2015 16:02:11 +0000 Received: from rcdn-iport-5.cisco.com ([173.37.86.76]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YQHvY-0006b3-VI for lng-odp@lists.linaro.org; Tue, 24 Feb 2015 16:01:41 +0000 X-IronPort-AV: E=Sophos;i="5.09,639,1418083200"; d="scan'208";a="398695743" Received: from alln-core-11.cisco.com ([173.36.13.133]) by rcdn-iport-5.cisco.com with ESMTP; 24 Feb 2015 16:01:35 +0000 Received: from cpp-rtpbld-55.cisco.com (cpp-rtpbld-55.cisco.com [172.18.5.199]) by alln-core-11.cisco.com (8.14.5/8.14.5) with ESMTP id t1OG1YHd022357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 24 Feb 2015 16:01:35 GMT Received: from cpp-rtpbld-55.cisco.com (localhost.localdomain [127.0.0.1]) by cpp-rtpbld-55.cisco.com (8.13.8/8.13.8) with ESMTP id t1OG1Xx2028897; Tue, 24 Feb 2015 11:01:33 -0500 Received: (from robking@localhost) by cpp-rtpbld-55.cisco.com (8.13.8/8.13.8/Submit) id t1OG1XLn028896; Tue, 24 Feb 2015 11:01:33 -0500 From: Robbie King To: lng-odp@lists.linaro.org Date: Tue, 24 Feb 2015 11:00:47 -0500 Message-Id: <1424793647-28572-11-git-send-email-robking@cisco.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1424793647-28572-1-git-send-email-robking@cisco.com> References: <1424793647-28572-1-git-send-email-robking@cisco.com> X-Topics: patch Subject: [lng-odp] [PATCHv4 10/10] linux-generic: buffer pool: add term_local 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-Original-Sender: robking@cisco.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::232 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=fail header.i=@cisco.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Yan Sonming Signed-off-by: Yan Sonming Signed-off-by: Mike Holmes Signed-off-by: Robbie King --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_init.c | 5 +++++ platform/linux-generic/odp_pool.c | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index 94103e5..0961cce 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -42,6 +42,7 @@ int odp_shm_init_local(void); int odp_pool_init_global(void); int odp_pool_term_global(void); +int odp_pool_term_local(void); int odp_pktio_init_global(void); int odp_pktio_term_global(void); diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c index 4c0186a..bf36e68 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -156,6 +156,11 @@ int odp_term_local(void) rc = -1; } + if (odp_pool_term_local()) { + ODP_ERR("ODP buffer pool local term failed.\n"); + rc = -1; + } + rc_thd = odp_thread_term_local(); if (rc_thd < 0) { ODP_ERR("ODP thread local term failed.\n"); diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 441429a..ef7d7ec 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -123,6 +123,12 @@ int odp_pool_term_global(void) return rc; } +int odp_pool_term_local(void) +{ + _odp_flush_caches(); + return 0; +} + /** * Pool creation */