Re: [PATCH v4 net 3/4] net: hns3: fix interface stuck after OOM with full hardware rx queue
From: Jijie Shao
Date: Mon Nov 16 2026 - 08:14:09 EST
on 2026/11/16 2:41, Jakub Kicinski wrote:
On Sat, 14 Nov 2026 03:17:22 +0000 netdev-bot+sashiko@xxxxxxxxxx wrote:
- [Medium] The patch adds a new private `ethtool -S` per-queue string,Both Medium comments look legit. Let me apply patches 1 & 2 since they
"rx_oom_cnt", at hns3_rxq_stats[] in hns3_ethtool.c line 65.
- [Medium] net: hns3: rx_ring_oom_bm freed before cancelling oom_task on
init error
are unrelated, please respin the rest.
Thanks for the review. I'll rebase onto net and send v5.
On Sashiko's two Medium comments on patch 3:
1) rx_oom_cnt
It is a companion diagnostic for the OOM recovery, not an unrelated
stat: it counts the first RX allocation failure in each 250ms window
per ring. I'd like to keep it in ethtool -S rather than qstats:
- hns3 has no netdev_stat_ops; adding one only for this counter would
expose a single qstat without the rest of the per-queue set.
- alloc_fail is defined as an exact count of RX allocation failures;
this is a 250ms-window trend, so mapping it to alloc_fail would
misrepresent the standard stat.
- hns3's existing per-queue stats and customer tooling use ethtool -S.
I'm fine with it being backported to stable. If you'd prefer to keep
the fix minimal, I can split it into a separate patch without a Fixes:
tag. Please let me know which you prefer.
2) rx_ring_oom_bm vs oom_task
Sashiko is right: the invariant in the commit message is wrong on the
init error unwind paths. I'll cancel the work at the top of
hns3_uninit_all_ring(), before the rings and bitmap are freed, and keep
the existing cancel in hns3_nic_uninit_vector_data(). The window is
small, but the ordering is still wrong.
3) patch 4
Sashiko's remaining comments on patch 4:
- page_pool_info / error-code changes: I'll add these to the commit
message.
- re-init ordering: my understanding is that the window is theoretical.
Sashiko itself notes that the writer issues full barriers before
clear_bit(RESETTING), so a reader that observes the reset as complete
is very unlikely to see stale pointers. Unless I'm missing a path
that can observe the intermediate state, I'd prefer not to add a
locking change to this fix.
- set_ringparam/RTNL wait: I agree this is a latency concern; my
reading is that it is bounded by the dump length and is not a
correctness issue. Unless you see a correctness problem, I'd prefer
not to add a new state bit to this fix.
I'll also make hns3_oom_task() use only atomic bitops and correct the
exit-refill description in the commit message.
Thanks,
Jijie Shao