From: Varka Bhadram <varkabhadram@gmail.com>
To: Ethan Zhao <ethan.kernel@gmail.com>
Cc: "<kvm@vger.kernel.org>" <kvm@vger.kernel.org>,
linux-pci <linux-pci@vger.kernel.org>,
"e1000-devel@lists.sourceforge.net"
<e1000-devel@lists.sourceforge.net>,
"vaughan.cao@oracle.com" <vaughan.cao@oracle.com>,
"Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
Ethan Zhao <ethan.zhao@oracle.com>,
"<linux.nics@intel.com>" <linux.nics@intel.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
"<gleb@kernel.org>" <gleb@kernel.org>,
"<alex.williamson@redhat.com>" <alex.williamson@redhat.com>,
Bjorn Helgaas <bhelgaas@google.com>,
"<boris.ostrovsky@oracle.com>" <boris.ostrovsky@oracle.com>,
netdev <netdev@vger.kernel.org>,
"Allan, Bruce W" <bruce.w.allan@intel.com>,
LKML <linux-kernel@vger.kernel.org>,
"<john.ronciak@intel.com>" <john.ronciak@intel.com>,
David Vrabel <david.vrabel@citrix.com>,
"<pbonzini@redhat.com>" <pbonzini@redhat.com>
Subject: Re: [PATCH 2/2 V3] PCI: implement VFs assignment reference counter
Date: Fri, 11 Jul 2014 18:26:36 +0530 [thread overview]
Message-ID: <53BFDF04.7090906@gmail.com> (raw)
In-Reply-To: <CABawtvOV5DQqqLu96CFktxmHkJA+n3FUyA3Nt3HtPMKs5KpVOw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1104 bytes --]
On 07/11/2014 06:21 PM, Ethan Zhao wrote:
> On Fri, Jul 11, 2014 at 8:42 PM, Varka Bhadram <varkabhadram@gmail.com> wrote:
>> On 07/11/2014 06:00 PM, Ethan Zhao wrote:
>>> Current implementation of helper function pci_vfs_assigned() is a
>>> little complex, to get sum of VFs that assigned to VM, access low
>>> level configuration space register and then loop in traversing
>>> device tree.
>>
>> (...)
>>
>>
>>> @@ -650,6 +630,11 @@ EXPORT_SYMBOL_GPL(pci_vfs_assigned);
>>> void pci_iov_assign_device(struct pci_dev *pdev)
>>> {
>>> pdev->dev_flags |= PCI_DEV_FLAGS_ASSIGNED;
>>> + if (pdev->is_virtfn && !pdev->is_physfn)
>>> + if (pdev->physfn)
>>> + if (pdev->physfn->sriov)
>>
>> Why don't we make last two 'if' conditions into single 'if'
>>
>> if (pdev->physfn && pdev->physfn->sriov)
> Yeah, this one looks better, that style used to tell myself, I might
> forget the which side of && operator first, if you sure left first,
> I prefer that too :>
|for && operator - evaluation is from Left to Right|
--
Regards,
Varka Bhadram.
[-- Attachment #2: Type: text/plain, Size: 372 bytes --]
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
[-- Attachment #3: Type: text/plain, Size: 257 bytes --]
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
next prev parent reply other threads:[~2014-07-11 12:56 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-11 12:30 [PATCH 1/2 V3] PCI: introduce device assignment interface and refactory related code Ethan Zhao
2014-07-11 12:30 ` [PATCH 2/2 V3] PCI: implement VFs assignment reference counter Ethan Zhao
2014-07-11 12:42 ` Varka Bhadram
2014-07-11 12:51 ` Ethan Zhao
2014-07-11 12:56 ` Varka Bhadram [this message]
2014-07-11 13:01 ` Ethan Zhao
2014-07-11 13:13 ` [PATCH 1/2 V3] PCI: introduce device assignment interface and refactory related code Alex Williamson
2014-07-11 14:15 ` Alex Williamson
2014-07-11 14:37 ` Ethan Zhao
2014-07-11 14:54 ` Alex Williamson
2014-07-11 15:19 ` Ethan Zhao
2014-07-11 15:25 ` Alex Williamson
2014-07-11 16:06 ` Ethan Zhao
2014-07-11 16:13 ` Alex Williamson
2014-07-12 0:27 ` Ethan Zhao
2014-07-12 0:40 ` Ethan Zhao
2014-07-20 14:48 ` Yuval Mintz
2014-07-21 1:58 ` Alex Williamson
2014-07-21 3:17 ` Ethan Zhao
2014-07-21 13:17 ` Yuval Mintz
2014-07-21 14:01 ` Alex Williamson
2014-07-21 14:11 ` Yuval Mintz
2014-07-21 14:39 ` Alex Williamson
2014-07-21 15:10 ` Ethan Zhao
2014-07-21 22:41 ` Alexander Duyck
2014-07-22 0:35 ` Ethan Zhao
2014-07-21 3:28 ` Ethan Zhao
2014-07-11 14:20 ` Ethan Zhao
2014-07-11 14:50 ` Alex Williamson
2014-07-11 15:07 ` Ethan Zhao
2014-07-11 15:23 ` Alex Williamson
2014-07-11 16:02 ` Ethan Zhao
2014-07-21 22:29 ` Alexander Duyck
2014-07-22 0:38 ` Ethan Zhao
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=53BFDF04.7090906@gmail.com \
--to=varkabhadram@gmail.com \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bruce.w.allan@intel.com \
--cc=david.vrabel@citrix.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=ethan.kernel@gmail.com \
--cc=ethan.zhao@oracle.com \
--cc=gleb@kernel.org \
--cc=jesse.brandeburg@intel.com \
--cc=john.ronciak@intel.com \
--cc=konrad.wilk@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux.nics@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=vaughan.cao@oracle.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).