From mboxrd@z Thu Jan 1 00:00:00 1970 From: Panu Matilainen Subject: Re: [PATCH] dpdk_procinfo: check for primary process Date: Wed, 7 Sep 2016 11:42:53 +0300 Message-ID: References: <1473181925-127253-1-git-send-email-maryam.tahhan@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: patrick.g.kutch@intel.com To: Maryam Tahhan , dev@dpdk.org 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) In-Reply-To: <1473181925-127253-1-git-send-email-maryam.tahhan@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 -