From patchwork Mon May 30 20:26:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 68855 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1584202qge; Mon, 30 May 2016 13:26:52 -0700 (PDT) X-Received: by 10.237.46.1 with SMTP id j1mr29281875qtd.62.1464640011962; Mon, 30 May 2016 13:26:51 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id s22si28868836qke.156.2016.05.30.13.26.51; Mon, 30 May 2016 13:26:51 -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 442CD61586; Mon, 30 May 2016 20:26:51 +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 5042361564; Mon, 30 May 2016 20:26:47 +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 4ED016156A; Mon, 30 May 2016 20:26:45 +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 7C3FA6155B for ; Mon, 30 May 2016 20:26:40 +0000 (UTC) Received: by mail-lf0-f53.google.com with SMTP id b73so55304362lfb.3 for ; Mon, 30 May 2016 13:26:40 -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=dLpHB4p3czp1XCRdhZWZXQY/UnTEtBJATHuYJgx+zOE=; b=Z4q6YBBqSfdPqovJq/vYut+oX3pp//KB1WVqHJfXFeFmIBTeqyRKXaHyYIP3bXx+K9 Kc33PTJOvr1oyml72H2UfhCHpFu6J7C/2JgmfqZJsaAO8m/OHw9ZBLuWGbKtRmbSTnVF eYFxuhF/gqKT860D6juLG4mh5sDG3udTYVGTSrCtIEc9PCyvNijvQUldmtVzOaeQN/vl 6sc1YH3vf2lfgT6v3Qj/S/qLUyGNlLm5LSCBAz35JWdQB4KlTLzhKuq45P24ZnZCEPUS XcNwvzI/GMHEAkM2mflfKyx7DuS1aiCyASsKlUmMThc7F61jxQRJIQYl+RoeO9CdyHM4 iIlw== X-Gm-Message-State: ALyK8tKEVV6JXfoEQ/G6wq3v74eWXprQtM1rPcrvPrS6MkSyfbtwwlH+/cRxH5gj5WIME9diJ1k= X-Received: by 10.25.16.27 with SMTP id f27mr9427847lfi.114.1464639998750; Mon, 30 May 2016 13:26:38 -0700 (PDT) Received: from localhost.localdomain ([83.220.239.22]) by smtp.gmail.com with ESMTPSA id e88sm2530277lji.31.2016.05.30.13.26.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 May 2016 13:26:37 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Mon, 30 May 2016 23:26:27 +0300 Message-Id: <1464639987-3627-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] [PATCHv2] 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 --- v2: add ifdefs. platform/linux-generic/odp_schedule.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index 56f40a3..7c355eb 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; - pool = odp_pool_create("odp_sched_pool", ¶ms); +#ifdef _ODP_PKTIO_IPC + pool = _pool_create("odp_sched_pool", ¶ms, 0); +#else + pool = odp_pool_create("odp_sched_pool", ¶ms, 0); +#endif if (pool == ODP_POOL_INVALID) { ODP_ERR("Schedule init: Pool create failed.\n"); return -1;