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 A4948A04A3 for ; Tue, 12 May 2020 07:45:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8A3091C0D4; Tue, 12 May 2020 07:45:03 +0200 (CEST) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id 420CA1C014; Tue, 12 May 2020 07:44:59 +0200 (CEST) Received: by mail-io1-f68.google.com with SMTP id e9so12538053iok.9; Mon, 11 May 2020 22:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YUbc1JhzIwgnJWqD4hQSmB7paJSSYgT+jp4xBOwmZTI=; b=WcMcrsFbxcwkNsBGFbYaQg6+oueIJIIbfvqEzBQ3kRahFpUlfRV3D5USFQ/Io5mndC uqbguNlcq6iMIJUkWLHUOjgs63RO3LB6iWG7ozFf9zwUHP1+lVJsrNLNQFlT5vwW0iVq O1P/jdZwlcF9c3CiPm9yZxoWAyYxWUj2tjwbzJ/vAkqtWi9sr55B5DDma+HgRv4wZK9r dF+NTDIBnmQXuHs//lFP7qLXsdcD2gTVR4fqFd3zmk+x8KwnRc57CClnYE8aB+yYqFWg BVzEkLXgo8dgdtWYPigyDqxe523ohMGFaFpAzq2d80g5NbBf5pO6nRRq1L2B2Xh7nRAr PmAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YUbc1JhzIwgnJWqD4hQSmB7paJSSYgT+jp4xBOwmZTI=; b=hi1KTWofSkZm7lqcUs9bzRbSHte/giChBzzggQpSjQ58VL1aaR2SQyqUaZqiOQ2Que AJWKRtiGn6x5PDuHR8tSCliX6mS3kbGNS8DQ1YWxKLuZol2CtOeK9Gw1a95qmSFd+Cik ox+EFH9wyWs5tXnWj8jnCIQgyp3sajFmvWI9p7r+Bo2KHCRubs6k2a3Fl+X4FyZ67AQ+ +AJ7hA96qsMD/9yZpVdfJd5GZBv021EzziJ15oN7HxENC4NrOaMjta6q4eByWdiqkqjP lKj+ackLaPYAUQqrn8lRNgQm7gdFoVT7awMzpSXbMNINKHhIqKJs9FToQ+YdnpEf5hTI GEVg== X-Gm-Message-State: AGi0PuZlW2mYiPybpJBo0PntSIIhifzFcKRQ0PBVOHqkRYdy5VoRwWDJ /DBt/ujh5D0wgY2PNhI3v3kf0AkeZ1T3x1YofPM= X-Google-Smtp-Source: APiQypJxm9Gn9bJ0Ugs8qLbKQsdToEC6dFAunW6e5q6gqLKPd8UKt2PEDPXCDIMwmTd0uLQeTd0CYVDU/HJOc+sbhPY= X-Received: by 2002:a02:7113:: with SMTP id n19mr7911835jac.113.1589262298410; Mon, 11 May 2020 22:44:58 -0700 (PDT) MIME-Version: 1.0 References: <20200511112831.25549-1-m.bilal@emumba.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D4D2C85@BGSMSX101.gar.corp.intel.com> In-Reply-To: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D4D2C85@BGSMSX101.gar.corp.intel.com> From: Jerin Jacob Date: Tue, 12 May 2020 11:14:42 +0530 Message-ID: To: "Varghese, Vipin" Cc: Muhammad Bilal , "Richardson, Bruce" , "dev@dpdk.org" , "stable@dpdk.org" , "jgrajcia@cisco.com" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] examples/l2fwd/main.c: free resources in case of error X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Tue, May 12, 2020 at 10:20 AM Varghese, Vipin wrote: > > snipped > > Subject: [PATCH] examples/l2fwd/main.c: free resources in case of error > > > > Bugzilla ID: 437 > > Cc: dev@dpdk.org > > Cc: stable@dpdk.org > > Cc: bruce.richardson@intel.com > > Cc: vipin.varghese@intel.com > > Cc: jgrajcia@cisco.com > > Signed-off-by: Muhammad Bilal > > --- > > examples/l2fwd/main.c | 72 ++++++++++++++++++++++++++++++++++--------- > > 1 file changed, 57 insertions(+), 15 deletions(-) > > > > diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index > > 88ddfe589..dbaa457e2 100644 > > --- a/examples/l2fwd/main.c > > +++ b/examples/l2fwd/main.c > > @@ -517,6 +517,17 @@ signal_handler(int signum) > > } > > } > > > > +static void > > +stop_and_close_eth_dev(uint16_t portid) { > > + RTE_ETH_FOREACH_DEV(portid) { > > + printf("Closing port %d...", portid); > > + rte_eth_dev_stop(portid); > > + rte_eth_dev_close(portid); > > + printf(" Done\n"); > > + } > > +} > > + > If the solution is to cleanup in application, then all application needs to do cleanup. Hence `+1` for updating this to all examples in DPDK. When updating the examples, Add the rte_eal_cleanup() as well(it is the counterpart of rte_eal_init()) >