From: Simon Horman <horms@kernel.org>
To: Jijie Shao <shaojijie@huawei.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, andrew+netdev@lunn.ch, shenjian15@huawei.com,
liuyonglong@huawei.com, chenhao418@huawei.com,
lantao5@huawei.com, huangdonghua3@h-partners.com,
yangshuaisong@h-partners.com, jonathan.cameron@huawei.com,
salil.mehta@huawei.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 2/3] net: hns3: using the num_tqps to check whether tqp_index is out of range when vf get ring info from mbx
Date: Tue, 9 Dec 2025 16:59:47 +0000 [thread overview]
Message-ID: <aThVg5BQW_StnV6K@horms.kernel.org> (raw)
In-Reply-To: <20251209133825.3577343-3-shaojijie@huawei.com>
On Tue, Dec 09, 2025 at 09:38:24PM +0800, Jijie Shao wrote:
> From: Jian Shen <shenjian15@huawei.com>
>
> Currently, rss_size = num_tqps / tc_num. If tc_num is 1, then num_tqps
> equals rss_size. However, if the tc_num is greater than 1, then rss_size
> will be less than num_tqps, causing the tqp_index check for subsequent TCs
> using rss_size to always fail.
>
> This patch uses the num_tqps to check whether tqp_index is out of range,
> instead of rss_size.
>
> Fixes: 326334aad024 ("net: hns3: add a check for tqp_index in hclge_get_ring_chain_from_mbx()")
> Signed-off-by: Jian Shen <shenjian15@huawei.com>
> Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-12-09 16:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 13:38 [PATCH net 0/3] There are some bugfix for the HNS3 ethernet driver Jijie Shao
2025-12-09 13:38 ` [PATCH net 1/3] net: hns3: using the num_tqps in the vf driver to apply for resources Jijie Shao
2025-12-09 16:59 ` Simon Horman
2025-12-09 13:38 ` [PATCH net 2/3] net: hns3: using the num_tqps to check whether tqp_index is out of range when vf get ring info from mbx Jijie Shao
2025-12-09 16:59 ` Simon Horman [this message]
2025-12-09 13:38 ` [PATCH net 3/3] net: hns3: add VLAN id validation before using Jijie Shao
2025-12-09 16:50 ` Simon Horman
2025-12-10 6:39 ` Jijie Shao
2025-12-10 12:55 ` Simon Horman
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=aThVg5BQW_StnV6K@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=chenhao418@huawei.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=huangdonghua3@h-partners.com \
--cc=jonathan.cameron@huawei.com \
--cc=kuba@kernel.org \
--cc=lantao5@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liuyonglong@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=salil.mehta@huawei.com \
--cc=shaojijie@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.