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]
Date:	Wed, 9 Dec 2009 17:53:27 -0800
From:	"Rose, Gregory V" <gregory.v.rose@...el.com>
To:	"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>
CC:	"chavey@...gle.com" <chavey@...gle.com>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"gospo@...hat.com" <gospo@...hat.com>
Subject: RE: [RFC PATCH 05/12] ixgbe: Add SR-IOV features to main module

>-----Original Message-----
>From: Waskiewicz Jr, Peter P
>Sent: Wednesday, December 09, 2009 5:44 PM
>To: Rose, Gregory V
>Cc: chavey@...gle.com; Kirsher, Jeffrey T; netdev@...r.kernel.org;
>gospo@...hat.com; Waskiewicz Jr, Peter P
>Subject: RE: [RFC PATCH 05/12] ixgbe: Add SR-IOV features to main module
>
>On Wed, 9 Dec 2009, Rose, Gregory V wrote:
>
>> >-----Original Message-----
>> >From: chavey@...gle.com [mailto:chavey@...gle.com]

[snippage] 

>> >+static inline void ixgbe_disable_sriov(struct ixgbe_adapter
>*adapter)
>> >+{
>> >+       struct ixgbe_hw *hw = &adapter->hw;
>> >+       u32 gcr;
>> >+       u32 gpie;
>> >+       u32 vmdctl;
>> >+
>> >+#ifdef CONFIG_PCI_IOV
>> >+       /* disable iov and allow time for transactions to clear */
>> >+       pci_disable_sriov(adapter->pdev);
>> >+#endif
>> >+       msleep(500);
>> >
>> >what is the sleep used for ?
>> [Rose, Gregory V]
>>
>> It's mostly a safety valve to give plenty of time for all bus
>transactions to complete or time out.
>
>I think Chavey is pointing out that if CONFIG_PCI_IOV is not enabled,
>you'd be sleeping for 500 msecs for no reason.  You should probably
>stick
>the msleep(500) inside the ifdef.
>
>-PJ
[Rose, Gregory V] 

Oh, missed that due to my preconceptions.  My reading of the code is that this function should never be called unless SR-IOV was enabled in the first place (could be wrong of course).  However, for code correctness and readability I agree that the msleep should be moved within the #ifdef.

Added to my community comment notes.

- Greg

--
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