From: Jijie Shao <shaojijie@huawei.com>
To: Jakub Kicinski <kuba@kernel.org>, <netdev-bot+sashiko@kernel.org>
Cc: <shaojijie@huawei.com>, <davem@davemloft.net>,
<edumazet@kernel.org>, <pabeni@redhat.com>,
<andrew+netdev@lunn.ch>, <shenjian15@huawei.com>,
<liuyonglong@huawei.com>, <chenhao418@huawei.com>,
<yangshuaisong@h-partners.com>, <ningwei15@huawei.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 net 3/4] net: hns3: fix interface stuck after OOM with full hardware rx queue
Date: Mon, 16 Nov 2026 21:13:46 +0800 [thread overview]
Message-ID: <e3535430-eb4b-418a-b16c-06ce2acc52e1@huawei.com> (raw)
In-Reply-To: <20261115104113.6b608a8e@kernel.org>
on 2026/11/16 2:41, Jakub Kicinski wrote:
> On Sat, 14 Nov 2026 03:17:22 +0000 netdev-bot+sashiko@kernel.org wrote:
>> - [Medium] The patch adds a new private `ethtool -S` per-queue string,
>> "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
> Both Medium comments look legit. Let me apply patches 1 & 2 since they
> 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
next prev parent reply other threads:[~2026-11-16 13:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 12:58 [PATCH v4 net 0/4] net: hns3: fix multiple bugs in reset/error paths Jijie Shao
2026-11-11 12:58 ` [PATCH v4 net 1/4] net: hns3: fix vector resource leak in hns3_nic_alloc_vector_data Jijie Shao
2026-11-11 12:58 ` [PATCH v4 net 2/4] net: hns3: fix page_pool leak in hns3_alloc_ring_memory error path Jijie Shao
2026-11-11 12:58 ` [PATCH v4 net 3/4] net: hns3: fix interface stuck after OOM with full hardware rx queue Jijie Shao
2026-11-14 3:17 ` netdev-bot+sashiko
2026-11-15 18:41 ` Jakub Kicinski
2026-11-15 18:43 ` Jakub Kicinski
2026-11-16 13:13 ` Jijie Shao [this message]
2026-11-11 12:58 ` [PATCH v4 net 4/4] net: hns3: fix use-after-free in debugfs read during reset/unload Jijie Shao
2026-11-14 3:17 ` netdev-bot+sashiko
2026-11-11 13:01 ` [PATCH v4 net 0/4] net: hns3: fix multiple bugs in reset/error paths netdev-bot+sinfo
2026-11-12 19:06 ` Jakub Kicinski
2026-11-13 3:11 ` Jijie Shao
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=e3535430-eb4b-418a-b16c-06ce2acc52e1@huawei.com \
--to=shaojijie@huawei.com \
--cc=andrew+netdev@lunn.ch \
--cc=chenhao418@huawei.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuyonglong@huawei.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ningwei15@huawei.com \
--cc=pabeni@redhat.com \
--cc=shenjian15@huawei.com \
--cc=yangshuaisong@h-partners.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
all inboxes | Powered by JetHome®