From patchwork Tue May 31 07:02:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 68891 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1774537qge; Tue, 31 May 2016 00:02:45 -0700 (PDT) X-Received: by 10.140.93.67 with SMTP id c61mr28432598qge.101.1464678165306; Tue, 31 May 2016 00:02:45 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id s65si30151129qha.13.2016.05.31.00.02.44; Tue, 31 May 2016 00:02:45 -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 B140861659; Tue, 31 May 2016 07:02:44 +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 3F9366164D; Tue, 31 May 2016 07:02:40 +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 3878561650; Tue, 31 May 2016 07:02:38 +0000 (UTC) Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com [209.85.215.53]) by lists.linaro.org (Postfix) with ESMTPS id 56C2D61642 for ; Tue, 31 May 2016 07:02:37 +0000 (UTC) Received: by mail-lf0-f53.google.com with SMTP id b73so61180226lfb.3 for ; Tue, 31 May 2016 00:02:37 -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=xeQ+ehrg/3QuKzflg+Avmsdy7a5AOfjU2NuOQXwLiz0=; b=Kx1fzsoSwLPuxjh9N3cGOuS3furlpNNpAXWMWQ9SDB2A05uZd/obFGiYg+9CxXVNMJ sRVYUrvql5YH6UYRncYWoM0O7P8fi0T4+EIHqcP9qUSn63GoZ2CWo/7Es7B0QLcVhuO6 pjz8SYWe2PChK+0UGGLnsasU27WAxqL+A/Y5BwGVk9rHR8zhglm9qGRdfXvOvuBhS6Jv P7f12HIqTWnqNzldaK0Om6nMZBsEOup6FAGduOX1S77tIN+NhcsIWKmrd5Xb/j9emVak 6x3XnJgq5Doag2oBSLZlR7ZJDP5EkQTIBE95eawHjSk8bUuWGsRwej+z4cpYIxOyy4SN xVmg== X-Gm-Message-State: ALyK8tIkqNw3mGd+dv4NK4KSy5xP2lVdAyb1zPM3pvexx4vEW3OWT5c5oTJSM7KF4r2oFwe/AkA= X-Received: by 10.25.8.7 with SMTP id 7mr10921386lfi.201.1464678156230; Tue, 31 May 2016 00:02:36 -0700 (PDT) Received: from maxim-Aspire-VN7-791.d-systems.local ([185.75.190.112]) by smtp.gmail.com with ESMTPSA id ml8sm655910lbc.24.2016.05.31.00.02.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 May 2016 00:02:35 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 31 May 2016 10:02:29 +0300 Message-Id: <1464678149-4551-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: patch Cc: Petri Savolainen Subject: [lng-odp] [PATCHv3] linux-generic: sched: do not allocate sheduler info in shm area 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" Patch: 637a482 linux-generic: schedule: clean interface towards pktio Broke ipc pktio work. Restore original logic back. Idea here the following that 2 processes roll in the same name space instance and should not overlap each other shared memory files. There is no reason in putting sheduler internal structures to shared memory. Signed-off-by: Maxim Uvarov Cc: Petri Savolainen --- v3: 2 parametes without ifdefs (Petri) v2: add ifdefs. platform/linux-generic/odp_schedule.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index 56f40a3..3ac32ef 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -22,6 +22,9 @@ #include #include #include +#ifdef _ODP_PKTIO_IPC +#include +#endif /* Number of priority levels */ #define NUM_PRIO 8 @@ -153,7 +156,11 @@ int odp_schedule_init_global(void) params.buf.num = num_cmd; params.type = ODP_POOL_BUFFER; +#ifdef _ODP_PKTIO_IPC + pool = _pool_create("odp_sched_pool", ¶ms, 0); +#else pool = odp_pool_create("odp_sched_pool", ¶ms); +#endif if (pool == ODP_POOL_INVALID) { ODP_ERR("Schedule init: Pool create failed.\n"); return -1;