[V3] net/qede: reduce the optimization level for gcc > 11
Stephen Hemminger
stephen at networkplumber.org
Tue Sep 9 18:17:24 CEST 2025
On Tue, 9 Sep 2025 07:40:23 +0200
Thierry Herbelot <thierry.herbelot at 6wind.com> wrote:
> The qede PMD stopped working under Ubuntu-24.04 (using gcc-13) when
> compiled with -O3 (default level for all DPDK code). A bug is opened
> for this issue (see Link). The same issue is also seen with gcc-12
> and gcc-14. The issue is not seen with clang-20.
>
> A first workaround is to just disable all optimizations (-O0), which
> restores packet Rx with Qlogic NICs. However, the performance impact
> is not acceptable (around 50% drop).
>
> A better compromise is to use -O1 for the qede PMD:
> - there is some perf impact,
> - but the PMD is working as expected (packets are correctly received).
>
> When compiling with both -O2 and -O3 and gcc > 11, there is no packet
> reception when using the qede PMD. The root cause could be missing
> 'volatile' keywords or missing memory barriers in the qede PMD code.
>
> Link: https://bugs.dpdk.org/show_bug.cgi?id=1379
> Signed-off-by: Thierry Herbelot <thierry.herbelot at 6wind.com>
Which rx_burst gets used on that hardware?
Is there any indication of errors (like rx_mbuf_alloc_failed) in the stats.
The driver does not appear to have any write barrier after updating the consumed packets.
Would this help?
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 25e28fd9f6..1b5109d966 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -1295,6 +1295,8 @@ static inline void qede_rx_bd_ring_consume(struct qede_rx_queue *rxq)
{
ecore_chain_consume(&rxq->rx_bd_ring);
rxq->sw_rx_cons++;
+
+ rte_wmb();
}
More information about the dev
mailing list