From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id AD10C69F7 for ; Wed, 25 Apr 2018 15:53:12 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2018 06:53:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,326,1520924400"; d="scan'208";a="36952396" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.237.220.109]) ([10.237.220.109]) by orsmga006.jf.intel.com with ESMTP; 25 Apr 2018 06:53:08 -0700 To: Arnon Warshavsky , thomas@monjalon.net, wenzhuo.lu@intel.com, declan.doherty@intel.com, jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com, ferruh.yigit@intel.com Cc: dev@dpdk.org References: <1524608213-2080-1-git-send-email-arnon@qwilt.com> <1524663944-30376-1-git-send-email-arnon@qwilt.com> <1524663944-30376-10-git-send-email-arnon@qwilt.com> From: "Burakov, Anatoly" Message-ID: <590fdef8-8788-5a06-7bef-29622c1266eb@intel.com> Date: Wed, 25 Apr 2018 14:53:07 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1524663944-30376-10-git-send-email-arnon@qwilt.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v8 09/10] eal: replace rte_panic instances in init sequence X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2018 13:53:14 -0000 On 25-Apr-18 2:45 PM, Arnon Warshavsky wrote: > Change some local functions return type from void to int. > This change does not break ABI as the functions are internal. > Panic thrown from threads was not handled in this patch > > Signed-off-by: Arnon Warshavsky > --- <...> > retval = fcntl(mem_cfg_fd, F_SETLK, &wr_lock); > if (retval < 0){ > close(mem_cfg_fd); > - rte_exit(EXIT_FAILURE, "Cannot create lock on '%s'. Is another primary " > - "process running?\n", pathname); > + mem_cfg_fd = -1; > + RTE_LOG(CRIT, EAL, "%s(): Cannot create lock on '%s'. Is another primary process running?\n", > + __func__, pathname); > + return -1; > } > > rte_mem_cfg_addr = mmap(NULL, sizeof(*rte_config.mem_config), > PROT_READ | PROT_WRITE, MAP_SHARED, mem_cfg_fd, 0); > > if (rte_mem_cfg_addr == MAP_FAILED){ > - rte_panic("Cannot mmap memory for rte_config\n"); > + RTE_LOG(CRIT, EAL, "%s(): Cannot mmap memory for rte_config\n", > + __func__); > + return -1; Still missing mem_cfg_fd close() and set to -1 here. Once this is fixed, Acked-by: Anatoly Burakov And please keep my ack this time :) -- Thanks, Anatoly