netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: hariprasad@chelsio.com
Cc: netdev@vger.kernel.org, leedom@chelsio.com,
	nirranjan@chelsio.com, kumaras@chelsio.com, anish@chelsio.com
Subject: Re: [PATCH net-next] cxgb4: Fix for SR-IOV VF initialization
Date: Tue, 22 Jul 2014 15:34:40 -0700 (PDT)	[thread overview]
Message-ID: <20140722.153440.757089942973087670.davem@davemloft.net> (raw)
In-Reply-To: <1406026580-27256-1-git-send-email-hariprasad@chelsio.com>

From: Hariprasad Shenai <hariprasad@chelsio.com>
Date: Tue, 22 Jul 2014 16:26:20 +0530

> Commit 35b1de5 ("rdma/cxgb4: Fixes cxgb4 probe failure in VM when PF is exposed
> through PCI Passthrough") introduced a regression, where VF failed to
> initialize. This commit fixes it.
> 
> Signed-off-by: Casey Leedom <leedom@chelsio.com>
> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>

This commit message need to explain things better, how exactly was
the regression introduced, what's exactly wrong with the current code?

I actually can't figure it out myself, other than to say that maybe
replacing things with:

	func = PCI_FUNC(pdev->devfn);
 	if (func < ARRAY_SIZE(num_vf) && num_vf[func] > 0)
 		if (pci_enable_sriov(pdev, num_vf[func]) == 0)

would work equally as well.  That's precisely what the code was
doing before the mentioned commit.

Why do we have to iterate over _ALL_ functions of the PCI device,
rather than just directly enable SRIOV on the one function whether
it bet PCI_FUNC(pdev->devfn) or that WHOAMI value?

You need to explain this so that people understand the how and the
why of your changes.

Thanks.

  reply	other threads:[~2014-07-22 22:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-22 10:56 [PATCH net-next] cxgb4: Fix for SR-IOV VF initialization Hariprasad Shenai
2014-07-22 22:34 ` David Miller [this message]
2014-07-22 22:47   ` Casey Leedom
2014-07-23  3:01   ` Alexander Duyck

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=20140722.153440.757089942973087670.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=anish@chelsio.com \
    --cc=hariprasad@chelsio.com \
    --cc=kumaras@chelsio.com \
    --cc=leedom@chelsio.com \
    --cc=netdev@vger.kernel.org \
    --cc=nirranjan@chelsio.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).