* [PATCH] net/e1000: support Rx/Tx burst mode info
@ 2025-04-16 17:30 Roger Melton
0 siblings, 0 replies; only message in thread
From: Roger Melton @ 2025-04-16 17:30 UTC (permalink / raw)
To: dev; +Cc: Roger Melton
Return burst mode according to the selected Rx/Tx burst
function name.
Update 25.07 release notes with this information.
Signed-off-by: Roger Melton <rmelton@cisco.com>
---
doc/guides/rel_notes/release_25_07.rst | 3 ++
drivers/net/intel/e1000/igb_ethdev.c | 64 ++++++++++++++++++++++++++
2 files changed, 67 insertions(+)
diff --git a/doc/guides/rel_notes/release_25_07.rst b/doc/guides/rel_notes/release_25_07.rst
index 093b85d206..794ebbee5e 100644
--- a/doc/guides/rel_notes/release_25_07.rst
+++ b/doc/guides/rel_notes/release_25_07.rst
@@ -55,6 +55,9 @@ New Features
Also, make sure to start the actual text at the margin.
=======================================================
+* **Updated Intel e1000 driver.**
+
+ * Added support for rx_burst_mode_get and tx_burst_mode_get.
Removed Items
-------------
diff --git a/drivers/net/intel/e1000/igb_ethdev.c b/drivers/net/intel/e1000/igb_ethdev.c
index cbd2f15f5f..7250e99af1 100644
--- a/drivers/net/intel/e1000/igb_ethdev.c
+++ b/drivers/net/intel/e1000/igb_ethdev.c
@@ -237,6 +237,10 @@ static void eth_igb_configure_msix_intr(struct rte_eth_dev *dev);
static void eth_igbvf_interrupt_handler(void *param);
static void igbvf_mbx_process(struct rte_eth_dev *dev);
static int igb_filter_restore(struct rte_eth_dev *dev);
+static int igb_tx_burst_mode_get(struct rte_eth_dev *dev,
+ __rte_unused uint16_t queue_id, struct rte_eth_burst_mode *mode);
+static int igb_rx_burst_mode_get(struct rte_eth_dev *dev,
+ __rte_unused uint16_t queue_id, struct rte_eth_burst_mode *mode);
/*
* Define VF Stats MACRO for Non "cleared on read" register
@@ -367,6 +371,8 @@ static const struct eth_dev_ops eth_igb_ops = {
.tx_queue_setup = eth_igb_tx_queue_setup,
.tx_queue_release = eth_igb_tx_queue_release,
.tx_done_cleanup = eth_igb_tx_done_cleanup,
+ .rx_burst_mode_get = igb_rx_burst_mode_get,
+ .tx_burst_mode_get = igb_tx_burst_mode_get,
.dev_led_on = eth_igb_led_on,
.dev_led_off = eth_igb_led_off,
.flow_ctrl_get = eth_igb_flow_ctrl_get,
@@ -425,6 +431,8 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = {
.tx_queue_setup = eth_igb_tx_queue_setup,
.tx_queue_release = eth_igb_tx_queue_release,
.tx_done_cleanup = eth_igb_tx_done_cleanup,
+ .rx_burst_mode_get = igb_rx_burst_mode_get,
+ .tx_burst_mode_get = igb_tx_burst_mode_get,
.set_mc_addr_list = eth_igb_set_mc_addr_list,
.rxq_info_get = igb_rxq_info_get,
.txq_info_get = igb_txq_info_get,
@@ -715,6 +723,62 @@ static int igb_flex_filter_uninit(struct rte_eth_dev *eth_dev)
return 0;
}
+static const struct {
+ eth_tx_burst_t pkt_burst;
+ const char *info;
+} igb_tx_burst_info[] = {
+ { eth_igb_xmit_pkts, "Scalar igb"},
+ { eth_em_xmit_pkts, "Scalar em"},
+};
+
+int
+igb_tx_burst_mode_get(struct rte_eth_dev *dev,
+ __rte_unused uint16_t queue_id,
+ struct rte_eth_burst_mode *mode)
+{
+ eth_tx_burst_t pkt_burst = dev->tx_pkt_burst;
+ size_t i;
+
+ for (i = 0; i < RTE_DIM(igb_tx_burst_info); i++) {
+ if (pkt_burst == igb_tx_burst_info[i].pkt_burst) {
+ snprintf(mode->info, sizeof(mode->info), "%s",
+ igb_tx_burst_info[i].info);
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+static const struct {
+ eth_rx_burst_t pkt_burst;
+ const char *info;
+} igb_rx_burst_info[] = {
+ { eth_igb_recv_pkts, "Scalar igb"},
+ { eth_igb_recv_scattered_pkts, "Scalar igb scattered"},
+ { eth_em_recv_pkts, "Scalar em"},
+ { eth_em_recv_scattered_pkts, "Scalar em scattered"},
+};
+
+int
+igb_rx_burst_mode_get(struct rte_eth_dev *dev,
+ __rte_unused uint16_t queue_id,
+ struct rte_eth_burst_mode *mode)
+{
+ eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;
+ size_t i;
+
+ for (i = 0; i < RTE_DIM(igb_rx_burst_info); i++) {
+ if (pkt_burst == igb_rx_burst_info[i].pkt_burst) {
+ snprintf(mode->info, sizeof(mode->info), "%s",
+ igb_rx_burst_info[i].info);
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
static int
eth_igb_dev_init(struct rte_eth_dev *eth_dev)
{
--
2.35.6
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-16 17:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-16 17:30 [PATCH] net/e1000: support Rx/Tx burst mode info Roger Melton
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).