From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EE9D1A04DB; Wed, 14 Oct 2020 19:39:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 03DEA1D688; Wed, 14 Oct 2020 19:39:06 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 01A0B1D63A for ; Wed, 14 Oct 2020 19:39:02 +0200 (CEST) IronPort-SDR: +72pf8CLN7ME1dvMmlrwAlKg4nwOZh/hrQZqkwK92QCx+aF16OemMd/v+vL54rFc40YfXCRLWf BgE3iWJ5S7Tg== X-IronPort-AV: E=McAfee;i="6000,8403,9774"; a="166219448" X-IronPort-AV: E=Sophos;i="5.77,375,1596524400"; d="scan'208";a="166219448" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2020 10:38:39 -0700 IronPort-SDR: zRafjhcWgJ4a+ctZgPGw1PX2YwNfPsUE5jIykabO2NWGxlUT6SMYw1sD8gqrZVKLrv8aY4Ajpz 2+BX6ggs5+Nw== X-IronPort-AV: E=Sophos;i="5.77,375,1596524400"; d="scan'208";a="463965175" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.212.224]) ([10.213.212.224]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2020 10:38:35 -0700 To: Andrew Rybchenko , Harry van Haaren , Ori Kam , Bruce Richardson , Radu Nicolau , Akhil Goyal , Sunil Kumar Kori , Pavan Nikhilesh , Jerin Jacob , Kiran Kumar K , Nithin Dabilpuram , David Hunt Cc: dev@dpdk.org, Ivan Ilchenko References: <1602682146-4722-1-git-send-email-arybchenko@solarflare.com> <1602682146-4722-5-git-send-email-arybchenko@solarflare.com> From: Ferruh Yigit Message-ID: <1995dedd-d09c-c165-54f4-20d9830bc109@intel.com> Date: Wed, 14 Oct 2020 18:38:34 +0100 MIME-Version: 1.0 In-Reply-To: <1602682146-4722-5-git-send-email-arybchenko@solarflare.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 04/11] examples: check eth dev stop status 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/14/2020 2:28 PM, Andrew Rybchenko wrote: > From: Ivan Ilchenko > > rte_eth_dev_stop() return value was changed from void to int, > so this patch modify usage of this function across examples > according to new return type. > > Signed-off-by: Ivan Ilchenko > Signed-off-by: Andrew Rybchenko <...> > diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c > index 7e3078788e..8d6c7ec237 100644 > --- a/examples/l2fwd/main.c > +++ b/examples/l2fwd/main.c > @@ -896,7 +896,10 @@ main(int argc, char **argv) > if ((l2fwd_enabled_port_mask & (1 << portid)) == 0) > continue; > printf("Closing port %d...", portid); > - rte_eth_dev_stop(portid); > + ret = rte_eth_dev_stop(portid); > + if (ret != 0) > + rte_exit(EXIT_FAILURE, "rte_eth_dev_stop: err=%d, port=%d\n", > + ret, portid); Same comment here, not sure if exiting on stop error and break freeing resources is better thing to do? Overall, for the whole set, unless the focus is in the 'stop', like testing it, what do you think log the error and ignore it?