From: Stephen Hemminger <stephen@networkplumber.org>
To: Orgad Shaneh <orgads@gmail.com>
Cc: dev@dpdk.org, Wei Hu <weh@microsoft.com>,
Long Li <longli@kernel.org>,
stable@dpdk.org
Subject: Re: [PATCH 2/2] net/mana: fix Rx interrupt enable failing on lock contention
Date: Mon, 9 Nov 2026 14:21:27 -0800 [thread overview]
Message-ID: <20261109142127.7a54ee80@phoenix.local> (raw)
In-Reply-To: <20261102070809.813033-2-orgads@gmail.com>
On Mon, 2 Nov 2026 07:08:09 +0000
Orgad Shaneh <orgads@gmail.com> wrote:
> Rx interrupt enable and disable take the per-device reset_ops_lock
> with a trylock and return -EBUSY when it is held. Every Rx queue
> takes that lock on each enable and disable, so with two or more
> queues on different lcores the calls collide routinely. A failed
> enable leaves the CQ unarmed, and a thread that then sleeps in
> rte_epoll_wait() is not woken by the next packet; it sleeps until
> its timeout with packets in the ring. A failed disable leaves the
> event unconsumed. Applications do not expect -EBUSY from these
> calls outside a reset, and l3fwd-power ignores the return value.
>
> Seen on Azure (MANA VF) with 2 queues and a 10 ms epoll timeout:
> about 550 lost wakeups per queue in one run, p99 latency 9.9 ms,
> and 22.7% packet loss at the higher rate tested. With one queue
> there was no loss.
>
> The section under the lock is a doorbell write or a non-blocking
> read of the completion channel, so wait for the lock instead.
> The device state check is kept, so the calls still return -EBUSY
> while a reset is in progress; a caller that arrives while the reset
> thread holds the lock waits for that step to finish first.
>
> Fixes: 077ca514d641 ("net/mana: support device reset")
> Cc: stable@dpdk.org
>
> Signed-off-by: Orgad Shaneh <orgads@gmail.com>
> ---
Since this is better than current main I applied it to next-net
AI review noted:
Patch 2/2
---------
Info: blocking can be long while a reset is in progress.
The reset thread holds reset_ops_lock across mana_dev_stop(),
mana_mp_req_on_rxtx(RESET_ENTER) and mana_dev_close(). On reset
exit it holds it across ibv_close_device(), mana_pci_probe(),
mana_mp_req_on_rxtx(RESET_EXIT) and mana_dev_start(). Each mp
request is rte_mp_request_sync() with MANA_MP_REQ_TIMEOUT_SEC (5 s).
An lcore that calls rte_eth_dev_rx_intr_enable() during one of
those steps can block for several seconds instead of getting
-EBUSY at once.
No deadlock results: mana_reset_enter() only spins on the
burst_state busy bit, which an lcore in rx_intr_enable/disable
does not hold, and the ethdev event callbacks are all emitted after
the lock is dropped. This is acceptable for a stable fix. It would
help to say "may block for the duration of the reset teardown or
re-probe step" in the commit message, rather than "waits for that
step to finish".
The burst_state gate mentioned below the --- is the better
long-term design, since it avoids putting every queue's
sleep/wakeup through one device mutex. Fine as a follow-up for
main; not needed for this fix.
next prev parent reply other threads:[~2026-11-09 22:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 7:08 [PATCH 1/2] net/mana: fix Rx interrupt vector beyond device count Orgad Shaneh
2026-11-02 7:08 ` [PATCH 2/2] net/mana: fix Rx interrupt enable failing on lock contention Orgad Shaneh
2026-11-02 8:12 ` Stephen Hemminger
2026-11-02 8:27 ` Orgad Shaneh
2026-11-09 11:25 ` [EXTERNAL] " Wei Hu
2026-11-09 14:02 ` Orgad Shaneh
2026-11-10 14:33 ` Stephen Hemminger
2026-11-09 22:21 ` Stephen Hemminger [this message]
2026-11-10 9:42 ` [PATCH] net/mana: do not block Rx interrupt calls during a reset Orgad Shaneh
2026-11-10 14:47 ` Stephen Hemminger
2026-11-10 15:13 ` [PATCH v2] " Orgad Shaneh
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=20261109142127.7a54ee80@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=longli@kernel.org \
--cc=orgads@gmail.com \
--cc=stable@dpdk.org \
--cc=weh@microsoft.com \
/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