From: Joshua Washington <joshwash@google.com>
To: stable@dpdk.org, Junfeng Guo <junfengg@nvidia.com>,
Jeroen de Borst <jeroendb@google.com>,
Rushil Gupta <rushilg@google.com>,
Joshua Washington <joshwash@google.com>
Cc: Ankit Garg <nktgrg@google.com>
Subject: [PATCH 23.11 3/3] net/gve: add DQO Tx descriptor limit
Date: Tue, 23 Dec 2025 14:30:49 -0800 [thread overview]
Message-ID: <20251223223050.3870080-3-joshwash@google.com> (raw)
In-Reply-To: <20251223223050.3870080-1-joshwash@google.com>
The hardware supports at most 10 data descriptors per MTU-sized segment.
GVE_TX_MAX_DATA_DESCS was defined in the initial implmenentation, but
the descriptor limit was never actually enforced.
Fixes: 4022f9999f56 ("net/gve: support basic Tx data path for DQO")
Cc: stable@dpdk.org
Signed-off-by: Joshua Washington <joshwash@google.com>
Reviewed-by: Ankit Garg <nktgrg@google.com>
---
drivers/net/gve/gve_ethdev.c | 1 +
drivers/net/gve/gve_ethdev.h | 1 +
drivers/net/gve/gve_tx_dqo.c | 6 ++++++
3 files changed, 8 insertions(+)
diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c
index 2dc47c1226..c0df116b1b 100644
--- a/drivers/net/gve/gve_ethdev.c
+++ b/drivers/net/gve/gve_ethdev.c
@@ -450,6 +450,7 @@ gve_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
.nb_max = gve_is_gqi(priv) ? priv->tx_desc_cnt : GVE_MAX_QUEUE_SIZE_DQO,
.nb_min = priv->tx_desc_cnt,
.nb_align = 1,
+ .nb_mtu_seg_max = GVE_TX_MAX_DATA_DESCS,
};
return 0;
diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.h
index e145d6b639..2d916a40a2 100644
--- a/drivers/net/gve/gve_ethdev.h
+++ b/drivers/net/gve/gve_ethdev.h
@@ -82,6 +82,7 @@ struct gve_tx_stats {
uint64_t packets;
uint64_t bytes;
uint64_t errors;
+ uint64_t too_many_descs;
};
struct gve_rx_stats {
diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c
index 8e75e4d570..96b4ef01bb 100644
--- a/drivers/net/gve/gve_tx_dqo.c
+++ b/drivers/net/gve/gve_tx_dqo.c
@@ -154,6 +154,12 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
break;
}
+ /* Drop packet if it doesn't adhere to hardware limits. */
+ if (nb_descs > GVE_TX_MAX_DATA_DESCS) {
+ txq->stats.too_many_descs++;
+ break;
+ }
+
do {
if (sw_ring[sw_id] != NULL)
PMD_DRV_LOG(DEBUG, "Overwriting an entry in sw_ring");
--
2.52.0.351.gbe84eed79e-goog
prev parent reply other threads:[~2025-12-23 22:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-23 22:30 [PATCH 23.11 1/3] net/gve: send whole packet when mbuf is large Joshua Washington
2025-12-23 22:30 ` [PATCH 23.11 2/3] net/gve: clean when insufficient Tx descriptors Joshua Washington
2025-12-23 22:30 ` Joshua Washington [this message]
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=20251223223050.3870080-3-joshwash@google.com \
--to=joshwash@google.com \
--cc=jeroendb@google.com \
--cc=junfengg@nvidia.com \
--cc=nktgrg@google.com \
--cc=rushilg@google.com \
--cc=stable@dpdk.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).