From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f52.google.com (mail-vk0-f52.google.com [209.85.213.52]) by dpdk.org (Postfix) with ESMTP id DF703F618 for ; Thu, 12 Jan 2017 13:58:07 +0100 (CET) Received: by mail-vk0-f52.google.com with SMTP id 137so11776023vkl.0 for ; Thu, 12 Jan 2017 04:58:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+yewKk5PIt7bFSxiicnGswq15Znz2+oO+ll5S0eqxWM=; b=ymJFWlHlSVq5HPuf8q4ODZAoZUgEZRjV2rnoUqCkphp+atgW0MIsRnW9BPGGvdvc0h DqMkgSnr3NLHjKQNfuFSv6si8wi78lCdQ4VOxxSZa1Oxk+6uMWk8MVvmIBPL5EsQ5aNg 212kjUUAxvzMS/8QGI1aibTcbEc/vwlLD8XpnNah8aQPt4o41yR1zZVOasAdo7oKU7ao WTIgVPi2pGQobR3+4oeiUFoBRbyQvxvnKYg08bS5bwjRrhFHHy51+epAajr5ydJgjnbH uI5nbw7JweEP55pmp1nQH0MAFgeO6LID+i0+smbekXRg26gCJ/2K1H5xiilcetmoKsVi PFOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+yewKk5PIt7bFSxiicnGswq15Znz2+oO+ll5S0eqxWM=; b=nWGBMRDbVm9uVkBBvRudA7EYMqzwbse+EyDo6jpyZcRFDHthtPQCVaWf9gdtiYtdF1 sH7BL6yRbEDwyLyjfm+bH9An+iSt9+RtvEbKXPQVSssoK0xs+2gcbzim2oacqJK4rM9x uZPlhoYCQJJQ2xHb847kVJJcOoSmvODr+vMFpwvmWJ8kDy+fnciRWETcXciYWxWv7tai 9mHD6rWt+m+gX35wPTIXngAgNaXhRzNGgim03jEMaEpbDLsnrSzUuxN5KN86Bo5ToQf8 QnvaX6zUl79qHxkVS64AenVQLm1sCKGk3NkLb5RXmSghY+NKVBPxRxBpZLSxtQkVbmxt LJag== X-Gm-Message-State: AIkVDXJPt74dwaU7u42TJ1EvFAr5hIE4uFO6mDUU+gaseZL0qG2MtfHypizKIIcoqEiu5XbE1pD+4OqGh5A/sOl8 X-Received: by 10.31.234.199 with SMTP id i190mr6679857vkh.31.1484225887113; Thu, 12 Jan 2017 04:58:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.146.141 with HTTP; Thu, 12 Jan 2017 04:58:06 -0800 (PST) In-Reply-To: References: <3355891.l3I590SjcV@polaris> <608e7dfd-5226-3e30-f43b-0fbe01aee16a@intel.com> From: Alejandro Lucero Date: Thu, 12 Jan 2017 12:58:06 +0000 Message-ID: To: Ferruh Yigit Cc: Gregory Etelson , dev , users@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] [dpdk-dev] IGB_UIO: PCI Resources Management X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 12:58:08 -0000 On Thu, Jan 12, 2017 at 12:22 PM, Ferruh Yigit wrote: > On 1/12/2017 12:12 PM, Alejandro Lucero wrote: > > > > > > On Thu, Jan 12, 2017 at 11:55 AM, Ferruh Yigit > > wrote: > > > > On 12/9/2016 8:54 AM, Gregory Etelson wrote: > > > Hello, > > > > > > IGB_UIO driver does not close port PCI activities after DPDK > process exits. > > > DPDK API provides rte_eth_dev_close() to manage port PCI, > > > but it can be skipped if process receives SIGKILL signal > > > > I guess I understand the problem. > > > > > > This is a known problem, but it is not just a UIO problem, and this > > patch does not solve it, maybe it just solves part of it. > > > > In fact, a DPDK program crashing could imply the NIC DMAing after that > > and after that memory was assigned to another program. > > Yes. > Can there be a way to stop NIC DMA, (or prevent it access to mem > anymore) when app crashes? > I think that is what this patch is looking for. > > But with the patch, it just happens when igb_uio module is removed. I guess this is good for then loading or binding the device to another module, but that does not solve the problem about stopping the NIC asap. As I see it, the EAL should catch signals forcing always to close ports, even when no signal, because it could be just the app exiting without error but the port/NIC able to receive packets. But for SIGKILL, that would not be enough. So we need something else for always calling a destructor before fully exiting. > > > > > > > > > > > The patches below provide IGB_UIO release callback and IXGBEVF > release function > > > > But adding ixgbe specific code into igb_uio may not be good idea. > > Can be anything done one upper layer, pci layer, generic to all > drivers? > > > > > > This module is not just being used for Intel cards, so this addition > > will break, at least, the NFP PMD support. > > > > I was told to use igb_uio instead of adding a new NFP uio driver, so I > > guess that implies this igb_uio driver should be considered not only a > > igb driver. > > No it is generic, I think names has igb_ just for historical reasons. > Great. > > > > > > > > With the patches, each time DPDK process terminates, > > > UIO release callback will trigger port PCI close. > > > On the down side, patched IGB_UIO can be bound to a single adapter > type > > > > > > Regards, > > > Gregory > > > > <...> > > > > > >