From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 031307CC4 for ; Mon, 29 May 2017 12:01:13 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id b84so49364013wmh.0 for ; Mon, 29 May 2017 03:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=weka.io; s=google; h=from:to:cc:subject:date:message-id:organization:in-reply-to :references:mime-version:content-transfer-encoding; bh=5bGd9UdD8Ik/mQeaQs96wUreY+R0FFWyxZ1+RLUfDJk=; b=T/kzShMnFepiX8uFyu1afdj6Q72d94GBnYmRX5whQxWbbIOt65VeznzD2h7o4tiJju rav1iShF9V1O9piYr5qzF60ERxzOLOBfaqOjQABS0eeeoF3EI2gg6nCWSQ2I+cf4hBYU BLYduIR/y4UKQGyWfVgXHgRth2DUaNK0X8eow= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :in-reply-to:references:mime-version:content-transfer-encoding; bh=5bGd9UdD8Ik/mQeaQs96wUreY+R0FFWyxZ1+RLUfDJk=; b=kPBoRdRpuiCeZgDgk29ES/fzHUIwpVnBdvXFzp7R7Ibcnjz5mypw9PRv2Gua465OeH 0vq4PsPGpvTW9WIbhes5UixylM/qkR82aKL2eBKABSJaImeCSf9PsSToFi3wlC2CxxQB 82YkwiDiKA7N3y0ppgTDoXMgAAlXMg9yXOBwWj+xAbkIq+kfe/Kl8g+qCjYmScXhPdrV na4EJesvdV0MuXw9MRkvTn3jyhxMSzUKbHHBMga4Hd84wnA/GoWY4L7XO1AA5OGByKjA bfaoDbQchSd96rUnAOR61Wlk4NV4/b+LT5Oh7T0sFq/Z35DImNIFjr0dx6IzCGi4Qa9Y TBzA== X-Gm-Message-State: AODbwcBQVdZwRkvR5H1r9owlrPnaXQ9JpicbnlGgO1RR0DjV0etAPYdS XokBB/gv0uz1ip0cT18= X-Received: by 10.28.84.14 with SMTP id i14mr10643973wmb.81.1496052073254; Mon, 29 May 2017 03:01:13 -0700 (PDT) Received: from polaris.localnet (bzq-82-81-85-138.red.bezeqint.net. [82.81.85.138]) by smtp.gmail.com with ESMTPSA id p17sm625708wrc.66.2017.05.29.03.01.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 May 2017 03:01:12 -0700 (PDT) From: Gregory Etelson To: Shijith Thotton Cc: Stephen Hemminger , dev@dpdk.org, Ferruh Yigit , Qi Zhang , Wenzhuo Lu Date: Mon, 29 May 2017 13:01:06 +0300 Message-ID: <2463262.6ozr8bnjWv@polaris> Organization: Weka.IO In-Reply-To: <20170529094858.GA28265@localhost.localdomain> References: <106841857.Z7q1jSDIte@polaris> <6458984.zlYVzvDLUS@polaris> <20170529094858.GA28265@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] i40e igb_uio: reset pci on process exit 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: Mon, 29 May 2017 10:01:14 -0000 I still have to support Red Hat 6.x. These system do not have VFIO IGB_UIO is the only option there. Also, there was a discussion that claimed IGB_UIO has better performance than VFIO. http://dpdk.org/ml/archives/dev/2014-August/004609.html Regards, Gregory On Monday, 29 May 2017 12:48:59 IDT Shijith Thotton wrote: > On Fri, May 26, 2017 at 07:14:55PM +0300, Gregory Etelson wrote: > > I did not look into VFIO driver yet > > > > > > > > Regards, > > > > Gregory > > > > > > > > On Friday, 26 May 2017 18:53:21 IDT Stephen Hemminger wrote: > > > > > On Fri, 26 May 2017 09:17:33 +0300 > > > > > Gregory Etelson wrote: > > > > > > > > > > > Thank you. > > > > > > > > > > > > Regards, > > > > > > Gregory > > > > > > > > > > > > On Friday, 26 May 2017 09:05:11 IDT Shijith Thotton wrote: > > > > > > > On Fri, May 26, 2017 at 07:30:58AM +0300, Gregory Etelson wrote: > > > > > > > > > > > > > > Hi Gregory, > > > > > > > > > > > > > > The patch is useful for LiquidIO PMD as we can avoid VF FLR request > > to > > > > > > > PF. One comment inline.. > > > > > > > > > > > > > > [..] > > > > > > > > > > > > > > > > > > > > +static int > > > > > > > > > > +igbuio_pci_release(struct uio_info *info, struct inode > > *inode) > > > > > > > > > > +{ > > > > > > > > > > + int ret; > > > > > > > > > > + struct rte_uio_pci_dev *udev = info->priv; > > > > > > > > > > + struct pci_dev *dev = udev->pdev; > > > > > > > > > > + ret = __pci_reset_function(dev); > > > > > > > > > > > > > > s/__pci_reset_function/pci_reset_function > > > > > > > > > > > > > > > > > + dev_info(&dev->dev, "pci_reset_function %s \n", > > > > > > > > > > + ret == 0 ? "succeded" : "failed"); > > > > > > > > > > + return 0; > > > > > > > > > > +} > > > > > > > [..] > > > > > > > > > > > > > > Thanks, > > > > > > > Shijith > > > > > > > > > > > > > > > > > > > > > > > What does VFIO do? > > > > > > > > > > It looks like in vfio case pci_enable is held off until open and > > pci_disable is done > > > > > on close. There are other things that may need to be done to make close > > work > > > > > correctly. Like turning of msix. Also reset may not always be possible. > > > > Better follow VFIO as Stephen advised. VFIO does pci reset inside open[1] and > tries to reset device during release[2]. > > 1. elixir.free-electrons.com/linux/latest/source/drivers/vfio/pci/vfio_pci.c#L229 > 2. elixir.free-electrons.com/linux/latest/source/drivers/vfio/pci/vfio_pci.c#L361 > > static int > igbuio_pci_open(struct uio_info *info, struct inode *inode) > { > struct rte_uio_pci_dev *udev = info->priv; > struct pci_dev *dev = udev->pdev; > > return pci_reset_function(dev); > } > > and.. > udev->info.open = igbuio_pci_open; > >