[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1370624577.1903.10.camel@bwh-desktop.uk.level5networks.com>
Date: Fri, 7 Jun 2013 18:02:57 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: John Fastabend <john.r.fastabend@...el.com>
CC: <Narendra_K@...l.com>, <bjorn@...k.no>, <netdev@...r.kernel.org>,
<yoshfuji@...ux-ipv6.org>
Subject: Re: [RFC PATCH] Initialize dev_id sysfs attribute to -1 by default
On Fri, 2013-06-07 at 07:45 -0700, John Fastabend wrote:
> On 5/31/2013 5:17 AM, Narendra_K@...l.com wrote:
> > On Thu, May 30, 2013 at 07:08:46PM +0530, Bjørn Mork wrote:
> >>
> >> <Narendra_K@...l.com> writes:
> >>
> >>> From: Narendra K <narendra_k@...l.com>
> >>>
> >>> 'dev_id' sysfs attribute is initialized to zero by default.
> >>> It is also zero based. This creates ambiguity in differentiating
> >>> whether the driver set it to zero or it is the default value.
> >>> Initialize 'dev_id' to -1 to make the scenario unambiguous.
> >>
> >> I understand your concern, but I don't think you can do this. It
> >> changes the userspace API, and has some very visible side effects.
> >>
> >> Please take a look at net/ipv6/addrconf.c
> >
> > Ok, thank you for pointing it. I missed it while looking for its
> > possible use scenarios.
>
> 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.
The comment in addrconf.c refers to zSeries aka s390. See
qeth_l3_setup_netdev() in drivers/s390/net/qeth_l3_main.c (why is this
not in drivers/net?).
It sounds like all the other drivers should be changed to stop setting
dev_id, unless userland really uses it. Looking at
/lib/udev/rules.d/75-persistent-net-generator.rules on a RHEL system, it
appears to use dev_id only for devices without a globally-assigned MAC
address.
Ben.
> Interestingly I didn't find any devices setting dev_id that also
> didn't program unique mac addresses. Perhaps I'm missing something?
--
Ben Hutchings, Staff Engineer, Solarflare
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