From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id A0D931F5 for ; Wed, 7 Sep 2016 10:42:55 +0200 (CEST) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 136BF3F725; Wed, 7 Sep 2016 08:42:55 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org (vpn1-4-32.ams2.redhat.com [10.36.4.32]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u878grfv023758; Wed, 7 Sep 2016 04:42:54 -0400 To: Maryam Tahhan , dev@dpdk.org References: <1473181925-127253-1-git-send-email-maryam.tahhan@intel.com> Cc: patrick.g.kutch@intel.com From: Panu Matilainen Message-ID: Date: Wed, 7 Sep 2016 11:42:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1473181925-127253-1-git-send-email-maryam.tahhan@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 07 Sep 2016 08:42:55 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] dpdk_procinfo: check for primary process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2016 08:42:55 -0000 On 09/06/2016 08:12 PM, Maryam Tahhan wrote: > Add a check to see if the primary process is running and exit gracefully if it > is not. > > Suggested-by: Patrick Kutch > Signed-off-by: Maryam Tahhan > --- > app/proc_info/main.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/app/proc_info/main.c b/app/proc_info/main.c > index 6dc0bbb..ddc8cf8 100644 > --- a/app/proc_info/main.c > +++ b/app/proc_info/main.c > @@ -329,6 +329,11 @@ main(int argc, char **argv) > argc -= ret; > argv += (ret - 3); > > + if (!rte_eal_primary_proc_alive(NULL)) { > + rte_exit(EXIT_FAILURE, "NO PRIMARY DPDK PROCESS IS RUNNING\n"); I don't think there'a a need to YELL THAT MESSAGE. - Panu -