From patchwork Tue Nov 8 09:49:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 81257 Delivered-To: patch@linaro.org Received: by 10.182.113.165 with SMTP id iz5csp1573904obb; Tue, 8 Nov 2016 00:50:42 -0800 (PST) X-Received: by 10.200.48.206 with SMTP id w14mr11551487qta.150.1478595042069; Tue, 08 Nov 2016 00:50:42 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id p11si19076725qkh.230.2016.11.08.00.50.41; Tue, 08 Nov 2016 00:50:42 -0800 (PST) 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 BC7B460D48; Tue, 8 Nov 2016 08:50:41 +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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 6E1D260D3E; Tue, 8 Nov 2016 08:50:19 +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 B75AF60D33; Tue, 8 Nov 2016 08:50:13 +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 8DA9060CF5 for ; Tue, 8 Nov 2016 08:50:12 +0000 (UTC) Received: by mail-lf0-f45.google.com with SMTP id t196so134015515lff.3 for ; Tue, 08 Nov 2016 00:50:12 -0800 (PST) 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=6RBbJs/1L923/JyQdhXPM9c24Lisnbnw34ZCcfUF7N8=; b=kz1Dj3/McCAqE4T2J7ntol3e3wglFSLCbnT0ScMJ4QQOtAKcPsGiQ63yY6SzOlr4oK exznIMop1gpAaLvhNBgRsAgN0dkuhyss9pQpGztKaprzUb17INXDSOBGLptnFE2vukLS VMyYEe3iVgoi9IjH9/wDAkHpyfV+A7kjz6vBpYaZ2d2fF6ccG0v1ee3xu0C7hqfbIiet Lhi3x7z28Oz07XymicnOqBKeYMWQV04Bd5xlKdaSkOKGaaokBpIZQxp+eNBv59B9ccjw X67lC+HbipT2nUt1TL18XDL+gjefFgoAL+Le16ddt3aQw9YxbHmm3YbcXucBBPmTSfib oENg== X-Gm-Message-State: ABUngvefkFaHfDGPiC/O+vdV/thnzKgQGgkERjVBijfZR2+G8+fb74HuFBCcLcDZuOYJ2ULnGzg= X-Received: by 10.25.160.145 with SMTP id j139mr4084256lfe.67.1478595011308; Tue, 08 Nov 2016 00:50:11 -0800 (PST) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id i129sm4677636lfd.8.2016.11.08.00.50.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Nov 2016 00:50:10 -0800 (PST) From: Christophe Milard To: petri.savolainen@nokia.com, mike.holmes@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Tue, 8 Nov 2016 10:49:28 +0100 Message-Id: <1478598570-2846-2-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1478598570-2846-1-git-send-email-christophe.milard@linaro.org> References: <1478598570-2846-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 1/3] linux-gen: _ishm: accept multiple usage of same block name 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" This is following the request that using the same name for multiple memory blocks should be allowed on north API. The change made here will affect any _ishm users (i.e. both north and south API), which is probably better for consistency. Signed-off-by: Christophe Milard --- platform/linux-generic/_ishm.c | 8 -------- 1 file changed, 8 deletions(-) -- 2.7.4 diff --git a/platform/linux-generic/_ishm.c b/platform/linux-generic/_ishm.c index 782c32f..2e7dd5e 100644 --- a/platform/linux-generic/_ishm.c +++ b/platform/linux-generic/_ishm.c @@ -777,14 +777,6 @@ int _odp_ishm_reserve(const char *name, uint64_t size, int fd, page_sz = odp_sys_page_size(); page_hp_size = odp_sys_huge_page_size(); - /* check if name already exists */ - if (name && (find_block_by_name(name) >= 0)) { - /* Found a block with the same name */ - odp_spinlock_unlock(&ishm_tbl->lock); - ODP_ERR("name \"%s\" already used.\n", name); - return -1; - } - /* grab a new entry: */ for (new_index = 0; new_index < ISHM_MAX_NB_BLOCKS; new_index++) { if (ishm_tbl->block[new_index].len == 0) {