patch 'net/gve: enforce DQO Tx packet length limits' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:04:12 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b3c8a64a33e041c2d5082296f1092e660a5dcce8
Thanks.
Kevin
---
>From b3c8a64a33e041c2d5082296f1092e660a5dcce8 Mon Sep 17 00:00:00 2001
From: Tathagat Priyadarshi <tathagat.dpdk at gmail.com>
Date: Fri, 16 Oct 2026 17:45:44 +0000
Subject: [PATCH] net/gve: enforce DQO Tx packet length limits
[ upstream commit d256429276d47b78eb404ed5082d4e22992f593a ]
The device requires non-TSO packets to be 17 to 9728 bytes long, as
noted in the Linux driver, but packets of any length are posted. The
device treats an out-of-range packet as coming from a malicious
driver: it drops the packet and disables the datapath, stalling all
queues.
Drop such packets in the driver and count them in a new invalid_pkts
counter.
Fixes: 4022f9999f56 ("net/gve: support basic Tx data path for DQO")
Signed-off-by: Tathagat Priyadarshi <tathagat.dpdk at gmail.com>
---
drivers/net/gve/base/gve_desc_dqo.h | 2 ++
drivers/net/gve/gve_ethdev.c | 1 +
drivers/net/gve/gve_ethdev.h | 1 +
drivers/net/gve/gve_tx_dqo.c | 17 +++++++++++++++++
4 files changed, 21 insertions(+)
diff --git a/drivers/net/gve/base/gve_desc_dqo.h b/drivers/net/gve/base/gve_desc_dqo.h
index 71d9d60bb9..967cbf29f6 100644
--- a/drivers/net/gve/base/gve_desc_dqo.h
+++ b/drivers/net/gve/base/gve_desc_dqo.h
@@ -13,4 +13,6 @@
#define GVE_TX_MAX_HDR_SIZE_DQO 255
#define GVE_TX_MIN_TSO_MSS_DQO 88
+#define GVE_TX_MIN_PKT_SIZE_DQO 17
+#define GVE_TX_MAX_PKT_SIZE_DQO 9728
/* Basic TX descriptor (DTYPE 0x0C) */
diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c
index 964eca0041..37208b7293 100644
--- a/drivers/net/gve/gve_ethdev.c
+++ b/drivers/net/gve/gve_ethdev.c
@@ -768,4 +768,5 @@ static const struct gve_xstats_name_offset tx_xstats_name_offset[] = {
{ "too_many_descs", TX_QUEUE_STATS_OFFSET(too_many_descs) },
{ "invalid_mbufs", TX_QUEUE_STATS_OFFSET(invalid_mbufs) },
+ { "invalid_pkts", TX_QUEUE_STATS_OFFSET(invalid_pkts) },
};
diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.h
index 319e67645f..db69ac1293 100644
--- a/drivers/net/gve/gve_ethdev.h
+++ b/drivers/net/gve/gve_ethdev.h
@@ -106,4 +106,5 @@ struct gve_tx_stats {
uint64_t too_many_descs;
uint64_t invalid_mbufs;
+ uint64_t invalid_pkts;
};
diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c
index 29cc669a28..3d98f4bf38 100644
--- a/drivers/net/gve/gve_tx_dqo.c
+++ b/drivers/net/gve/gve_tx_dqo.c
@@ -127,4 +127,15 @@ gve_tx_clean_descs_dqo(struct gve_tx_queue *txq, uint16_t nb_descs) {
}
+/* Validate packet lengths against the device limits. */
+static inline bool
+gve_tx_validate_pkt(const struct rte_mbuf *tx_pkt, bool is_tso)
+{
+ if (!is_tso)
+ return tx_pkt->pkt_len >= GVE_TX_MIN_PKT_SIZE_DQO &&
+ tx_pkt->pkt_len <= GVE_TX_MAX_PKT_SIZE_DQO;
+
+ return true;
+}
+
/* Max descriptors a single packet may use. A larger packet can never pass
* gve_can_tx(): one slot is always reserved, the cacheline overlap margin
@@ -310,4 +321,10 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
csum = !!(ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK_DQO);
+ if (!gve_tx_validate_pkt(tx_pkt, tso)) {
+ txq->stats.invalid_pkts++;
+ rte_pktmbuf_free(tx_pkt);
+ continue;
+ }
+
nb_descs = gve_tx_pkt_nb_data_descs(tx_pkt);
nb_descs += tso;
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:48.412647309 +0000
+++ 0326-net-gve-enforce-DQO-Tx-packet-length-limits.patch 2026-12-03 12:52:39.249217780 +0000
@@ -1 +1 @@
-From d256429276d47b78eb404ed5082d4e22992f593a Mon Sep 17 00:00:00 2001
+From b3c8a64a33e041c2d5082296f1092e660a5dcce8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d256429276d47b78eb404ed5082d4e22992f593a ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index c1534959c2..d50d88765e 100644
+index 71d9d60bb9..967cbf29f6 100644
@@ -38 +39 @@
-index 1dfbe8f396..53b0a0ec63 100644
+index 964eca0041..37208b7293 100644
@@ -41 +42 @@
-@@ -1045,4 +1045,5 @@ static const struct gve_xstats_name_offset tx_xstats_name_offset[] = {
+@@ -768,4 +768,5 @@ static const struct gve_xstats_name_offset tx_xstats_name_offset[] = {
@@ -48 +49 @@
-index 66cb31dadb..be744d955b 100644
+index 319e67645f..db69ac1293 100644
@@ -51 +52 @@
-@@ -116,4 +116,5 @@ struct gve_tx_stats {
+@@ -106,4 +106,5 @@ struct gve_tx_stats {
@@ -58 +59 @@
-index 46a03d482d..f686a8c110 100644
+index 29cc669a28..3d98f4bf38 100644
@@ -61 +62 @@
-@@ -124,4 +124,15 @@ gve_tx_clean_descs_dqo(struct gve_tx_queue *txq, uint16_t nb_descs) {
+@@ -127,4 +127,15 @@ gve_tx_clean_descs_dqo(struct gve_tx_queue *txq, uint16_t nb_descs) {
@@ -77 +78 @@
-@@ -307,4 +318,10 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -310,4 +321,10 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
More information about the stable
mailing list