From: Jiacheng Ye <yejiacheng4@h-partners.com>
To: dev@dpdk.org
Cc: Feifei Wang <wangfeifei40@huawei.com>,
Thomas Monjalon <thomas@monjalon.net>,
Anatoly Burakov <anatoly.burakov@intel.com>
Subject: [PATCH v4 26/27] net/hinic3: add Tx burst mode get
Date: Fri, 23 Oct 2026 23:58:07 +0800 [thread overview]
Message-ID: <20261023155809.855-27-yejiacheng4@h-partners.com> (raw)
In-Reply-To: <20261023155809.855-1-yejiacheng4@h-partners.com>
Expose the active Tx burst mode and its offloads via the
tx_burst_mode_get callback so applications can query how each queue
sends packets. The string encodes whether the compact CQE path is in
use and which offloads are enabled.
Signed-off-by: Jiacheng Ye <yejiacheng4@h-partners.com>
---
doc/guides/nics/features/hinic3.ini | 1 +
drivers/net/hinic3/hinic3_ethdev.c | 2 ++
drivers/net/hinic3/hinic3_tx.c | 32 +++++++++++++++++++++++++++++
drivers/net/hinic3/hinic3_tx.h | 2 ++
4 files changed, 37 insertions(+)
diff --git a/doc/guides/nics/features/hinic3.ini b/doc/guides/nics/features/hinic3.ini
index e47907aa22..fcbc0d5c3d 100644
--- a/doc/guides/nics/features/hinic3.ini
+++ b/doc/guides/nics/features/hinic3.ini
@@ -9,6 +9,7 @@ Link speed configuration = Y
Rx interrupt = Y
Queue start/stop = Y
Runtime queue setup = Y
+Burst mode info = Y
MTU update = Y
Scattered Rx = Y
TSO = Y
diff --git a/drivers/net/hinic3/hinic3_ethdev.c b/drivers/net/hinic3/hinic3_ethdev.c
index c09dad9efa..aec2dc42e9 100644
--- a/drivers/net/hinic3/hinic3_ethdev.c
+++ b/drivers/net/hinic3/hinic3_ethdev.c
@@ -3743,6 +3743,7 @@ static const struct eth_dev_ops hinic3_pmd_ops = {
.mac_addr_add = hinic3_mac_addr_add,
.set_mc_addr_list = hinic3_set_mc_addr_list,
.flow_ops_get = hinic3_dev_filter_ctrl,
+ .tx_burst_mode_get = hinic3_tx_burst_mode_get,
.fec_get_capability = hinic3_fec_capability_get,
.fec_get = hinic3_fec_get,
.fec_set = hinic3_fec_set,
@@ -3797,6 +3798,7 @@ static const struct eth_dev_ops hinic3_pmd_vf_ops = {
.set_mc_addr_list = hinic3_set_mc_addr_list,
.flow_ops_get = hinic3_dev_filter_ctrl,
.eth_dev_priv_dump = hinic3_eth_dev_priv_dump,
+ .tx_burst_mode_get = hinic3_tx_burst_mode_get,
};
/**
diff --git a/drivers/net/hinic3/hinic3_tx.c b/drivers/net/hinic3/hinic3_tx.c
index d3568db9a8..14353c32f4 100644
--- a/drivers/net/hinic3/hinic3_tx.c
+++ b/drivers/net/hinic3/hinic3_tx.c
@@ -1479,6 +1479,38 @@ hinic3_flush_txqs(struct hinic3_nic_dev *nic_dev)
}
}
+int
+hinic3_tx_burst_mode_get(struct rte_eth_dev *dev,
+ uint16_t tx_queue_id,
+ struct rte_eth_burst_mode *mode)
+{
+ uint64_t tx_offloads = dev->data->dev_conf.txmode.offloads;
+ struct hinic3_nic_dev *nic_dev;
+ struct hinic3_txq *txq = NULL;
+
+ nic_dev = HINIC3_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
+ txq = nic_dev->txqs[tx_queue_id];
+ if (!txq)
+ return -EINVAL;
+
+ snprintf(mode->info, sizeof(mode->info),
+ "%s%s%s%s%s%s",
+ (nic_dev->config.rx_cqe_compact_en == HINIC3_RX_CQE_COMPACT_EN) ?
+ "compact CQE" : "scalar",
+ (tx_offloads & RTE_ETH_TX_OFFLOAD_MULTI_SEGS) ? " + MULTI" : "",
+ (tx_offloads & (RTE_ETH_TX_OFFLOAD_TCP_TSO |
+ RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO)) ? " + TSO" : "",
+ (tx_offloads & (RTE_ETH_TX_OFFLOAD_IPV4_CKSUM |
+ RTE_ETH_TX_OFFLOAD_UDP_CKSUM |
+ RTE_ETH_TX_OFFLOAD_TCP_CKSUM |
+ RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |
+ RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM)) ? " + CKSUM" : "",
+ (tx_offloads & RTE_ETH_TX_OFFLOAD_VLAN_INSERT) ? " + VLAN" : "",
+ (tx_offloads & RTE_ETH_TX_OFFLOAD_QINQ_INSERT) ? " + QINQ" : "");
+
+ return 0;
+}
+
/**
* It is responsible for sending data packets.
*
diff --git a/drivers/net/hinic3/hinic3_tx.h b/drivers/net/hinic3/hinic3_tx.h
index e0a2606428..6bdf71f59d 100644
--- a/drivers/net/hinic3/hinic3_tx.h
+++ b/drivers/net/hinic3/hinic3_tx.h
@@ -396,4 +396,6 @@ uint16_t hinic3_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb
int hinic3_stop_sq(struct hinic3_txq *txq);
int hinic3_start_all_sqs(struct rte_eth_dev *eth_dev);
int hinic3_tx_done_cleanup(void *txq, uint32_t free_cnt);
+int hinic3_tx_burst_mode_get(struct rte_eth_dev *dev, uint16_t tx_queue_id,
+ struct rte_eth_burst_mode *mode);
#endif /**< _HINIC3_TX_H_ */
--
2.33.0
next prev parent reply other threads:[~2026-10-23 16:00 UTC|newest]
Thread overview: 107+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-10 14:44 [PATCH v1 00/17] net/hinic3: add PMD features and fixes Jiacheng Ye
2026-10-10 14:44 ` [PATCH v1 01/17] net/hinic3: fix offload and cmdq/compact CQE config Jiacheng Ye
2026-10-10 14:44 ` [PATCH v1 02/17] net/hinic3: add CIR drop statistics and VF LAG support Jiacheng Ye
2026-10-10 14:44 ` [PATCH v1 03/17] net/hinic3: add FEC mode get/set and capability support Jiacheng Ye
2026-10-10 14:44 ` [PATCH v1 04/17] net/hinic3: add mbox message recording and debug dump Jiacheng Ye
2026-10-10 14:44 ` [PATCH v1 05/17] net/hinic3: add COS mask and COS map support Jiacheng Ye
2026-10-10 14:44 ` [PATCH v1 06/17] net/hinic3: add VF link state and promiscuous support Jiacheng Ye
2026-10-10 14:44 ` [PATCH v1 07/17] net/hinic3: convert cmdq ops to static global variables Jiacheng Ye
2026-10-10 14:44 ` [PATCH v1 08/17] net/hinic3: update RSS hash type configuration Jiacheng Ye
2026-10-10 14:45 ` [PATCH v1 09/17] net/hinic3: refactor flow rule parsing Jiacheng Ye
2026-10-10 14:45 ` [PATCH v1 10/17] net/hinic3: add SP560 NIC type identification and handling Jiacheng Ye
2026-10-10 14:45 ` [PATCH v1 11/17] net/hinic3: add device kvargs parameters support Jiacheng Ye
2026-10-10 14:45 ` [PATCH v1 12/17] net/hinic3: add compact CQE Rx path and ptype table Jiacheng Ye
2026-10-10 14:45 ` [PATCH v1 13/17] net/hinic3: expand TSO from 127 to 255 segments Jiacheng Ye
2026-10-10 14:45 ` [PATCH v1 14/17] net/hinic3: split Tx burst function for compact CQE support Jiacheng Ye
2026-10-10 14:45 ` [PATCH v1 15/17] net/hinic3: add pseudo-header checksum calculation Jiacheng Ye
2026-10-10 14:45 ` [PATCH v1 16/17] net/hinic3: add per-tile prefetch/drop/CEQ cmdq ops Jiacheng Ye
2026-10-10 14:45 ` [PATCH v1 17/17] net/hinic3: add mbox count telemetry support Jiacheng Ye
2026-10-10 18:30 ` [PATCH v1 00/17] net/hinic3: add PMD features and fixes Stephen Hemminger
2026-10-14 14:39 ` jiachengye_123
2026-10-14 15:08 ` [PATCH v2 00/26] " Jiacheng Ye
2026-10-14 15:08 ` [PATCH v2 01/26] net/hinic3: fix SP230 VF PCI device ID Jiacheng Ye
2026-10-14 15:08 ` [PATCH v2 02/26] net/hinic3: fix double removal in ethertype flow destroy Jiacheng Ye
2026-10-14 15:08 ` [PATCH v2 03/26] net/hinic3: fix VXLAN VNI spec and mask write Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 04/26] net/hinic3: fix vport enable null dereference Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 05/26] net/hinic3: attach ethdev and set ops in secondary process Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 06/26] net/hinic3: add NIC type identification Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 07/26] net/hinic3: fix offload and cmdq/compact CQE config Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 08/26] net/hinic3: add CIR drop statistics and VF LAG support Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 09/26] net/hinic3: add FEC mode get/set and capability support Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 10/26] net/hinic3: add mbox message recording and debug dump Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 11/26] net/hinic3: add COS mask and COS map support Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 12/26] net/hinic3: add VF link state and promiscuous support Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 13/26] net/hinic3: convert cmdq ops to static global variables Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 14/26] net/hinic3: update RSS hash type configuration Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 15/26] net/hinic3: refactor flow rule parsing Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 16/26] net/hinic3: add SP560 NIC type identification and handling Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 17/26] net/hinic3: add device kvargs parameters support Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 18/26] net/hinic3: add compact CQE Rx path and ptype table Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 19/26] net/hinic3: expand TSO from 127 to 255 segments Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 20/26] net/hinic3: split Tx burst function for compact CQE support Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 21/26] net/hinic3: ensure queue depth and state consistency Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 22/26] net/hinic3: add SP230 VF software statistics Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 23/26] net/hinic3: add Tx burst mode get Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 24/26] net/hinic3: expose Tx queue copied-mbuf statistics Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 25/26] net/hinic3: add pseudo-header checksum calculation Jiacheng Ye
2026-10-14 15:09 ` [PATCH v2 26/26] net/hinic3: add per-tile prefetch/drop/CEQ cmdq ops Jiacheng Ye
2026-10-14 17:13 ` [PATCH v2 00/26] net/hinic3: add PMD features and fixes Stephen Hemminger
2026-10-19 15:19 ` [PATCH v3 00/27] " Jiacheng Ye
2026-10-19 15:19 ` [PATCH 01/27] net/hinic3: fix SP230 VF PCI device ID Jiacheng Ye
2026-10-19 15:19 ` [PATCH 02/27] net/hinic3: fix double removal in ethertype flow destroy Jiacheng Ye
2026-10-19 15:19 ` [PATCH 03/27] net/hinic3: fix TCAM index leak on ethertype flow set Jiacheng Ye
2026-10-19 15:19 ` [PATCH 04/27] net/hinic3: fix VXLAN VNI spec and mask write Jiacheng Ye
2026-10-19 15:19 ` [PATCH 05/27] net/hinic3: fix vport enable null dereference Jiacheng Ye
2026-10-19 15:19 ` [PATCH 06/27] net/hinic3: attach ethdev and set ops in secondary process Jiacheng Ye
2026-10-19 15:19 ` [PATCH 07/27] net/hinic3: add NIC type identification Jiacheng Ye
2026-10-19 15:19 ` [PATCH 08/27] net/hinic3: add SP230 Rx queue interrupt handling Jiacheng Ye
2026-10-19 15:19 ` [PATCH 09/27] net/hinic3: fix offload and cmdq/compact CQE config Jiacheng Ye
2026-10-19 15:19 ` [PATCH 10/27] net/hinic3: add CIR drop statistics and VF LAG support Jiacheng Ye
2026-10-19 15:19 ` [PATCH 11/27] net/hinic3: add FEC mode get/set and capability support Jiacheng Ye
2026-10-19 15:19 ` [PATCH 12/27] net/hinic3: add mbox message recording and debug dump Jiacheng Ye
2026-10-19 15:19 ` [PATCH 13/27] net/hinic3: add COS mask and COS map support Jiacheng Ye
2026-10-19 15:19 ` [PATCH 14/27] net/hinic3: add VF link state and promiscuous support Jiacheng Ye
2026-10-19 15:19 ` [PATCH 15/27] net/hinic3: convert cmdq ops to static global variables Jiacheng Ye
2026-10-19 15:19 ` [PATCH 16/27] net/hinic3: update RSS hash type configuration Jiacheng Ye
2026-10-19 15:19 ` [PATCH 17/27] net/hinic3: refactor flow rule parsing Jiacheng Ye
2026-10-19 15:19 ` [PATCH 18/27] net/hinic3: add SP560 NIC type identification and handling Jiacheng Ye
2026-10-19 15:19 ` [PATCH 19/27] net/hinic3: add device kvargs parameters support Jiacheng Ye
2026-10-19 15:19 ` [PATCH 20/27] net/hinic3: add compact CQE Rx path and ptype table Jiacheng Ye
2026-10-19 15:19 ` [PATCH 21/27] net/hinic3: expand TSO from 127 to 255 segments Jiacheng Ye
2026-10-19 15:19 ` [PATCH 22/27] net/hinic3: split Tx burst function for compact CQE support Jiacheng Ye
2026-10-19 15:19 ` [PATCH 23/27] net/hinic3: ensure queue depth and state consistency Jiacheng Ye
2026-10-19 15:19 ` [PATCH 24/27] net/hinic3: add SP230 VF software statistics Jiacheng Ye
2026-10-19 15:19 ` [PATCH 25/27] net/hinic3: add Tx burst mode get Jiacheng Ye
2026-10-19 15:19 ` [PATCH 26/27] net/hinic3: expose Tx queue copied-mbuf statistics Jiacheng Ye
2026-10-19 15:19 ` [PATCH 27/27] net/hinic3: add pseudo-header checksum calculation Jiacheng Ye
2026-10-19 16:52 ` [PATCH v3 00/27] net/hinic3: add PMD features and fixes Stephen Hemminger
2026-10-23 15:56 ` jiachengye_123
2026-10-23 15:57 ` [PATCH v4 " Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 01/27] net/hinic3: fix SP230 VF PCI device ID Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 02/27] net/hinic3: fix double removal in ethertype flow destroy Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 03/27] net/hinic3: fix TCAM index leak on ethertype flow set Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 04/27] net/hinic3: fix VXLAN VNI spec and mask write Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 05/27] net/hinic3: fix vport enable null dereference Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 06/27] net/hinic3: attach ethdev and set ops in secondary process Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 07/27] net/hinic3: add NIC type identification Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 08/27] net/hinic3: fix pseudo-header checksum calculation Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 09/27] net/hinic3: add SP230 Rx queue interrupt handling Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 10/27] net/hinic3: fix offload and cmdq/compact CQE config Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 11/27] net/hinic3: add CIR drop statistics and VF LAG support Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 12/27] net/hinic3: add FEC mode get/set and capability support Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 13/27] net/hinic3: add mbox message recording and debug dump Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 14/27] net/hinic3: add COS mask and COS map support Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 15/27] net/hinic3: add VF link state and promiscuous support Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 16/27] net/hinic3: convert cmdq ops to static global variables Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 17/27] net/hinic3: update RSS hash type configuration Jiacheng Ye
2026-10-23 15:57 ` [PATCH v4 18/27] net/hinic3: refactor flow rule parsing Jiacheng Ye
2026-10-23 15:58 ` [PATCH v4 19/27] net/hinic3: add SP560 NIC type identification and handling Jiacheng Ye
2026-10-23 15:58 ` [PATCH v4 20/27] net/hinic3: add device kvargs parameters support Jiacheng Ye
2026-10-23 15:58 ` [PATCH v4 21/27] net/hinic3: add compact CQE Rx path and ptype table Jiacheng Ye
2026-10-23 15:58 ` [PATCH v4 22/27] net/hinic3: ensure queue depth and state consistency Jiacheng Ye
2026-10-23 15:58 ` [PATCH v4 23/27] net/hinic3: expand TSO from 127 to 255 segments Jiacheng Ye
2026-10-23 15:58 ` [PATCH v4 24/27] net/hinic3: split Tx burst function for compact CQE support Jiacheng Ye
2026-10-23 15:58 ` [PATCH v4 25/27] net/hinic3: add SP230 VF software statistics Jiacheng Ye
2026-10-23 15:58 ` Jiacheng Ye [this message]
2026-10-23 15:58 ` [PATCH v4 27/27] net/hinic3: expose Tx queue copied-mbuf statistics Jiacheng Ye
2026-10-23 16:21 ` [PATCH v4 00/27] net/hinic3: add PMD features and fixes Stephen Hemminger
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=20261023155809.855-27-yejiacheng4@h-partners.com \
--to=yejiacheng4@h-partners.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
--cc=wangfeifei40@huawei.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