From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/ethdev Bug 2149] net/axgbe: AN state machine and PHY mode change run in EAL interrupt thread
Date: Thu, 19 Nov 2026 16:46:07 +0000 [thread overview]
Message-ID: <bug-2149-3@https.bugs.dpdk.org/> (raw)
https://bugs.dpdk.org/show_bug.cgi?id=2149
Bug ID: 2149
Summary: net/axgbe: AN state machine and PHY mode change run in
EAL interrupt thread
Product: DPDK
Version: 26.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: dev@dpdk.org
Reporter: stephen@networkplumber.org
Target Milestone: ---
Found while reviewing latest axgbe changes. The problem with busy waiting
in interrupt thread is that it will then block all other interrupts from
occurring from other devices.
The axgbe interrupt callback runs the full autonegotiation state
machine, including PHY mode changes, directly on the EAL interrupt
thread. That path busy-waits on firmware and hardware for hundreds of
milliseconds, and up to several seconds on timeout.
Call path:
axgbe_dev_interrupt_handler() axgbe_ethdev.c:316
pdata->phy_if.an_isr()
axgbe_an73_isr() axgbe_mdio.c:660
pthread_mutex_lock(&pdata->an_mutex)
axgbe_an73_state_machine()
axgbe_an73_incompat_link()
axgbe_switch_mode() -> phy_impl.set_mode()
axgbe_phy_perform_ratechange() axgbe_phy_impl.c:1561
mailbox poll: rte_delay_us(1500) x 500 (750 ms max)
axgbe_rx_adaptation(): rte_delay_ms(200)
PHY access from this context also goes through
axgbe_phy_get_comm_ownership(), which polls the hardware I2C/MDIO
mutex with rte_delay_us(100) for up to 5 seconds while holding
phy_mutex.
Impact:
- The EAL interrupt thread is shared across all devices. While axgbe
is busy-waiting, LSC/RMV/mailbox interrupts for every other port and
PMD in the process are stalled.
- EAL alarm callbacks are dispatched from the same thread and are
delayed the same way.
- Application threads calling link_update/dev_start block on an_mutex
for the same duration.
The Linux amd-xgbe driver, which this PMD is derived from, does not do
this work in the ISR. It defers it with
queue_work(pdata->an_workqueue, &pdata->an_irq_work). The DPDK port
collapsed that into the interrupt callback.
Suggested fix:
The interrupt callback should only read and clear the AN interrupt
status into pdata->an_int and wake a per-port control thread
(rte_thread_create_internal_control) that runs the state machine and
mode change. That matches the Linux design and keeps the existing
mutexes meaningful (AN worker vs application control path).
Deferring with rte_eal_alarm_set() is not sufficient, since alarms run
on the same EAL interrupt thread.
Other PMDs whose interrupt callbacks reach rte_delay_* in PHY or
firmware code probably have the same problem and should be audited.
--
You are receiving this mail because:
You are the assignee for the bug.
reply other threads:[~2026-11-19 16:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-2149-3@https.bugs.dpdk.org/ \
--to=bugzilla@dpdk.org \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox