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: <2ED289D4E09FBD4D92D911E869B97FDD0166CA13@mtlexch01.mtl.com>
Date:	Thu, 5 Nov 2009 15:26:17 +0200
From:	"Liran Liss" <liranl@...lanox.co.il>
To:	"Roland Dreier" <rdreier@...co.com>,
	"Yevgeny Petrilin" <yevgenyp@...lanox.co.il>
Cc:	<linux-rdma@...r.kernel.org>, <netdev@...r.kernel.org>,
	"Tziporet Koren" <tziporet@...lanox.co.il>
Subject: RE: [PATCH 16/25] mlx4_core: boot sriov

 S.B.
--Liran

-----Original Message-----
From: Roland Dreier [mailto:rdreier@...co.com] 
Sent: Wednesday, November 04, 2009 9:56 PM
To: Yevgeny Petrilin
Cc: linux-rdma@...r.kernel.org; netdev@...r.kernel.org; Liran Liss;
Tziporet Koren
Subject: Re: [PATCH 16/25] mlx4_core: boot sriov


 > +	/* Detect if this device is a virtual function */
 > +	switch (id->device) {
 > +	case 0x6341:
 > +	case 0x634b:
 > +	case 0x6733:
 > +	case 0x673d:
 > +	case 0x6369:
 > +	case 0x6751:
 > +	case 0x6765:

This isn't be maintainable or sane.  How about using driver_data in the
PCI device table?
LL: good idea; 10x.

 > +#ifdef CONFIG_PCI_IOV
 > +		if (sr_iov) {

Can we avoid a lot of these ifdefs by just doing

#else
#define sr_iov	0
#endif /* CONFIG_PCI_IOV */

at the beginning and letting the IOV code be optimized away?

LL: I think that this won't pass -Wall when compiling against a kernel
with sriov compiled out.

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