tech-net archive

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

Re: Removing if_type switches in if_vlan.c



On Tue, Apr 21, 2015 at 10:40 PM, Matt Thomas <matt%3am-software.com@localhost> wrote:
>
>> On Apr 21, 2015, at 12:47 AM, Ryota Ozaki <ozaki-r%netbsd.org@localhost> wrote:
>>
>> Hi,
>>
>> There are several if_type switches in if_vlan.c,
>> which were introduced to support other hardware
>> types such as FDDI many years ago. However, no
>> implement hadn't come since then.
>
> Doesn't mean they aren't correct.  Leave them.

Correct but useless in the now...

>
>> I think there is no reason to keep them and
>> I want to get rid of them to improve code
>> readability.
>>
>> Any objections?
>
> Yes.  The one in vlan_config must stay for
> correctness.  The one is vlan_unconfig doesn't
> hurt.  If you remove the other switches, at
> least add a KASSERT() to make sure it's IFT_ETHER.

Oh sorry, I intended to add some checks for that,
not just removing the switches.

Here is a patch: http://www.netbsd.org/~ozaki-r/vlan_remove_switches.diff

Thanks,
  ozaki-r


Home | Main Index | Thread Index | Old Index