From patchwork Mon Jul 18 20:42:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 72258 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp312332qga; Mon, 18 Jul 2016 13:43:17 -0700 (PDT) X-Received: by 10.55.119.66 with SMTP id s63mr47349930qkc.63.1468874597760; Mon, 18 Jul 2016 13:43:17 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i129si11327507qkc.23.2016.07.18.13.43.13; Mon, 18 Jul 2016 13:43:17 -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 386E4622D4; Mon, 18 Jul 2016 20:43:13 +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 E0DE561D3B; Mon, 18 Jul 2016 20:43:09 +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 D367F61D3B; Mon, 18 Jul 2016 20:43:07 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by lists.linaro.org (Postfix) with ESMTPS id 99B12617C7 for ; Mon, 18 Jul 2016 20:43:06 +0000 (UTC) Received: by mail-lf0-f45.google.com with SMTP id b199so140219257lfe.0 for ; Mon, 18 Jul 2016 13:43:06 -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; bh=InqLnsvogUBansDQQUzlxgGgfsGkB8x0ypv8iEOC4Hw=; b=TnXQnkp6CrEIJJDYWJgH4S77k9DJC3JY7W+7T5ljQMN755RAS3zilPLRlG66ZJs1X8 uRRc2Rtd3fddLEfb/YImvmYxIY8ZLzdPOKsV8mwW5+tgM4dV0Y6bqQRJCIz0yTT8+MzR SAZfj4hW9cDMtPL0DTadkAImP3ve7NVK0S1son6Zm4ps1aCzUwGO8q3e2Cuxq3qXtW+y hSftZCJLQl2GctNBZkyKYDrMn9bkedFfL3WXL6W2ouRToGJhy23U6F8awbwRRZcHjcNh dDCotf4H9DaB+1Qg3X3AiHkm3VAXbKiE95mwbFLElCUwlo1ZJHyW5pWbULRvI9Hq+skK KnGw== X-Gm-Message-State: ALyK8tIOgM7rBlAlks+YVSUwSr1LzIpRlW8FIirxNptsg4afQXttFNyEvQhVxSkjIaueDDwOu9I= X-Received: by 10.25.19.32 with SMTP id j32mr13807326lfi.204.1468874585316; Mon, 18 Jul 2016 13:43:05 -0700 (PDT) Received: from localhost.localdomain ([83.220.239.97]) by smtp.gmail.com with ESMTPSA id 35sm2203826ljb.10.2016.07.18.13.43.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jul 2016 13:43:04 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Mon, 18 Jul 2016 23:42:58 +0300 Message-Id: <1468874578-4123-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: patch Subject: [lng-odp] [PATCHv2] linux-gen: scope ipc shared memory for packet pools only 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Instead of placing all allocation to shared memory, place only packets pool. Signed-off-by: Maxim Uvarov --- platform/linux-generic/odp_pool.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.7.1.250.gff4ea60 diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index ec6d86a..419f03f 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -462,10 +462,11 @@ odp_pool_t odp_pool_create(const char *name, odp_pool_param_t *params) { #ifdef _ODP_PKTIO_IPC - return _pool_create(name, params, ODP_SHM_PROC); -#else + if (params && (params->type == ODP_POOL_PACKET)) + return _pool_create(name, params, ODP_SHM_PROC); +#endif return _pool_create(name, params, 0); -#endif + } odp_pool_t odp_pool_lookup(const char *name)