From patchwork Mon Feb 23 20:36:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robbie King X-Patchwork-Id: 44923 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 CF48A21562 for ; Mon, 23 Feb 2015 20:38:08 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf11636596wib.2 for ; Mon, 23 Feb 2015 12:38:08 -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=rEZlOnj9nmNrH06OAkUgixJLOZ8u5Wd3Qm415ZvHH40=; b=Wzb+u4ZYpG6iwtZIZ4gGh0/yHl4RzUBxD1yf39rhkI6+h+lMA/myvbD5WtqyLIKn6p 3d9daBVmfpW1Eib64EzPcEG+Zn/tE0HfDABHsX7JGJ4ormdslfeUm1VWWxYznWUEeDbY kHNmFpM8sd5GHMpwWaJf4JpXMCFneWZ5s3PHQQN3g6vRcBbgY0++VA75EuewdtOEnKD6 NzPU8E/Y4+bP2q1bJl1EZTj3XD8eqgj4Y4jDoE54aEBETmgwNMsc5zG2j16OIlqGTGIf pVmG7ewriR8ryGRCi9DTsfmlRpaDpxKOlZhmXtraNi1YAwBhulu/NuZGesJhrg9WYK75 c4Og== X-Gm-Message-State: ALoCoQnkcaBOlBEX77turDsPNlAG0GjsYL4RKjnucdoSC0osO+s3SRozRJWktjYnZjbXIBKT9G9l X-Received: by 10.112.145.133 with SMTP id su5mr799139lbb.17.1424723888095; Mon, 23 Feb 2015 12:38:08 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.179.139 with SMTP id dg11ls530276lac.62.gmail; Mon, 23 Feb 2015 12:38:07 -0800 (PST) X-Received: by 10.112.110.231 with SMTP id id7mr11527881lbb.28.1424723887911; Mon, 23 Feb 2015 12:38:07 -0800 (PST) Received: from mail-lb0-x22d.google.com (mail-lb0-x22d.google.com. [2a00:1450:4010:c04::22d]) by mx.google.com with ESMTPS id p1si10387445lal.91.2015.02.23.12.38.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Feb 2015 12:38:07 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22d as permitted sender) client-ip=2a00:1450:4010:c04::22d; Received: by lbjf15 with SMTP id f15so20916478lbj.13 for ; Mon, 23 Feb 2015 12:38:07 -0800 (PST) X-Received: by 10.152.197.34 with SMTP id ir2mr8891849lac.36.1424723887827; Mon, 23 Feb 2015 12:38:07 -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 h5csp1500674lbj; Mon, 23 Feb 2015 12:38:07 -0800 (PST) X-Received: by 10.140.238.208 with SMTP id j199mr24790874qhc.56.1424723886605; Mon, 23 Feb 2015 12:38:06 -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 q76si37122533qgq.44.2015.02.23.12.38.05 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 23 Feb 2015 12:38:06 -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 1YPzlS-0002sI-K2; Mon, 23 Feb 2015 20:38:02 +0000 Received: from rcdn-iport-2.cisco.com ([173.37.86.73]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YPzkW-0002d8-Hf for lng-odp@lists.linaro.org; Mon, 23 Feb 2015 20:37:04 +0000 X-IronPort-AV: E=Sophos;i="5.09,633,1418083200"; d="scan'208";a="398805107" Received: from alln-core-3.cisco.com ([173.36.13.136]) by rcdn-iport-2.cisco.com with ESMTP; 23 Feb 2015 20:36:59 +0000 Received: from cpp-rtpbld-55.cisco.com (cpp-rtpbld-55.cisco.com [172.18.5.199]) by alln-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id t1NKawoR028633 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 23 Feb 2015 20:36:59 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 t1NKawpa030667; Mon, 23 Feb 2015 15:36:58 -0500 Received: (from robking@localhost) by cpp-rtpbld-55.cisco.com (8.13.8/8.13.8/Submit) id t1NKav11030666; Mon, 23 Feb 2015 15:36:57 -0500 From: Robbie King To: lng-odp@lists.linaro.org Date: Mon, 23 Feb 2015 15:36:09 -0500 Message-Id: <1424723769-8762-11-git-send-email-robking@cisco.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1424723769-8762-1-git-send-email-robking@cisco.com> References: <1424723769-8762-1-git-send-email-robking@cisco.com> X-Topics: patch Subject: [lng-odp] [PATCHv3 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::22d 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 ad36283..29e4b22 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 */