From: Dengdui Huang <huangdengdui@huawei.com>
To: <dev@dpdk.org>
Cc: <stephen@networkplumber.org>, <lihuisong@huawei.com>,
<fengchengwen@huawei.com>, <liuyonglong@huawei.com>
Subject: [PATCH 4/6] net/hns3: VF support parse max TC number
Date: Wed, 11 Jun 2025 16:18:58 +0800 [thread overview]
Message-ID: <20250611081900.3658421-5-huangdengdui@huawei.com> (raw)
In-Reply-To: <20250611081900.3658421-1-huangdengdui@huawei.com>
From: Chengwen Feng <fengchengwen@huawei.com>
The mailbox message HNS3_MBX_GET_BASIC_INFO can obtain the maximum
number of TCs of the device. The VF does not support multiple TCs,
therefore, this field is not saved.
Now the VF needs to support multiple TCs, therefore, this field needs
to be saved.
This commit also support dump the TC info.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_dump.c | 2 ++
drivers/net/hns3/hns3_ethdev_vf.c | 1 +
drivers/net/hns3/hns3_mbx.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_dump.c b/drivers/net/hns3/hns3_dump.c
index 6c43ec486e..63c6b4ef2c 100644
--- a/drivers/net/hns3/hns3_dump.c
+++ b/drivers/net/hns3/hns3_dump.c
@@ -209,6 +209,7 @@ hns3_get_device_basic_info(FILE *file, struct rte_eth_dev *dev)
" - Device Base Info:\n"
"\t -- name: %s\n"
"\t -- adapter_state=%s\n"
+ "\t -- tc_max=%u tc_num=%u\n"
"\t -- nb_rx_queues=%u nb_tx_queues=%u\n"
"\t -- total_tqps_num=%u tqps_num=%u intr_tqps_num=%u\n"
"\t -- rss_size_max=%u alloc_rss_size=%u tx_qnum_per_tc=%u\n"
@@ -221,6 +222,7 @@ hns3_get_device_basic_info(FILE *file, struct rte_eth_dev *dev)
"\t -- intr_conf: lsc=%u rxq=%u\n",
dev->data->name,
hns3_get_adapter_state_name(hw->adapter_state),
+ hw->dcb_info.tc_max, hw->dcb_info.num_tc,
dev->data->nb_rx_queues, dev->data->nb_tx_queues,
hw->total_tqps_num, hw->tqps_num, hw->intr_tqps_num,
hw->rss_size_max, hw->alloc_rss_size, hw->tx_qnum_per_tc,
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 1cb8a9ccc1..632409c5d0 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -853,6 +853,7 @@ hns3vf_get_basic_info(struct hns3_hw *hw)
}
basic_info = (struct hns3_basic_info *)resp_msg;
+ hw->dcb_info.tc_max = basic_info->tc_max;
hw->dcb_info.hw_tc_map = basic_info->hw_tc_map;
hw->dcb_info.num_tc = hns3vf_get_num_tc(hw);
hw->pf_vf_if_version = basic_info->pf_vf_if_version;
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index c73f34fb32..651c6b9023 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -53,7 +53,7 @@ enum HNS3_MBX_OPCODE {
struct hns3_basic_info {
uint8_t hw_tc_map;
- uint8_t rsv;
+ uint8_t tc_max;
uint16_t pf_vf_if_version;
/* capabilities of VF dependent on PF */
uint32_t caps;
--
2.33.0
next prev parent reply other threads:[~2025-06-11 8:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 8:18 [PATCH 0/6] net/hns3: VF support multi-TCs Dengdui Huang
2025-06-11 8:18 ` [PATCH 1/6] net/hns3: fix VF fail to config queue TC Dengdui Huang
2025-06-11 8:18 ` [PATCH 2/6] net/hns3: remove duplicate struct field Dengdui Huang
2025-06-11 8:18 ` [PATCH 3/6] net/hns3: refactor DCB module code Dengdui Huang
2025-06-11 8:18 ` Dengdui Huang [this message]
2025-06-11 8:18 ` [PATCH 5/6] net/hns3: VF support discover multi-TCs capability Dengdui Huang
2025-06-11 8:19 ` [PATCH 6/6] net/hns3: VF support multi-TCs configure Dengdui Huang
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=20250611081900.3658421-5-huangdengdui@huawei.com \
--to=huangdengdui@huawei.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=lihuisong@huawei.com \
--cc=liuyonglong@huawei.com \
--cc=stephen@networkplumber.org \
/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).