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 93A9795D7 for ; Tue, 9 Feb 2016 17:37:35 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 09 Feb 2016 08:37:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,421,1449561600"; d="scan'208";a="880510535" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.159]) by orsmga001.jf.intel.com with SMTP; 09 Feb 2016 08:37:32 -0800 Received: by (sSMTP sendmail emulation); Tue, 09 Feb 2016 16:37:32 +0025 Date: Tue, 9 Feb 2016 16:37:32 +0000 From: Bruce Richardson To: Wojciech Zmuda Message-ID: <20160209163731.GA4308@bricha3-MOBL3> References: <1452002675-8919-1-git-send-email-woz@semihalf.com> <1455034146-24036-1-git-send-email-woz@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1455034146-24036-1-git-send-email-woz@semihalf.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] af_packet: make the device detachable 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: Tue, 09 Feb 2016 16:37:36 -0000 On Tue, Feb 09, 2016 at 05:09:06PM +0100, Wojciech Zmuda wrote: > Implement rte_pmd_af_packet_devuninit() exposed through struct > rte_driver.uninit() and set dev_flags to RTE_ETH_DEV_DETACHABLE, > to allow af_packet device deinitialization with API function > rte_eth_dev_detach(). This fixes memory leak by freeing memory > allocated during initialization. > During device initialization copy device name to ethdev->data to make > it compatible with rte_eth_dev_allocated(). > > Signed-off-by: Wojciech Zmuda > --- > v2: > * Fixed typo and a comment. > * Added feature to the 2.3 release notes. > * Free memory allocated for rx and tx queues. > > doc/guides/rel_notes/release_2_3.rst | 4 ++++ > drivers/net/af_packet/rte_eth_af_packet.c | 37 ++++++++++++++++++++++++++++++- > 2 files changed, 40 insertions(+), 1 deletion(-) > > diff --git a/doc/guides/rel_notes/release_2_3.rst b/doc/guides/rel_notes/release_2_3.rst > index 7945694..4694646 100644 > --- a/doc/guides/rel_notes/release_2_3.rst > +++ b/doc/guides/rel_notes/release_2_3.rst > @@ -39,6 +39,10 @@ This section should contain new features added in this release. Sample format: > > Enabled virtio 1.0 support for virtio pmd driver. > > +* **Added af_packet driver deinitialization function.** > + > + Implemented rte_pmd_af_packet_devuninit() exposed through struct > + rte_driver.uninit() to allow af_packet device deinitialization with API function. > The use of "deinitialization" sounds awkward, and the overall text maybe could be made less technical. Maybe talk about "allowing dynamic removal" of af_packet devices [or even hotplug of them]? /Bruce