[V3] net/qede: reduce the optimization level for gcc > 11
Thierry Herbelot
thierry.herbelot at 6wind.com
Wed Sep 10 08:49:38 CEST 2025
Hello Stephen,
On 9/9/25 18:17, Stephen Hemminger wrote:
> 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();
> }
>
I just checked with this patch, but the error is still present:
testpmd> show fwd stats all
---------------------- Forward statistics for port 0
----------------------
RX-packets: 0 RX-dropped: 10 RX-total: 10
RX-error: 0
RX-nombufs: 10
TX-packets: 0 TX-dropped: 0 TX-total: 0
----------------------------------------------------------------------------
The error chain is:
RX-nombufs
=> (testpmd) stats.rx_nombuf
=> (qede) p_stats->common.no_buff_discards
=> (qede/base) HILO_64_REGPAIR(mstats.no_buff_discard)
(internal to the NIC)
Best regards
Thierry
>
>
>
--
Thierry Herbelot
More information about the dev
mailing list