tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: wm_intr may lead wm_start unexpectedly



On Wed, Jun 25, 2014 at 2:54 PM, Matt Thomas <matt%3am-software.com@localhost> 
wrote:
>
> On Jun 24, 2014, at 10:43 PM, Ryota Ozaki <ozaki-r%netbsd.org@localhost> 
> wrote:
>
>> Hi,
>>
>> I found a strange behavior of if_wm that
>> its interrupt handler may call its if_start
>> (xmit function) eventually. I don't think
>> it's sane. It makes difficult to use mutex for MP.
>>
>> Here is a call trace:
>> wm_intr => wm_linkintr => wm_linkintr_gmii =>
>> mii_pollstat => makphy_service => mii_phy_update =>
>> if_link_state_change => in6_if_link_up =>
>> nd6_dad_start => nd6_dad_ns_output => ... =>
>> => ether_output => ... => wm_start
>>
>> The interrupt handler calls mii, mii notifies
>> a link state change to inet6, and inet6 tries DAD.
>> This IPv6 DAD code (nd6_dad_start and
>> nd6_dad_ns_output) is the main issue of my claim.
>> nd6_dad_start normally sets up a callout for
>> nd6_dad_ns_output, however, it may call
>> nd6_dad_ns_output directly at random.
>
> Simple, set IFF_OACTIVE before calling mii

Yeah, that's a simple solution for the mii problem :)

What about the DAD's random behavior?

Thanks,
  ozaki-r


Home | Main Index | Thread Index | Old Index