From: Wei Yang <weiyang@linux.vnet.ibm.com>
To: Or Gerlitz <or.gerlitz@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
David Miller <davem@davemloft.net>,
Wei Yang <weiyang@linux.vnet.ibm.com>,
netdev <netdev@vger.kernel.org>, Amir Vadai <amirv@mellanox.com>,
Jack Morgenstein <jackm@dev.mellanox.co.il>,
Tal Alon <talal@mellanox.com>,
Yevgeny Petrilin <yevgenyp@mellanox.com>
Subject: Re: [PATCH net] net/mlx4_core: Fix Oops on reboot when SRIOV VFs are probed into the Host
Date: Tue, 3 Jun 2014 16:40:32 +0800 [thread overview]
Message-ID: <20140603084032.GA13874@richard> (raw)
In-Reply-To: <CAJZOPZK94-hZfBtpjFMEd5m1STRxbs-wTYsKB5SoC=zES5XfPg@mail.gmail.com>
On Tue, Jun 03, 2014 at 11:15:43AM +0300, Or Gerlitz wrote:
>On Mon, Jun 2, 2014 at 7:10 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> Writing a driver is not an empirical process of trying things to see
>> what works. You need to actively design a consistent structure so you
>> know why and when things are safe. I object to gratuitous "dev ==
>> NULL" checks because often they are just a way of patching up a driver
>> design that isn't well thought-out.
>
>Bjorn, 1st and most -- Agreed.
>
>Next, to be precise, the use case of rebooting the host while the
>driver was loaded in SRIOV mode and NO VFs probed to VMs worked before
>commit befdf89 and is now broken.
>
>Reading further your response, I understand that the code was probably
>using a sort of hackish branching to make that to happen, and you
>suggest we re-write that section properly so it can serve well when
>(hopefully soon) implemenet
>sriov_configure and possibly also suspend/resume, point taken.
>
>Dave, as for this patch, again, the regression of inability to reboot
>the host node
>while the driver is loaded exists in the latest upstream code as of
>befdf89 / 3.15-rc1
>
>Now, taking into account that 3.15 is after rc8 and the IL devel team
>has a holiday this week, I don't see us coming in time with a more
>deeper fix for 3.15, so maybe you can eventaully go and merge this one
>liner for 3.15?
I am glad to verify your patch, if you wish.
>
>Or.
>
>
>> As I wrote before:
>> From the PCI core's perspective, after .probe() returns successfully,
>> we can call any driver entry point and pass the pci_dev to it, and
>> expect it to work. Doing mlx4_remove_one() in mlx4_pci_err_detected()
>> sort of breaks that assumption because you clear out pci_drvdata().
>> Right now, the only other entry point mlx4 really implements is
>> mlx4_remove_one(), and it has a hack that tests whether pci_drvdata()
>> is NULL. But that's ... a hack, and you'll have to do the same
>> if/when you implement suspend/resume/sriov_configure/etc.
--
Richard Yang
Help you, Help me
next prev parent reply other threads:[~2014-06-03 8:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-01 10:49 [PATCH net] net/mlx4_core: Fix Oops on reboot when SRIOV VFs are probed into the Host Or Gerlitz
2014-06-01 16:41 ` Sergei Shtylyov
2014-06-01 19:59 ` Or Gerlitz
2014-06-02 14:29 ` Wei Yang
2014-06-02 16:10 ` Bjorn Helgaas
2014-06-03 0:58 ` David Miller
2014-06-03 2:00 ` Wei Yang
2014-06-03 8:15 ` Or Gerlitz
2014-06-03 8:40 ` Wei Yang [this message]
2014-06-04 9:50 ` Wei Yang
2014-06-06 2:52 ` Wei Yang
2014-06-08 9:18 ` Or Gerlitz
2014-06-08 9:16 ` Or Gerlitz
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=20140603084032.GA13874@richard \
--to=weiyang@linux.vnet.ibm.com \
--cc=amirv@mellanox.com \
--cc=bhelgaas@google.com \
--cc=davem@davemloft.net \
--cc=jackm@dev.mellanox.co.il \
--cc=netdev@vger.kernel.org \
--cc=or.gerlitz@gmail.com \
--cc=talal@mellanox.com \
--cc=yevgenyp@mellanox.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).