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
| ||
|
Message-ID: <1292592157.3136.819.camel@localhost> Date: Fri, 17 Dec 2010 13:22:37 +0000 From: Ben Hutchings <bhutchings@...arflare.com> To: Matt Domsch <Matt_Domsch@...l.com> Cc: Eilon Greenstein <eilong@...adcom.com>, 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 Thu, 2010-12-16 at 20:45 -0600, Matt Domsch wrote: > On Thu, Dec 09, 2010 at 04:49:25PM +0200, Eilon Greenstein wrote: > > On Mon, 2010-12-06 at 10:21 -0800, Dimitris Michailidis wrote: > > > Matt Domsch wrote: > > ... > > > /sys/class/net/<ifname>/dev_id indicates the physical port <ifname> is > > > associated with. At least a few drivers set up dev_id this way. > > > > > > > > > > So we are on agreement? This can satisf all needs? If so, we will add > > this scheme to the bnx2x as well. > > I don't think that's enough. Necessary, but not sufficient. > > If dev_id is a field that starts over with each PCI device (e.g. is > used to distinguish multiple ports that share the same PCI > device), that's enough to handle the Chelsio case, but not the NPAR & > SR-IOV case. > > If the above is true, then a value of dev_id=0 for all 1:1 PCI Device > : Port relations is fine, leaving the three drivers that set dev_id > non-zero are all multi-port, single PCI device controllers. > > cxgb4/t4_hw.c: adap->port[i]->dev_id = j; > mlx4/en_netdev.c: dev->dev_id = port - 1; > sfc/siena.c: efx->net_dev->dev_id = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1; > > Is that truly how these three controllers work: they set dev_id when > there are multiple physical ports that a single PCI d/b/d/f drives? [...] In the case of sfc, each port has a separate PCI function. We read this register field to find out which port we're talking to, as virtualisation can alter the function number. I don't know about the others. Ben. -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked. -- 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