Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 2010 23:27:00 -0800
From:      Qing Li <qingli@freebsd.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        Juli Mallett <jmallett@freebsd.org>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson <rwatson@freebsd.org>
Subject:   Re: svn commit: r205024 - head/sys/net
Message-ID:  <9ace436c1003112327i3350a0e8n9f6d5e917e9d1411@mail.gmail.com>
In-Reply-To: <4B99EA09.80108@elischer.org>
References:  <201003111756.o2BHukJu042449@svn.freebsd.org> <alpine.BSF.2.00.1003112128020.97017@fledge.watson.org> <9ace436c1003111530s3bd0de9cq451671909fb6aa64@mail.gmail.com> <eaa228be1003111535s12febe62x91124b0a015fd0ff@mail.gmail.com> <9ace436c1003111539t2af8439cn315c695d4b90e28d@mail.gmail.com> <eaa228be1003111607s4e78fe73k26a67161642d510d@mail.gmail.com> <4B99EA09.80108@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
That's a good idea. I will take your approach.

-- Qing


On Thu, Mar 11, 2010 at 11:15 PM, Julian Elischer <julian@elischer.org> wro=
te:
> Juli Mallett wrote:
>>
>> On Thu, Mar 11, 2010 at 15:39, Qing Li <qingli@freebsd.org> wrote:
>>>
>>> I guess it's a good time to clean things up. The if_link_state code has
>>> been
>>> around for quite some time, either it be fully utilized or not be there
>>> at all.
>>> The inconsistency is the root cause.
>>
>> Sure. =A0There is an increasing amount of stuff that network drivers are
>> expected to do, but they work without doing them. =A0It's easy to think
>> you have a functioning network driver and that you can get by without
>> adding support for media changes and link status reporting, etc.
>>
>>> I will try going through these tonight and hopefully the fix all take a
>>> common approach.
>
> probably should add a flag that means "we have media state"
> and if it is not set, assume it is always on.
>
>>
>> If you can think of a way to add some invariants (warn the first time
>> a driver receives a packet without having ever set the link state,
>> make sure the media status callback sets the valid flag in the
>> request, etc) that would probably be very helpful for people who are
>> writing network drivers. =A0If I hadn't been following the threads about
>> your changes, I would have had to spend much longer fixing the Octeon
>> port's Ethernet driver, wondering why suddenly it broke and
>> instrumenting the routing code. =A0A printf would go a long way.
>>
>> Juli.
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9ace436c1003112327i3350a0e8n9f6d5e917e9d1411>