if_msk.c link negotiation / packet drops

Kevin Oberman kob6558 at gmail.com
Tue Oct 11 17:56:59 UTC 2011


On Tue, Oct 11, 2011 at 10:10 AM, YongHyeon PYUN <pyunyh at gmail.com> wrote:
> On Tue, Oct 11, 2011 at 11:40:42AM -0400, Karim wrote:
>> Hi List,
>>
>> Using a Marvell NIC plugged into a CISCO switch I see the
>> auto-negotiation failing and even when forcing the device to full-duplex
>> we sometimes see packet drops.
>>
>> Here is the device description from dmesg:
>>
>> mskc0: <Marvell Yukon 88E8053 Gigabit Ethernet> port 0xbe00-0xbeff mem
>> 0xfdefc000-0xfdefffff irq 16 at device 0.0 on pci1
>> msk0: <Marvell Technology Group Ltd. Yukon EC Id 0xb6 Rev 0x02> on mskc0
>> msk0: Ethernet address: 00:03:2d:09:94:52
>> miibus0: <MII bus> on msk0
>> e1000phy0: <Marvell 88E1111 Gigabit PHY> PHY 0 on miibus0
>> e1000phy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
>> 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow
>> mskc0: [ITHREAD]
>>
>> The switch its plugged in (Cisco) is configured for 100baseTX full-duplex.
>>
>> ifconfig reports:
>>
>> msk0:
>> flags=608843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,SATELLITE,LAN_NET>
>> metric 0 mtu 1500
>>         options=40018<VLAN_MTU,VLAN_HWTAGGING>
>
> The flags and options show that you're using very customized
> driver, right?
>
>>         ether 00:03:2d:09:94:52
>>         inet 192.168.122.7 netmask 0xffffff00 broadcast 192.168.122.255
>>         media: Ethernet autoselect (100baseTX <half-duplex>)
>          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Resolved duplex is half so I guess it would be normal to see
> dropped frames which may be triggered by collision.

You have a duplex mis-match. If you are hard setting the remote end to
full, the local end must also be configured o full. Auto-configuration
of duplex requires that both ends run auto-config. When one end is set
to not do auto-config, the other end SHOULD always set to half-duplex.
This is part of 802.3 that is a carry-over from the days when hubs and
coax dominated, so the default was declared to be half. Since so much
hardware now exists with that default, changing it ill never happen.

Either set your computer to full duplex or turn on auto-configuration
on the Cisco.

Very little hardware now in service fails to auto-config correctly,
but the practice of lacking down the duplex setting became common in
the early days of full-duplex when it was not yet a standard and many
Ethernet chip-sets didn't play nice with others. Things would be much
better if people would just stop hard-setting the duplex, but old, old
habits and memes die hard.

Also, contrary to common belief, collisions are NOT errors. They are a
normal part of half-dulpex Ethernet operation and do NOT result in
packets being dropped. Only "excessive collisions do and they ARE a
real error and a clear indication that something is wrong.
-- 
R. Kevin Oberman, Network Engineer
E-mail: kob6558 at gmail.com


More information about the freebsd-net mailing list