From patchwork Thu May 28 13:05:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 49101 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1D6ED202A3 for ; Thu, 28 May 2015 13:06:18 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf10400221lbb.0 for ; Thu, 28 May 2015 06:06:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:mime-version :in-reply-to:references:date:message-id:from:to:cc:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:content-type:content-transfer-encoding :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=ypAhedHRDvWgYZ78xi1nsx+sYogjzhfuFVOQn1sle1A=; b=DIfSlRRCUcX9eoLR4pHJxC1AvmYeoWoyCdzmKAQ+VgBHDAfJlg8jkmYEpemSf/gSGz TqnMG68pEWrjPI3+VB7hqZDgrl25VIXgx6fUOX4L+QTndGTfAPG8VP8fD25EZYX20g8o 9UAICbZCm2dL4E1tuj0zYEyKLKurL2lkF1xfaSFs3q/yuAe4Z+VzhceJhZdZ85dcFej4 9n4esLWwd9x2AvMIO+q7JQUWURDk0ILQJuYt+tuQPuOnJ7N59o2n6G9UjPhVlHm46drQ GfE8eFNjW2SKLOCLW2djYaUvxXANx8YFh8k6dtiSUH1IYxb7oeMeVKgme5y8J4fahAQC LqKQ== X-Gm-Message-State: ALoCoQlYL5nrfURS54vFI1Qrv6XHeGLjeDSkk0zoYZ51yLEnmh2IW43azGR+9yECmnBIe/s8vKeq X-Received: by 10.194.47.179 with SMTP id e19mr2631581wjn.4.1432818377121; Thu, 28 May 2015 06:06:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.239.130 with SMTP id vs2ls161256lac.97.gmail; Thu, 28 May 2015 06:06:16 -0700 (PDT) X-Received: by 10.152.30.4 with SMTP id o4mr2615999lah.74.1432818376954; Thu, 28 May 2015 06:06:16 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id i4si1920368laf.44.2015.05.28.06.06.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 May 2015 06:06:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbcmx3 with SMTP id mx3so27785563lbc.1 for ; Thu, 28 May 2015 06:06:16 -0700 (PDT) X-Received: by 10.112.93.37 with SMTP id cr5mr2746956lbb.106.1432818376710; Thu, 28 May 2015 06:06:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1143903lbb; Thu, 28 May 2015 06:06:15 -0700 (PDT) X-Received: by 10.55.24.18 with SMTP id j18mr4841787qkh.60.1432818375076; Thu, 28 May 2015 06:06:15 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id a107si155898qge.28.2015.05.28.06.06.14; Thu, 28 May 2015 06:06:15 -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; Received: by lists.linaro.org (Postfix, from userid 109) id E838E61EC4; Thu, 28 May 2015 13:06:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 364E961D5F; Thu, 28 May 2015 13:06:10 +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 54D2E61EB1; Thu, 28 May 2015 13:06:03 +0000 (UTC) Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) by lists.linaro.org (Postfix) with ESMTPS id 4F1FC61E95 for ; Thu, 28 May 2015 13:06:00 +0000 (UTC) Received: by oiww2 with SMTP id w2so31536280oiw.0 for ; Thu, 28 May 2015 06:05:59 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.125.169 with SMTP id mr9mr2381731oeb.14.1432818359887; Thu, 28 May 2015 06:05:59 -0700 (PDT) Received: by 10.182.87.169 with HTTP; Thu, 28 May 2015 06:05:59 -0700 (PDT) In-Reply-To: References: <1430998456-13162-1-git-send-email-petri.savolainen@nokia.com> Date: Thu, 28 May 2015 18:35:59 +0530 Message-ID: From: Bala Manoharan To: Maxim Uvarov X-Topics: patch Cc: LNG ODP Mailman List , "Savolainen, Petri \(Nokia - FI/Espoo\)" Subject: [lng-odp] Fwd: [PATCH 1/3] example: classifier: remove extra local init X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bala.manoharan@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Hi Maxim, This patch from Petri fixes an issue in classifier example and I had sent my Reviewed-by for the same. Can you please merge this patch. Regards, Bala ---------- Forwarded message ---------- From: Savolainen, Petri (Nokia - FI/Espoo) Date: 7 May 2015 at 18:54 Subject: RE: [lng-odp] [PATCH 1/3] example: classifier: remove extra local init To: ext Bala Manoharan Cc: LNG ODP Mailman List I noticed the same and will add that documentation. -Petri From: ext Bala Manoharan [mailto:bala.manoharan@linaro.org] Sent: Thursday, May 07, 2015 3:49 PM To: Savolainen, Petri (Nokia - FI/Espoo) Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [PATCH 1/3] example: classifier: remove extra local init Reviewed-by: Balasubramanian Manoharan IMO, we can add additional information in odph_linux_pthread_create() header file documentation that this function is expected to call odp_init_local() for the thread it creates. Current documentation only says the following /** * Creates and launches pthreads * * Creates, pins and launches threads to separate CPU's based on the cpumask. * * @param thread_tbl Thread table * @param mask CPU mask * @param start_routine Thread start function * @param arg Thread argument */ void odph_linux_pthread_create(odph_linux_pthread_t *thread_tbl, const odp_cpumask_t *mask, void *(*start_routine) (void *), void *arg); Regards, Bala On 7 May 2015 at 17:04, Petri Savolainen wrote: Worker threads are created with odph_linux_pthread_create() which calls odp_local_init() before entering the function. Signed-off-by: Petri Savolainen --- example/classifier/odp_classifier.c | 7 ------- 1 file changed, 7 deletions(-) -- 2.4.0 diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c index d78eb7b..35d9684 100644 --- a/example/classifier/odp_classifier.c +++ b/example/classifier/odp_classifier.c @@ -249,13 +249,6 @@ static void *pktio_receive_thread(void *arg) appl_args_t *appl = (appl_args_t *)arg; global_statistics *stats; - - /* Init this thread */ - if (odp_init_local()) { - EXAMPLE_ERR("ODP thread local init failed.\n"); - exit(EXIT_FAILURE); - } - /* Loop packets */ for (;;) { odp_pktio_t pktio_tmp;