lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140722.153440.757089942973087670.davem@davemloft.net>
Date:	Tue, 22 Jul 2014 15:34:40 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	hariprasad@...lsio.com
Cc:	netdev@...r.kernel.org, leedom@...lsio.com, nirranjan@...lsio.com,
	kumaras@...lsio.com, anish@...lsio.com
Subject: Re: [PATCH net-next] cxgb4: Fix for SR-IOV VF initialization

From: Hariprasad Shenai <hariprasad@...lsio.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@...lsio.com>
> Signed-off-by: Hariprasad Shenai <hariprasad@...lsio.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ