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 1/3] net: hns3: using the num_tqps in the vf driver to apply for resources
Date: Tue, 9 Dec 2025 16:59:00 +0000 [thread overview]
Message-ID: <aThVVMH-1bAzpX3K@horms.kernel.org> (raw)
In-Reply-To: <20251209133825.3577343-2-shaojijie@huawei.com>
On Tue, Dec 09, 2025 at 09:38:23PM +0800, Jijie Shao wrote:
> From: Jian Shen <shenjian15@huawei.com>
>
> Currently, hdev->htqp is allocated using hdev->num_tqps, and kinfo->tqp
> is allocated using kinfo->num_tqps. However, kinfo->num_tqps is set to
> min(new_tqps, hdev->num_tqps); Therefore, kinfo->num_tqps may be smaller
> than hdev->num_tqps, which causes some hdev->htqp[i] to remain
> uninitialized in hclgevf_knic_setup().
>
> Thus, this patch allocates hdev->htqp and kinfo->tqp using hdev->num_tqps,
> ensuring that the lengths of hdev->htqp and kinfo->tqp are consistent
> and that all elements are properly initialized.
>
> Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
> 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 [this message]
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
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=aThVVMH-1bAzpX3K@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).