opnsense / opnsense/src

axgbe: traffic stall for 1G modules on link-up after boottime interface configuration

Open
#205 0 comments 0 reactions 1 assignee View on GitHub

@swhite2 is already working on this.

Since Jun 5, 2024.

cleanup
Dominant language
C
Stars
505
Forks
202
PR merge metrics
No merged PRs in 30d

Description

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

1G SFP modules that actively auto-negotiate on axgbe are rather slow to come up in link state, which can cause a race condition as described in https://github.com/opnsense/core/issues/7113#issuecomment-1876881903

However, one would expect that after boot, removing the SFP and inserting it again would eventually lead to dhclient recovering and fetching an IP address for the interface after the link up. Instead, the driver remains in an "off" state, where only out traffic can be seen on tcpdump, and the device does not receive any traffic.

This issue has only been observed with (slow) 1G modules, which suggests that there is still an issue in the driver wrt the link up flow. Interfaces that have a static IP assigned to them are not affected. The issue is also unlikely to be reproducible on all 1G SFP modules.

To Reproduce

Steps to reproduce the behavior:

  1. With a 1G module inserted, assign ax0 as WAN interface.
  2. Reboot the machine.
  3. After boot, there is no IP address on the WAN interface.
  4. Remove & insert SFP, link up event coalescing from devd will fire, and dhclient will start, but will not settle as a tcpdump will reveal no incoming traffic.
  5. sysctl dev.ax.0 will show no activity on the receive queues.
  6. ifconfig ax0 down && ifconfig ax0 up
  7. WAN interface will get an IP address.

Expected behavior

For axgbe to receive traffic after a link up after boottime interface configuration.

Describe alternatives you considered

A manual ifconfig ax<N> down && ifconfig ax<N> up fixes this. As a workaround, one can create a script in /usr/local/etc/rc.syshook.d/start named 90-axgbe which contains the above down & up.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.