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] [day] [month] [year] [list]
Date:	Thu, 6 Jan 2011 16:40:16 +0200
From:	"Eilon Greenstein" <eilong@...adcom.com>
To:	"Matt Domsch" <Matt_Domsch@...l.com>
cc:	"Dimitris Michailidis" <dm@...lsio.com>,
	"Dmitry Kravkov" <dmitry@...adcom.com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"narendra_k@...l.com" <narendra_k@...l.com>,
	"jordan_hargrave@...l.com" <jordan_hargrave@...l.com>
Subject: Re: [PATCH net-next] bnx2x: Add Nic partitioning mode (57712
 devices)

On Mon, 2010-12-20 at 11:44 -0800, Dimitris Michailidis wrote:
> Matt Domsch wrote:
> >> You can have several interfaces with same device link and different dev_id. 
> >>  While the current driver doesn't do it you could also have several 
> >> interfaces with different device links but same dev_id (NPAR situation, 
> >> notice again that dev_ids are not per PCI function), or interfaces with 
> >> different device and dev_id, or even interfaces with same device and dev_id.
> > 
> > What is the scope of dev_id then?  It's not per PCI device like I
> > thought.
> 
> I don't think it could be that way because for these cards you can't 
> statically tell which ports are controlled by a PCI function.  So knowing 
> that an interface is say port 0 of a function would help little.
> 
> > It sounds like it's per card, but how can I know the card
> > boundary?
> 
> Yes, it's per card and covers the PFs and VFs of the card.
> 
> > If I have 2 cards driven by cxgb4 in the system, each with say 4
> > ports.  I could see a minimum of 8 PCI devices (fine), but the dev_id
> > values would be?  0,1,2,3; 0,1,2,3 ?
> 
> Correct.
> 
> > How can I tell that these are
> > two different cards, with two different sets of dev_id values, rather
> > than one card with 4 ports, 8 (NPAR or SR-IOV) interfaces, with each 2
> > interfaces mapping to the same port?
> 
> Doesn't the information in /sys/devices distinguish them?  For example, 
> something like
> 
> /sys/devices/pci0000:00/0000:00:07.0/0000:04:00.0/net/eth2/dev_id == 0
> /sys/devices/pci0000:00/0000:00:07.0/0000:04:00.1/net/eth3/dev_id == 0
> /sys/devices/pci0000:00/0000:00:07.0/0000:04:01.0/net/eth5/dev_id == 0
> /sys/devices/pci0000:00/0000:00:1c.0/0000:05:00.0/net/eth4/dev_id == 0
> 
> tells me there are two cards, one has eth4 on port 0, the other has eth2, 
> eth3, and eth5 on its port 0 with eth5 being on a VF.
> 
> > dev_id is not system-wide unique.  It's not even slot unique best as I
> > can tell.  If I had a PCI slot extender, with 2 PCI slots, and I put
> > two of the above cards in, I would see 0,1,2,3; 0,1,2,3.  To be fair,
> > my naming scheme doesn't really account for such an extender, though
> > currently it would go pci<slot>#<12345678>.
> 
> Can you give an example of what /sys/devices looks like in the case you're 
> considering?

Matt,

Happy New Year!

Does the dev_id approach suits your needs? Do you want to proceed in
that direction?

Thanks,
Eilon


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