From patchwork Fri Jan 30 02:56:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 44008 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BC8C024128 for ; Fri, 30 Jan 2015 02:56:42 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf26080465lbd.3 for ; Thu, 29 Jan 2015 18:56:41 -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: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=DmXa+IjTTjsSGnMhnxCqmiywa4dX+KJ99H7sJcSutwg=; b=AITzC/FWJf0lttmJOt99fUqM6FABRB6B3tfT5+00SjQjViMRK6SwRoVEnoefuDJmed ASHmvqGMwG7kHwqv2OUkHlu6e+trQOs7FpME25ADuUHvicVixduW9u9G2wGqgO1BWkQx 9BP6st7BIEjxPtRKc2PDEDaZ0mAN6syZyuN2XUWndf0qkBqwUWajMgXWc+t4f+7kZj6k 6JyBAeIqUsr0q2qdro/eQkbMxUN5LEBNIvQpVDA9qZFkERwdLy3L355ShuNo6A5qd4cg ABF1B6u25ajxCmNV1tV3tdaQKdF6dTtvt3LD3zHbsu6ewv/whqDPZmGSIB1yt7gpEU0L sNQw== X-Gm-Message-State: ALoCoQmJy1KB8FvSXZcBVKNpkIUJPOBfvlqdP8a/sKGmIyoA0MCnlgWJXYEY2fXjFjfHHZXcBfWJ X-Received: by 10.112.174.36 with SMTP id bp4mr478394lbc.15.1422586601783; Thu, 29 Jan 2015 18:56:41 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.134 with SMTP id kq6ls357151lac.36.gmail; Thu, 29 Jan 2015 18:56:41 -0800 (PST) X-Received: by 10.112.205.68 with SMTP id le4mr4340353lbc.96.1422586601574; Thu, 29 Jan 2015 18:56:41 -0800 (PST) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id dc2si5515449lac.4.2015.01.29.18.56.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Jan 2015 18:56:41 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id 10so34227400lbg.10 for ; Thu, 29 Jan 2015 18:56:41 -0800 (PST) X-Received: by 10.152.203.230 with SMTP id kt6mr4325632lac.38.1422586601121; Thu, 29 Jan 2015 18:56:41 -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 h5csp142391lbj; Thu, 29 Jan 2015 18:56:40 -0800 (PST) X-Received: by 10.140.31.36 with SMTP id e33mr4215074qge.36.1422586599947; Thu, 29 Jan 2015 18:56:39 -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 l95si12652396qgd.124.2015.01.29.18.56.38 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 29 Jan 2015 18:56:39 -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 1YH1l6-00031L-7F; Fri, 30 Jan 2015 02:56:36 +0000 Received: from mail-qg0-f53.google.com ([209.85.192.53]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YH1l0-0002zl-6O for lng-odp@lists.linaro.org; Fri, 30 Jan 2015 02:56:30 +0000 Received: by mail-qg0-f53.google.com with SMTP id a108so36466891qge.12 for ; Thu, 29 Jan 2015 18:56:25 -0800 (PST) X-Received: by 10.224.60.66 with SMTP id o2mr8162033qah.25.1422586584982; Thu, 29 Jan 2015 18:56:24 -0800 (PST) Received: from mike-desktop.?.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id y74sm8802807qgd.49.2015.01.29.18.56.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jan 2015 18:56:24 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Thu, 29 Jan 2015 21:56:16 -0500 Message-Id: <1422586576-30078-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mike.holmes@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.179 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 From: Yan Sonming Signed-off-by: Yan Sonming Signed-off-by: Mike Holmes --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_buffer_pool.c | 6 ++++++ platform/linux-generic/odp_init.c | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index 8c6b0b0..24723aa 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -37,6 +37,7 @@ int odp_shm_init_local(void); int odp_buffer_pool_init_global(void); int odp_buffer_pool_term_global(void); +int odp_buffer_pool_term_local(void); int odp_pktio_init_global(void); int odp_pktio_term_global(void); diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c index 2634bff..dc0ec1b 100644 --- a/platform/linux-generic/odp_buffer_pool.c +++ b/platform/linux-generic/odp_buffer_pool.c @@ -124,6 +124,12 @@ int odp_buffer_pool_term_global(void) return ret; } +int odp_buffer_pool_term_local(void) +{ + _odp_flush_caches(); + return 0; +} + /** * Pool creation */ diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c index 3724fac..205dcae 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -147,5 +147,10 @@ int odp_term_local(void) return -1; } + if (odp_buffer_pool_term_local()) { + ODP_ERR("ODP buffer pool local term failed.\n"); + return -1; + } + return (odp_thread_term_local() > 0) ? 1 : 0; }