patch 'net/iavf: fix scalar Rx path zero-length segment' has been queued to stable release 24.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jul 6 12:20:24 CEST 2026
Hi,
FYI, your patch has been queued to stable release 24.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/05/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f627741c762bd9c82f017b6744d74e6c92d038dd
Thanks.
Luca Boccassi
---
>From f627741c762bd9c82f017b6744d74e6c92d038dd Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus at intel.com>
Date: Fri, 12 Jun 2026 14:35:31 +0000
Subject: [PATCH] net/iavf: fix scalar Rx path zero-length segment
[ upstream commit 9b2eb4d0640ac16990452614cd5d397254484c62 ]
When hardware CRC stripping is active, a frame whose on-wire size is an
exact multiple of the Rx buffer size can cause the NIC to fill the final
data descriptor and place the four CRC bytes into a separate trailing
descriptor. After hardware stripping, that descriptor carries zero bytes
of payload.
The existing CRC cleanup code only handles a zero-length trailing segment
when software CRC stripping is enabled. When hardware stripping is
active, the zero-length mbuf is silently chained to the reassembled
packet. Forwarding such a packet causes a zero-length Tx descriptor,
triggering a Malicious Driver Detection event on the PF and resetting
the VF.
Fix by adding logic to detect a zero-length final segment when hardware
CRC stripping is active, and freeing it.
Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx")
Fixes: b8b4c54ef9b0 ("net/iavf: support flexible Rx descriptor in normal path")
Signed-off-by: Declan Doherty <declan.doherty at intel.com>
Signed-off-by: Ciara Loftus <ciara.loftus at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 4e7b49fb85..cccaf418a3 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -1759,6 +1759,14 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
rxm->data_len = (uint16_t)(rx_packet_len -
RTE_ETHER_CRC_LEN);
}
+ } else if (unlikely(rx_packet_len == 0)) {
+ /*
+ * NIC split CRC bytes into a trailing segment which is
+ * now empty after hardware CRC stripping. Free it.
+ */
+ rte_pktmbuf_free_seg(rxm);
+ first_seg->nb_segs--;
+ last_seg->next = NULL;
}
first_seg->port = rxq->port_id;
@@ -1927,6 +1935,14 @@ iavf_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
} else
rxm->data_len = (uint16_t)(rx_packet_len -
RTE_ETHER_CRC_LEN);
+ } else if (unlikely(rx_packet_len == 0)) {
+ /*
+ * NIC split CRC bytes into a trailing segment which is
+ * now empty after hardware CRC stripping. Free it.
+ */
+ rte_pktmbuf_free_seg(rxm);
+ first_seg->nb_segs--;
+ last_seg->next = NULL;
}
first_seg->port = rxq->port_id;
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-07-03 12:55:47.914280595 +0100
+++ 0032-net-iavf-fix-scalar-Rx-path-zero-length-segment.patch 2026-07-03 12:55:46.642573248 +0100
@@ -1 +1 @@
-From 9b2eb4d0640ac16990452614cd5d397254484c62 Mon Sep 17 00:00:00 2001
+From f627741c762bd9c82f017b6744d74e6c92d038dd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9b2eb4d0640ac16990452614cd5d397254484c62 ]
+
@@ -24 +25,0 @@
-Cc: stable at dpdk.org
@@ -30 +31 @@
- drivers/net/intel/iavf/iavf_rxtx.c | 16 ++++++++++++++++
+ drivers/net/iavf/iavf_rxtx.c | 16 ++++++++++++++++
@@ -33,5 +34,5 @@
-diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
-index a57af7faed..86ebb2618d 100644
---- a/drivers/net/intel/iavf/iavf_rxtx.c
-+++ b/drivers/net/intel/iavf/iavf_rxtx.c
-@@ -1716,6 +1716,14 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
+diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
+index 4e7b49fb85..cccaf418a3 100644
+--- a/drivers/net/iavf/iavf_rxtx.c
++++ b/drivers/net/iavf/iavf_rxtx.c
+@@ -1759,6 +1759,14 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -52 +53 @@
-@@ -1884,6 +1892,14 @@ iavf_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -1927,6 +1935,14 @@ iavf_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
More information about the stable
mailing list