RE: [RFC PATCH] Initialize dev_id sysfs attribute to -1 by default
From: <hidden>
Date: 2013-06-10 18:12:33
-----Original Message----- From: John Fastabend [mailto:john.fastabend@gmail.com] Sent: Friday, June 07, 2013 10:45 PM To: Ben Hutchings Cc: John Fastabend; K, Narendra; bjorn@mork.no; netdev@vger.kernel.org; yoshfuji@linux-ipv6.org Subject: Re: [RFC PATCH] Initialize dev_id sysfs attribute to -1 by default
[...]
quoted
quoted
Although I'm not sure how that check works with devices that are setting dev_id and also provide their own mac addresses. From inspection it looks like these devices end up with a local interface identifier unnecessarily. Maybe Ben knows one of the drivers is the siena solorflare controller apparently for the SFC9000 family? The other two 'grep' finds are an mlx and chelsio device. Interestingly I didn't find any devices setting dev_id that also didn't program unique mac addresses. Perhaps I'm missing something?I set this for Siena so that userland can tell which PF and port is which even if the PCIe topology is hidden by virtualisation. In practice we haven't made use of that (and since virtualisation may also hide the VPD and serial number capabilities, it probably doesn't help much). Ben.I guess then to make dev_id work like Narendra wants you would need something in the management stack to come through and assign unique dev_id values to functions (net_devices) that share a MAC. Or have some unique 'unsigned short' value in the driver that it could be set to. I guess I miss why initializing it to -1 helps.
Hi John, thank you for the inputs. It was set to -1 to differentiate between driver setting it to zero and the default value zero. With regards, Narendra K Linux Engineering Dell Inc.