Bug 207034 - ixv driver does not check_link or fill in adapter->link_speed field during initialization
Summary: ixv driver does not check_link or fill in adapter->link_speed field during in...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords: IntelNetworking, patch
Depends on:
Blocks:
 
Reported: 2016-02-08 22:52 UTC by Jeremiah
Modified: 2023-02-03 14:27 UTC (History)
2 users (show)

See Also:


Attachments
Proposed patch (935 bytes, patch)
2016-02-08 22:52 UTC, Jeremiah
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremiah 2016-02-08 22:52:34 UTC
Created attachment 166765 [details]
Proposed patch

I'm not 100% sure this is a bug, but the ixv driver does not fill in the link_speed field during initialization. Also the call to check_link during initialization does not actually check the link (these behaviors are related). You can see this difference in a minor change in the "media" field displayed by ifconfig.

Before applying my patch (media does not show "full-duplex"):

ixv0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=405bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,LRO,VLAN_HWTSO>
        ether 02:cf:31:b5:e9:19
        inet 10.50.3.59 netmask 0xffffffc0 broadcast 10.50.3.63 
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: active
---

After applying my patch (media shows some additional values):

ixv0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=405bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,LRO,VLAN_HWTSO>
        ether 02:cf:31:b5:e9:19
        inet 10.50.3.59 netmask 0xffffffc0 broadcast 10.50.3.63 
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (autoselect <full-duplex>)
        status: active
---

It's not clear to me if the lack of check_link and adapter_speed being filled in matters in any meaningful way. In particular, I'm not sure if it would be a problem if the link started as "down", since check_link is not called during init. I do my testing in EC2 and the link is always up there, so I can't easily test that. Despite potentially not being a bug in functionality, the current behavior of the code was counter to my expectation, so I'm filing this so the maintainer can make a decision if the attached patch is worthwhile and/or correct.
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2023-02-03 14:27:38 UTC
It looks like your patch is mostly committed, so closing.