DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shijith Thotton <shijith.thotton@caviumnetworks.com>
To: Gregory Etelson <gregory@weka.io>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
	dev@dpdk.org, Stephen Hemminger <stephen@networkplumber.org>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Jianfeng Tan <jianfeng.tan@intel.com>
Subject: Re: [dpdk-dev] [PATCH] igb_uio: issue FLR during open and release of device file
Date: Fri, 7 Jul 2017 15:33:19 +0530	[thread overview]
Message-ID: <20170707100311.GA6000@localhost.localdomain> (raw)
In-Reply-To: <2058901.cGOP7o7VZP@polaris>

On Thu, Jul 06, 2017 at 08:27:17PM +0300, Gregory Etelson wrote:
> I could not reproduce server crash with http://dpdk.org/dev/patchwork/patch/25267/ [1]
> However, pci_try_reset_function() API used in that patch is not defined in RedHat-6.x Linux-2.6.32 kernels 
> Therefore I work with http://dpdk.org/dev/patchwork/patch/25061/  patch [2].
> [2] was successfully tested with IXGBE & I40e VFs on RH 6.x, RH 7.x Ubuntu 14.04 and SLES-11.4 
>  
> Regards,
> Gregory
> 
> On Thursday, 6 July 2017 19:41:40 IDT Ferruh Yigit wrote:
> > On 6/12/2017 10:38 AM, Shijith Thotton wrote:
> > > Set UIO info device file operations open and release. Call pci reset
> > > function inside open and release to clear device state at start and end.
> > > Copied this behaviour from vfio_pci kernel module code. With this patch,
> > > it is not mandatory to issue FLR by PMD's during init and close.
> > > 
> > > Bus master enable and disable are added in open and release respectively
> > > to take care of device DMA.
> > > 
> > > Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
> > 
> > This patch, and Gregory's patch [1] are very similar and main target is
> > to leave device in a more proper state when DPDK application quits
> > unexpectedly.
> > 
> > Difference between two are, this one implements both .open and .release
> > ops, and sets / clears bus master accordingly.
> > 
> > Although main concern is .reset, I am OK to follow vfio_pci approach
> > here, and clearing bus master on .reset can prevent unwanted DMA access.
> > 
> > So, I am for this patch and I am testing it for a few days without a
> > problem.
> > 
> > But Gregory reported a crash with older version of this patch, without
> > more detail, we should clear that first. With Gregory's Tested-by, I am
> > OK with this patch.
> > 
> > 
> > Gregory,
> > 
> > Are you using your version, what are the results? And would you mind
> > testing this patch?
> > 
> > Thanks,
> > ferruh
> > 
> > 
> > [1]
> > http://dpdk.org/dev/patchwork/patch/25061/
> > 
> > 

Hi Gregory,

Please try the following change:
s/pci_try_reset_function/pci_reset_function/

pci_try_reset_function is same as pci_reset_function, except it returns -EAGAIN
if unable to lock the device[1].

If everyone agrees, I can submit v2 with this change.

1. http://elixir.free-electrons.com/linux/latest/source/drivers/pci/pci.c#L4293

Thanks,
Shijith

  reply	other threads:[~2017-07-07 10:03 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24 11:22 [dpdk-dev] i40e igb_uio: reset pci on process exit Gregory Etelson
2017-05-25 18:42 ` Stephen Hemminger
2017-05-26  4:30   ` Gregory Etelson
2017-05-26  6:05     ` Shijith Thotton
2017-05-26  6:17       ` Gregory Etelson
2017-05-26 15:53         ` Stephen Hemminger
2017-05-26 16:14           ` Gregory Etelson
2017-05-29  9:48             ` Shijith Thotton
2017-05-29 10:01               ` Gregory Etelson
2017-05-29 11:01                 ` Shijith Thotton
2017-05-29 11:21                   ` Gregory Etelson
2017-05-31 11:09                     ` [dpdk-dev] [RFC PATCH] igb_uio: issue FLR during open and release of device file Shijith Thotton
2017-05-31 12:20                       ` Ferruh Yigit
2017-05-31 15:30                         ` Stephen Hemminger
2017-05-31 17:11                           ` Ferruh Yigit
2017-06-01 11:35                             ` Shijith Thotton
2017-06-01 11:14                         ` Gregory Etelson
2017-06-04  7:22                         ` Gregory Etelson
2017-06-05  2:29                           ` Tan, Jianfeng
2017-06-05  5:57                             ` Gregory Etelson
2017-05-31 15:29                       ` Stephen Hemminger
2017-06-12  9:38                       ` [dpdk-dev] [PATCH] " Shijith Thotton
2017-07-05 23:42                         ` Thomas Monjalon
2017-07-06 16:41                         ` Ferruh Yigit
2017-07-06 17:27                           ` Gregory Etelson
2017-07-07 10:03                             ` Shijith Thotton [this message]
2017-07-07 10:16                               ` Ferruh Yigit
2017-07-07 11:13                         ` [dpdk-dev] [PATCH v2] " Shijith Thotton
2017-07-07 15:10                           ` Ferruh Yigit
2017-07-10  3:07                             ` Gregory Etelson
2017-07-11  5:42                               ` Gregory Etelson
2017-07-11 11:36                                 ` Gregory Etelson
2017-07-10  3:38                           ` Tan, Jianfeng
2017-07-10  7:10                             ` Shijith Thotton
2017-07-10  9:00                               ` Tan, Jianfeng
2017-07-10 10:42                                 ` Shijith Thotton
2017-07-12  3:37                                   ` Tan, Jianfeng
2017-07-12  3:40                           ` Tan, Jianfeng
2017-07-16  4:22                             ` Gregory Etelson
2017-07-19 13:32                             ` Ferruh Yigit
2017-07-19 16:19                               ` Gregory Etelson
2017-07-20 22:36                                 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170707100311.GA6000@localhost.localdomain \
    --to=shijith.thotton@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=gregory@weka.io \
    --cc=jianfeng.tan@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).