From patchwork Tue Mar 29 13:59:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 64600 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2029813lbc; Tue, 29 Mar 2016 07:00:38 -0700 (PDT) X-Received: by 10.140.246.136 with SMTP id r130mr3106610qhc.12.1459260030263; Tue, 29 Mar 2016 07:00:30 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id w74si25737275qgw.78.2016.03.29.07.00.29; Tue, 29 Mar 2016 07:00:30 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id BAF5561813; Tue, 29 Mar 2016 14:00:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 1A850617E0; Tue, 29 Mar 2016 13:59:57 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 107666170D; Tue, 29 Mar 2016 13:59:55 +0000 (UTC) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) by lists.linaro.org (Postfix) with ESMTPS id C739261624 for ; Tue, 29 Mar 2016 13:59:52 +0000 (UTC) Received: by mail-lb0-f180.google.com with SMTP id vo2so10991122lbb.1 for ; Tue, 29 Mar 2016 06:59:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3Qd+luTLIc5amZNI/yWX/cA/POLIpYI8rxPVeE1CEjw=; b=hdOlLMzfyT+DYa+50MBTrdDksWP5RwCzXid+7bRUxwk1iI3eD7FOlOZzAnu7QWk9jt lgnNKki8KcXUVqRKPma+2vooC/g3zsh/8wllzN0Z5sRcKmlDAyOvwgfqOnZIFcueTdN3 TOtPwqC57ksG+bbDuyUdhmg+8acNZcQFRvfRPvkiblBXBH3DfP1/4ATT5waXE3Ps7oL1 AO+JCOvXmwFgCTSx3CzxmuAEgKBLRwB0s3NjcnTqK4dxF46C8BFEOOeBIrnS48ltOL4/ hkEDyyyf5q8gbapgdHo32ogf3kPGV+a0eM6o8Ki4knwkerfeU5me+pNuLdU/zeW/oT// M4uw== X-Gm-Message-State: AD7BkJJlr9pc6hRLDKVah1qsTOx1mIqmMevkNYW2grFrrVenePeIb1EMzFoD6hzOmQbtTVmYQlQ= X-Received: by 10.112.63.196 with SMTP id i4mr1206600lbs.93.1459259991686; Tue, 29 Mar 2016 06:59:51 -0700 (PDT) Received: from localhost.localdomain (ppp91-77-172-79.pppoe.mtu-net.ru. [91.77.172.79]) by smtp.gmail.com with ESMTPSA id p141sm5478562lfe.40.2016.03.29.06.59.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Mar 2016 06:59:51 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 29 Mar 2016 16:59:36 +0300 Message-Id: <1459259977-10978-2-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 In-Reply-To: <1459259977-10978-1-git-send-email-maxim.uvarov@linaro.org> References: <1459259977-10978-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 1/2] linux-generic: pool: add more debug print for pool_destroy X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" 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" Print cause and pool name on destroy to make debug more easily. Signed-off-by: Maxim Uvarov Reviewed-by: Bill Fischofer --- platform/linux-generic/odp_pool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 588362b..eb545b2 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -459,6 +459,7 @@ int odp_pool_destroy(odp_pool_t pool_hdl) if (pool->s.pool_shm == ODP_SHM_INVALID || pool->s.flags.predefined) { POOL_UNLOCK(&pool->s.lock); + ODP_ERR("invalid shm for pool %s\n", pool->s.name); return -1; } @@ -469,6 +470,7 @@ int odp_pool_destroy(odp_pool_t pool_hdl) /* Call fails if pool has allocated buffers */ if (odp_atomic_load_u32(&pool->s.bufcount) < pool->s.buf_num) { POOL_UNLOCK(&pool->s.lock); + ODP_ERR("pool %s not empty\n", pool->s.name); return -1; }