* [PATCH] net/intel/e1000: reduce the optimization level for gcc > 11
@ 2025-10-06 12:45 Thierry Herbelot
2025-10-06 12:55 ` David Marchand
2025-10-06 13:02 ` [V2] " Thierry Herbelot
0 siblings, 2 replies; 10+ messages in thread
From: Thierry Herbelot @ 2025-10-06 12:45 UTC (permalink / raw)
To: dev
Cc: Thierry Herbelot, Thomas Monjalon, Bruce Richardson,
David Marchand, Stephen Hemminger, Olivier Matz
The e1000 PMD stopped working under Ubuntu-24.04 (using gcc-13) when
compiled with -O3 (default level for all DPDK code). There is a crash
when starting testpmd:
(gdb) bt
#0 rte_read32_relaxed (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:290
#1 rte_read32 (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:345
#2 e1000_read_addr (addr=0x1100800e00) at ../sources/drivers/net/intel/e1000/base/e1000_osdep.h:106
#3 e1000_id_led_init_generic (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/base/e1000_mac.c:1844
#4 0x000062aaf653c85f in e1000_init_hw_82540 (hw=0x1586788c0)
at ../sources/drivers/net/intel/e1000/base/e1000_82540.c:308
#5 0x000062aaf6db8227 in em_hardware_init (hw=hw@entry=0x1586788c0)
at ../sources/drivers/net/intel/e1000/em_ethdev.c:920
#6 0x000062aaf65340ff in em_hw_init (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/em_ethdev.c:445
#7 eth_em_dev_init (eth_dev=eth_dev@entry=0x62aaff346000 <rte_eth_devices>)
at ../sources/drivers/net/intel/e1000/em_ethdev.c:314
#8 0x000062aaf6db8b71 in rte_eth_dev_pci_generic_probe (private_data_size=11240,
dev_init=0x62aaf6db8310 <eth_em_dev_init>, pci_dev=0x62ab2853dd90) at ../sources/lib/ethdev/ethdev_pci.h:150
#9 eth_em_pci_probe (pci_drv=<optimized out>, pci_dev=0x62ab2853dd90)
at ../sources/drivers/net/intel/e1000/em_ethdev.c:365
#10 0x000062aaf646adf5 in rte_pci_probe_one_driver (dr=dr@entry=0x62aaf82d8020 <rte_em_pmd>,
dev=dev@entry=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:299
#11 0x000062aaf6a15f7d in pci_probe_all_drivers (dev=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:383
#12 pci_probe () at ../sources/drivers/bus/pci/pci_common.c:410
#13 0x000062aaf7a485f3 in rte_bus_probe () at ../sources/lib/eal/common/eal_common_bus.c:84
#14 0x000062aaf670585d in rte_eal_init (argc=argc@entry=146, argv=argv@entry=0x7fffca468898)
at ../sources/lib/eal/linux/eal.c:1253
The crash is linked to the use of gcc-13: uner Ubuntu-24.04 testpmd
compiled with gcc-11 from the same DPDK tree works as expected.
The perfect solution would be for someone to investigate why the
PMD crashes. However, this depends on Maintainer availability.
A less-perfect solution is to reduce the optimization level
(like another proposal for net/qede: see Link).
Note: if more regressions are seen in less-frequently used PMDs,
maybe we should switch the default optimization level to -O1,
(tree-wide) and only rise the optimization level for actively
maintained PMDs, which are proven to work as expected with
higher optimization levels.
Link: http://patches.dpdk.org/project/dpdk/patch/20250909054023.3263401-1-thierry.herbelot@6wind.com/
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
drivers/net/intel/e1000/base/meson.build | 4 ++++
drivers/net/intel/e1000/meson.build | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/drivers/net/intel/e1000/base/meson.build b/drivers/net/intel/e1000/base/meson.build
index 4fe86dc6df34..e3631f1adc27 100644
--- a/drivers/net/intel/e1000/base/meson.build
+++ b/drivers/net/intel/e1000/base/meson.build
@@ -22,3 +22,7 @@ base_sources = files(
'e1000_phy.c',
'e1000_vf.c',
)
+# testpmd crashes with gcc > 11 with compiling with default -O3 or -O2
+if (cc.get_id() == 'gcc' and cc.version().version_compare('>=12.0'))
+ base_cflags += '-O1'
+endif
diff --git a/drivers/net/intel/e1000/meson.build b/drivers/net/intel/e1000/meson.build
index 924fe4ecaef5..3a875d1555c2 100644
--- a/drivers/net/intel/e1000/meson.build
+++ b/drivers/net/intel/e1000/meson.build
@@ -23,3 +23,8 @@ if not is_windows
'igc_txrx.c',
)
endif
+
+# testpmd crashes with gcc > 11 with compiling with default -O3 or -O2
+if (cc.get_id() == 'gcc' and cc.version().version_compare('>=12.0'))
+ cflags += '-O1'
+endif
--
2.39.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] net/intel/e1000: reduce the optimization level for gcc > 11
2025-10-06 12:45 [PATCH] net/intel/e1000: reduce the optimization level for gcc > 11 Thierry Herbelot
@ 2025-10-06 12:55 ` David Marchand
2025-10-06 13:01 ` Thierry Herbelot
2025-10-06 13:02 ` [V2] " Thierry Herbelot
1 sibling, 1 reply; 10+ messages in thread
From: David Marchand @ 2025-10-06 12:55 UTC (permalink / raw)
To: Thierry Herbelot
Cc: dev, Thomas Monjalon, Bruce Richardson, Stephen Hemminger, Olivier Matz
On Mon, 6 Oct 2025 at 14:45, Thierry Herbelot
<thierry.herbelot@6wind.com> wrote:
>
> The e1000 PMD stopped working under Ubuntu-24.04 (using gcc-13) when
> compiled with -O3 (default level for all DPDK code). There is a crash
> when starting testpmd:
>
> (gdb) bt
> #0 rte_read32_relaxed (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:290
> #1 rte_read32 (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:345
> #2 e1000_read_addr (addr=0x1100800e00) at ../sources/drivers/net/intel/e1000/base/e1000_osdep.h:106
> #3 e1000_id_led_init_generic (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/base/e1000_mac.c:1844
> #4 0x000062aaf653c85f in e1000_init_hw_82540 (hw=0x1586788c0)
> at ../sources/drivers/net/intel/e1000/base/e1000_82540.c:308
> #5 0x000062aaf6db8227 in em_hardware_init (hw=hw@entry=0x1586788c0)
> at ../sources/drivers/net/intel/e1000/em_ethdev.c:920
> #6 0x000062aaf65340ff in em_hw_init (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/em_ethdev.c:445
> #7 eth_em_dev_init (eth_dev=eth_dev@entry=0x62aaff346000 <rte_eth_devices>)
> at ../sources/drivers/net/intel/e1000/em_ethdev.c:314
> #8 0x000062aaf6db8b71 in rte_eth_dev_pci_generic_probe (private_data_size=11240,
> dev_init=0x62aaf6db8310 <eth_em_dev_init>, pci_dev=0x62ab2853dd90) at ../sources/lib/ethdev/ethdev_pci.h:150
> #9 eth_em_pci_probe (pci_drv=<optimized out>, pci_dev=0x62ab2853dd90)
> at ../sources/drivers/net/intel/e1000/em_ethdev.c:365
> #10 0x000062aaf646adf5 in rte_pci_probe_one_driver (dr=dr@entry=0x62aaf82d8020 <rte_em_pmd>,
> dev=dev@entry=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:299
> #11 0x000062aaf6a15f7d in pci_probe_all_drivers (dev=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:383
> #12 pci_probe () at ../sources/drivers/bus/pci/pci_common.c:410
> #13 0x000062aaf7a485f3 in rte_bus_probe () at ../sources/lib/eal/common/eal_common_bus.c:84
> #14 0x000062aaf670585d in rte_eal_init (argc=argc@entry=146, argv=argv@entry=0x7fffca468898)
> at ../sources/lib/eal/linux/eal.c:1253
>
> The crash is linked to the use of gcc-13: uner Ubuntu-24.04 testpmd
> compiled with gcc-11 from the same DPDK tree works as expected.
>
> The perfect solution would be for someone to investigate why the
> PMD crashes. However, this depends on Maintainer availability.
>
> A less-perfect solution is to reduce the optimization level
> (like another proposal for net/qede: see Link).
>
> Note: if more regressions are seen in less-frequently used PMDs,
> maybe we should switch the default optimization level to -O1,
> (tree-wide) and only rise the optimization level for actively
> maintained PMDs, which are proven to work as expected with
> higher optimization levels.
>
> Link: http://patches.dpdk.org/project/dpdk/patch/20250909054023.3263401-1-thierry.herbelot@6wind.com/
> Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
NAK.
Please RCA this rather than hiding such an issue.
--
David Marchand
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] net/intel/e1000: reduce the optimization level for gcc > 11
2025-10-06 12:55 ` David Marchand
@ 2025-10-06 13:01 ` Thierry Herbelot
2025-10-06 13:03 ` David Marchand
0 siblings, 1 reply; 10+ messages in thread
From: Thierry Herbelot @ 2025-10-06 13:01 UTC (permalink / raw)
To: David Marchand
Cc: dev, Thomas Monjalon, Bruce Richardson, Stephen Hemminger, Olivier Matz
On 10/6/25 14:55, David Marchand wrote:
> On Mon, 6 Oct 2025 at 14:45, Thierry Herbelot
> <thierry.herbelot@6wind.com> wrote:
>>
>> The e1000 PMD stopped working under Ubuntu-24.04 (using gcc-13) when
>> compiled with -O3 (default level for all DPDK code). There is a crash
>> when starting testpmd:
>>
>> (gdb) bt
>> #0 rte_read32_relaxed (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:290
>> #1 rte_read32 (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:345
>> #2 e1000_read_addr (addr=0x1100800e00) at ../sources/drivers/net/intel/e1000/base/e1000_osdep.h:106
>> #3 e1000_id_led_init_generic (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/base/e1000_mac.c:1844
>> #4 0x000062aaf653c85f in e1000_init_hw_82540 (hw=0x1586788c0)
>> at ../sources/drivers/net/intel/e1000/base/e1000_82540.c:308
>> #5 0x000062aaf6db8227 in em_hardware_init (hw=hw@entry=0x1586788c0)
>> at ../sources/drivers/net/intel/e1000/em_ethdev.c:920
>> #6 0x000062aaf65340ff in em_hw_init (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/em_ethdev.c:445
>> #7 eth_em_dev_init (eth_dev=eth_dev@entry=0x62aaff346000 <rte_eth_devices>)
>> at ../sources/drivers/net/intel/e1000/em_ethdev.c:314
>> #8 0x000062aaf6db8b71 in rte_eth_dev_pci_generic_probe (private_data_size=11240,
>> dev_init=0x62aaf6db8310 <eth_em_dev_init>, pci_dev=0x62ab2853dd90) at ../sources/lib/ethdev/ethdev_pci.h:150
>> #9 eth_em_pci_probe (pci_drv=<optimized out>, pci_dev=0x62ab2853dd90)
>> at ../sources/drivers/net/intel/e1000/em_ethdev.c:365
>> #10 0x000062aaf646adf5 in rte_pci_probe_one_driver (dr=dr@entry=0x62aaf82d8020 <rte_em_pmd>,
>> dev=dev@entry=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:299
>> #11 0x000062aaf6a15f7d in pci_probe_all_drivers (dev=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:383
>> #12 pci_probe () at ../sources/drivers/bus/pci/pci_common.c:410
>> #13 0x000062aaf7a485f3 in rte_bus_probe () at ../sources/lib/eal/common/eal_common_bus.c:84
>> #14 0x000062aaf670585d in rte_eal_init (argc=argc@entry=146, argv=argv@entry=0x7fffca468898)
>> at ../sources/lib/eal/linux/eal.c:1253
>>
>> The crash is linked to the use of gcc-13: uner Ubuntu-24.04 testpmd
>> compiled with gcc-11 from the same DPDK tree works as expected.
>>
>> The perfect solution would be for someone to investigate why the
>> PMD crashes. However, this depends on Maintainer availability.
>>
>> A less-perfect solution is to reduce the optimization level
>> (like another proposal for net/qede: see Link).
>>
>> Note: if more regressions are seen in less-frequently used PMDs,
>> maybe we should switch the default optimization level to -O1,
>> (tree-wide) and only rise the optimization level for actively
>> maintained PMDs, which are proven to work as expected with
>> higher optimization levels.
>>
>> Link: http://patches.dpdk.org/project/dpdk/patch/20250909054023.3263401-1-thierry.herbelot@6wind.com/
>> Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
>
> NAK.
> Please RCA this rather than hiding such an issue.
Hello David,
As said in the commit log, this is clearly a Maintainer issue, who will
have the hardware documentation. The PMD is broken, and this was not
seen until a new gcc is used.
We can not expect a random developer to sprinkle memory barriers in the
PMD until testpmd seems to be working.
Best regards
Thierry
--
Thierry Herbelot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] net/intel/e1000: reduce the optimization level for gcc > 11
2025-10-06 13:01 ` Thierry Herbelot
@ 2025-10-06 13:03 ` David Marchand
0 siblings, 0 replies; 10+ messages in thread
From: David Marchand @ 2025-10-06 13:03 UTC (permalink / raw)
To: Thierry Herbelot
Cc: dev, Thomas Monjalon, Bruce Richardson, Stephen Hemminger, Olivier Matz
On Mon, 6 Oct 2025 at 15:01, Thierry Herbelot
<thierry.herbelot@6wind.com> wrote:
> We can not expect a random developer to sprinkle memory barriers in the
> PMD until testpmd seems to be working.
Then random developer can report the issue and keep from trying to
hide the issue which is not helping.
--
David Marchand
^ permalink raw reply [flat|nested] 10+ messages in thread
* [V2] net/intel/e1000: reduce the optimization level for gcc > 11
2025-10-06 12:45 [PATCH] net/intel/e1000: reduce the optimization level for gcc > 11 Thierry Herbelot
2025-10-06 12:55 ` David Marchand
@ 2025-10-06 13:02 ` Thierry Herbelot
2025-10-08 8:38 ` Bruce Richardson
2025-10-10 13:20 ` Bruce Richardson
1 sibling, 2 replies; 10+ messages in thread
From: Thierry Herbelot @ 2025-10-06 13:02 UTC (permalink / raw)
To: dev
Cc: Thierry Herbelot, Thomas Monjalon, Bruce Richardson,
David Marchand, Stephen Hemminger, Olivier Matz
The e1000 PMD stopped working under Ubuntu-24.04 (using gcc-13) when
compiled with -O3 (default level for all DPDK code). There is a crash
when starting testpmd:
> (gdb) bt
> #0 rte_read32_relaxed (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:290
> #1 rte_read32 (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:345
> #2 e1000_read_addr (addr=0x1100800e00) at ../sources/drivers/net/intel/e1000/base/e1000_osdep.h:106
> #3 e1000_id_led_init_generic (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/base/e1000_mac.c:1844
> #4 0x000062aaf653c85f in e1000_init_hw_82540 (hw=0x1586788c0)
> at ../sources/drivers/net/intel/e1000/base/e1000_82540.c:308
> #5 0x000062aaf6db8227 in em_hardware_init (hw=hw@entry=0x1586788c0)
> at ../sources/drivers/net/intel/e1000/em_ethdev.c:920
> #6 0x000062aaf65340ff in em_hw_init (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/em_ethdev.c:445
> #7 eth_em_dev_init (eth_dev=eth_dev@entry=0x62aaff346000 <rte_eth_devices>)
> at ../sources/drivers/net/intel/e1000/em_ethdev.c:314
> #8 0x000062aaf6db8b71 in rte_eth_dev_pci_generic_probe (private_data_size=11240,
> dev_init=0x62aaf6db8310 <eth_em_dev_init>, pci_dev=0x62ab2853dd90) at ../sources/lib/ethdev/ethdev_pci.h:150
> #9 eth_em_pci_probe (pci_drv=<optimized out>, pci_dev=0x62ab2853dd90)
> at ../sources/drivers/net/intel/e1000/em_ethdev.c:365
> #10 0x000062aaf646adf5 in rte_pci_probe_one_driver (dr=dr@entry=0x62aaf82d8020 <rte_em_pmd>,
> dev=dev@entry=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:299
> #11 0x000062aaf6a15f7d in pci_probe_all_drivers (dev=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:383
> #12 pci_probe () at ../sources/drivers/bus/pci/pci_common.c:410
> #13 0x000062aaf7a485f3 in rte_bus_probe () at ../sources/lib/eal/common/eal_common_bus.c:84
> #14 0x000062aaf670585d in rte_eal_init (argc=argc@entry=146, argv=argv@entry=0x7fffca468898)
> at ../sources/lib/eal/linux/eal.c:1253
The crash is linked to the use of gcc-13: under Ubuntu-24.04 testpmd
compiled with gcc-11 from the same DPDK tree works as expected.
The perfect solution would be for someone to investigate why the
PMD crashes. However, this depends on Maintainer availability.
A less-perfect solution is to reduce the optimization level
(like another proposal for net/qede: see Link).
Note: if more regressions are seen in less-frequently used PMDs,
maybe we should switch the default optimization level to -O1,
(tree-wide) and only rise the optimization level for actively
maintained PMDs, which are proven to work as expected with
higher optimization levels.
Link: http://patches.dpdk.org/project/dpdk/patch/20250909054023.3263401-1-thierry.herbelot@6wind.com/
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
V2: fix typo in the commit log
quote long error messages
---
drivers/net/intel/e1000/base/meson.build | 4 ++++
drivers/net/intel/e1000/meson.build | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/drivers/net/intel/e1000/base/meson.build b/drivers/net/intel/e1000/base/meson.build
index 4fe86dc6df34..e3631f1adc27 100644
--- a/drivers/net/intel/e1000/base/meson.build
+++ b/drivers/net/intel/e1000/base/meson.build
@@ -22,3 +22,7 @@ base_sources = files(
'e1000_phy.c',
'e1000_vf.c',
)
+# testpmd crashes with gcc > 11 with compiling with default -O3 or -O2
+if (cc.get_id() == 'gcc' and cc.version().version_compare('>=12.0'))
+ base_cflags += '-O1'
+endif
diff --git a/drivers/net/intel/e1000/meson.build b/drivers/net/intel/e1000/meson.build
index 924fe4ecaef5..3a875d1555c2 100644
--- a/drivers/net/intel/e1000/meson.build
+++ b/drivers/net/intel/e1000/meson.build
@@ -23,3 +23,8 @@ if not is_windows
'igc_txrx.c',
)
endif
+
+# testpmd crashes with gcc > 11 with compiling with default -O3 or -O2
+if (cc.get_id() == 'gcc' and cc.version().version_compare('>=12.0'))
+ cflags += '-O1'
+endif
--
2.39.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [V2] net/intel/e1000: reduce the optimization level for gcc > 11
2025-10-06 13:02 ` [V2] " Thierry Herbelot
@ 2025-10-08 8:38 ` Bruce Richardson
2025-10-08 10:10 ` Thomas Monjalon
2025-10-10 13:20 ` Bruce Richardson
1 sibling, 1 reply; 10+ messages in thread
From: Bruce Richardson @ 2025-10-08 8:38 UTC (permalink / raw)
To: Thierry Herbelot
Cc: dev, Thomas Monjalon, David Marchand, Stephen Hemminger, Olivier Matz
On Mon, Oct 06, 2025 at 03:02:57PM +0200, Thierry Herbelot wrote:
> The e1000 PMD stopped working under Ubuntu-24.04 (using gcc-13) when
> compiled with -O3 (default level for all DPDK code). There is a crash
> when starting testpmd:
>
> > (gdb) bt
> > #0 rte_read32_relaxed (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:290
> > #1 rte_read32 (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:345
> > #2 e1000_read_addr (addr=0x1100800e00) at ../sources/drivers/net/intel/e1000/base/e1000_osdep.h:106
> > #3 e1000_id_led_init_generic (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/base/e1000_mac.c:1844
> > #4 0x000062aaf653c85f in e1000_init_hw_82540 (hw=0x1586788c0)
> > at ../sources/drivers/net/intel/e1000/base/e1000_82540.c:308
> > #5 0x000062aaf6db8227 in em_hardware_init (hw=hw@entry=0x1586788c0)
> > at ../sources/drivers/net/intel/e1000/em_ethdev.c:920
> > #6 0x000062aaf65340ff in em_hw_init (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/em_ethdev.c:445
> > #7 eth_em_dev_init (eth_dev=eth_dev@entry=0x62aaff346000 <rte_eth_devices>)
> > at ../sources/drivers/net/intel/e1000/em_ethdev.c:314
> > #8 0x000062aaf6db8b71 in rte_eth_dev_pci_generic_probe (private_data_size=11240,
> > dev_init=0x62aaf6db8310 <eth_em_dev_init>, pci_dev=0x62ab2853dd90) at ../sources/lib/ethdev/ethdev_pci.h:150
> > #9 eth_em_pci_probe (pci_drv=<optimized out>, pci_dev=0x62ab2853dd90)
> > at ../sources/drivers/net/intel/e1000/em_ethdev.c:365
> > #10 0x000062aaf646adf5 in rte_pci_probe_one_driver (dr=dr@entry=0x62aaf82d8020 <rte_em_pmd>,
> > dev=dev@entry=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:299
> > #11 0x000062aaf6a15f7d in pci_probe_all_drivers (dev=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:383
> > #12 pci_probe () at ../sources/drivers/bus/pci/pci_common.c:410
> > #13 0x000062aaf7a485f3 in rte_bus_probe () at ../sources/lib/eal/common/eal_common_bus.c:84
> > #14 0x000062aaf670585d in rte_eal_init (argc=argc@entry=146, argv=argv@entry=0x7fffca468898)
> > at ../sources/lib/eal/linux/eal.c:1253
>
> The crash is linked to the use of gcc-13: under Ubuntu-24.04 testpmd
> compiled with gcc-11 from the same DPDK tree works as expected.
>
> The perfect solution would be for someone to investigate why the
> PMD crashes. However, this depends on Maintainer availability.
>
> A less-perfect solution is to reduce the optimization level
> (like another proposal for net/qede: see Link).
>
Thanks for reporting the issue. I'd like to spend a little time trying to
really root cause the issue before applying this workaround patch. Can you
provide a bit more info about the setup you used when you hit this issue. I
expect a lot of use of e1000 driver is in virtualized setups, but can you
confirm if that was the case here, or were you using real hardware?
If we do have to apply this workaround fix of reducing optimization level,
I see you reduce optimization for both the base code and the DPDK-specific
driver code. Is it necessary to reduce optimization on both, or can we get
away with just reducing it on the DPDK part alone?
Thanks,
/Bruce
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [V2] net/intel/e1000: reduce the optimization level for gcc > 11
2025-10-08 8:38 ` Bruce Richardson
@ 2025-10-08 10:10 ` Thomas Monjalon
2025-10-08 11:25 ` Thierry Herbelot
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Monjalon @ 2025-10-08 10:10 UTC (permalink / raw)
To: Thierry Herbelot, Bruce Richardson
Cc: dev, David Marchand, Stephen Hemminger, Olivier Matz
08/10/2025 10:38, Bruce Richardson:
> On Mon, Oct 06, 2025 at 03:02:57PM +0200, Thierry Herbelot wrote:
> > The e1000 PMD stopped working under Ubuntu-24.04 (using gcc-13) when
> > compiled with -O3 (default level for all DPDK code). There is a crash
> > when starting testpmd:
> >
> > > (gdb) bt
> > > #0 rte_read32_relaxed (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:290
> > > #1 rte_read32 (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:345
> > > #2 e1000_read_addr (addr=0x1100800e00) at ../sources/drivers/net/intel/e1000/base/e1000_osdep.h:106
> > > #3 e1000_id_led_init_generic (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/base/e1000_mac.c:1844
> > > #4 0x000062aaf653c85f in e1000_init_hw_82540 (hw=0x1586788c0)
> > > at ../sources/drivers/net/intel/e1000/base/e1000_82540.c:308
> > > #5 0x000062aaf6db8227 in em_hardware_init (hw=hw@entry=0x1586788c0)
> > > at ../sources/drivers/net/intel/e1000/em_ethdev.c:920
> > > #6 0x000062aaf65340ff in em_hw_init (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/em_ethdev.c:445
> > > #7 eth_em_dev_init (eth_dev=eth_dev@entry=0x62aaff346000 <rte_eth_devices>)
> > > at ../sources/drivers/net/intel/e1000/em_ethdev.c:314
> > > #8 0x000062aaf6db8b71 in rte_eth_dev_pci_generic_probe (private_data_size=11240,
> > > dev_init=0x62aaf6db8310 <eth_em_dev_init>, pci_dev=0x62ab2853dd90) at ../sources/lib/ethdev/ethdev_pci.h:150
> > > #9 eth_em_pci_probe (pci_drv=<optimized out>, pci_dev=0x62ab2853dd90)
> > > at ../sources/drivers/net/intel/e1000/em_ethdev.c:365
> > > #10 0x000062aaf646adf5 in rte_pci_probe_one_driver (dr=dr@entry=0x62aaf82d8020 <rte_em_pmd>,
> > > dev=dev@entry=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:299
> > > #11 0x000062aaf6a15f7d in pci_probe_all_drivers (dev=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:383
> > > #12 pci_probe () at ../sources/drivers/bus/pci/pci_common.c:410
> > > #13 0x000062aaf7a485f3 in rte_bus_probe () at ../sources/lib/eal/common/eal_common_bus.c:84
> > > #14 0x000062aaf670585d in rte_eal_init (argc=argc@entry=146, argv=argv@entry=0x7fffca468898)
> > > at ../sources/lib/eal/linux/eal.c:1253
> >
> > The crash is linked to the use of gcc-13: under Ubuntu-24.04 testpmd
> > compiled with gcc-11 from the same DPDK tree works as expected.
> >
> > The perfect solution would be for someone to investigate why the
> > PMD crashes. However, this depends on Maintainer availability.
> >
> > A less-perfect solution is to reduce the optimization level
> > (like another proposal for net/qede: see Link).
> >
> Thanks for reporting the issue. I'd like to spend a little time trying to
> really root cause the issue before applying this workaround patch. Can you
> provide a bit more info about the setup you used when you hit this issue. I
> expect a lot of use of e1000 driver is in virtualized setups, but can you
> confirm if that was the case here, or were you using real hardware?
>
> If we do have to apply this workaround fix of reducing optimization level,
> I see you reduce optimization for both the base code and the DPDK-specific
> driver code. Is it necessary to reduce optimization on both, or can we get
> away with just reducing it on the DPDK part alone?
We are not sure the workaround will work with every compilers to come.
Of course it is better to fix the root cause.
If we cannot fix it in time, we can add this workaround in the release notes.
But please, let's not apply it in the codebase.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [V2] net/intel/e1000: reduce the optimization level for gcc > 11
2025-10-08 10:10 ` Thomas Monjalon
@ 2025-10-08 11:25 ` Thierry Herbelot
0 siblings, 0 replies; 10+ messages in thread
From: Thierry Herbelot @ 2025-10-08 11:25 UTC (permalink / raw)
To: Thomas Monjalon, Bruce Richardson
Cc: dev, David Marchand, Stephen Hemminger, Olivier Matz
On 10/8/25 12:10, Thomas Monjalon wrote:
> 08/10/2025 10:38, Bruce Richardson:
>> On Mon, Oct 06, 2025 at 03:02:57PM +0200, Thierry Herbelot wrote:
>>> The e1000 PMD stopped working under Ubuntu-24.04 (using gcc-13) when
>>> compiled with -O3 (default level for all DPDK code). There is a crash
>>> when starting testpmd:
>>>
>>>> (gdb) bt
>>>> #0 rte_read32_relaxed (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:290
>>>> #1 rte_read32 (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:345
>>>> #2 e1000_read_addr (addr=0x1100800e00) at ../sources/drivers/net/intel/e1000/base/e1000_osdep.h:106
>>>> #3 e1000_id_led_init_generic (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/base/e1000_mac.c:1844
>>>> #4 0x000062aaf653c85f in e1000_init_hw_82540 (hw=0x1586788c0)
>>>> at ../sources/drivers/net/intel/e1000/base/e1000_82540.c:308
>>>> #5 0x000062aaf6db8227 in em_hardware_init (hw=hw@entry=0x1586788c0)
>>>> at ../sources/drivers/net/intel/e1000/em_ethdev.c:920
>>>> #6 0x000062aaf65340ff in em_hw_init (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/em_ethdev.c:445
>>>> #7 eth_em_dev_init (eth_dev=eth_dev@entry=0x62aaff346000 <rte_eth_devices>)
>>>> at ../sources/drivers/net/intel/e1000/em_ethdev.c:314
>>>> #8 0x000062aaf6db8b71 in rte_eth_dev_pci_generic_probe (private_data_size=11240,
>>>> dev_init=0x62aaf6db8310 <eth_em_dev_init>, pci_dev=0x62ab2853dd90) at ../sources/lib/ethdev/ethdev_pci.h:150
>>>> #9 eth_em_pci_probe (pci_drv=<optimized out>, pci_dev=0x62ab2853dd90)
>>>> at ../sources/drivers/net/intel/e1000/em_ethdev.c:365
>>>> #10 0x000062aaf646adf5 in rte_pci_probe_one_driver (dr=dr@entry=0x62aaf82d8020 <rte_em_pmd>,
>>>> dev=dev@entry=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:299
>>>> #11 0x000062aaf6a15f7d in pci_probe_all_drivers (dev=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:383
>>>> #12 pci_probe () at ../sources/drivers/bus/pci/pci_common.c:410
>>>> #13 0x000062aaf7a485f3 in rte_bus_probe () at ../sources/lib/eal/common/eal_common_bus.c:84
>>>> #14 0x000062aaf670585d in rte_eal_init (argc=argc@entry=146, argv=argv@entry=0x7fffca468898)
>>>> at ../sources/lib/eal/linux/eal.c:1253
>>>
>>> The crash is linked to the use of gcc-13: under Ubuntu-24.04 testpmd
>>> compiled with gcc-11 from the same DPDK tree works as expected.
>>>
>>> The perfect solution would be for someone to investigate why the
>>> PMD crashes. However, this depends on Maintainer availability.
>>>
>>> A less-perfect solution is to reduce the optimization level
>>> (like another proposal for net/qede: see Link).
>>>
>> Thanks for reporting the issue. I'd like to spend a little time trying to
>> really root cause the issue before applying this workaround patch. Can you
>> provide a bit more info about the setup you used when you hit this issue. I
>> expect a lot of use of e1000 driver is in virtualized setups, but can you
>> confirm if that was the case here, or were you using real hardware?
Hello Bruce, Thomas
Sorry for the missing info: the issue was indeed seen in qemu (in more
than one version).
I'm not sure we have a real NIC lying around, for this PMD.
>>
>> If we do have to apply this workaround fix of reducing optimization level,
>> I see you reduce optimization for both the base code and the DPDK-specific
>> driver code. Is it necessary to reduce optimization on both, or can we get
>> away with just reducing it on the DPDK part alone?
As for net/qede, I did not take time to investigate which piece of code
was concerned. I just checked that testpmd really works in an
Ubuntu-24.04 VM, when DPDK is compiled with gcc-11 rather than the
default gcc-13.
Then the crude workaround is to drop the optimization level for all of
the PMD. As for net/qede, '-O1' is a compromise as the PMD seems to be
working fine, and still the performance is acceptable.
>
> We are not sure the workaround will work with every compilers to come.
> Of course it is better to fix the root cause.
Agreed !
Would it be possible to have a list of the PMDs which are known to be
currently being tested (for example e810, i40e for Intel) ? (and then
the list of PMDs which are "under lighter monitoring")
Best regards
Thierry
> If we cannot fix it in time, we can add this workaround in the release notes.
> But please, let's not apply it in the codebase.
>
>
--
Thierry Herbelot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [V2] net/intel/e1000: reduce the optimization level for gcc > 11
2025-10-06 13:02 ` [V2] " Thierry Herbelot
2025-10-08 8:38 ` Bruce Richardson
@ 2025-10-10 13:20 ` Bruce Richardson
2025-10-10 13:23 ` Thierry Herbelot
1 sibling, 1 reply; 10+ messages in thread
From: Bruce Richardson @ 2025-10-10 13:20 UTC (permalink / raw)
To: Thierry Herbelot
Cc: dev, Thomas Monjalon, David Marchand, Stephen Hemminger, Olivier Matz
On Mon, Oct 06, 2025 at 03:02:57PM +0200, Thierry Herbelot wrote:
> The e1000 PMD stopped working under Ubuntu-24.04 (using gcc-13) when
> compiled with -O3 (default level for all DPDK code). There is a crash
> when starting testpmd:
>
> > (gdb) bt
> > #0 rte_read32_relaxed (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:290
> > #1 rte_read32 (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:345
> > #2 e1000_read_addr (addr=0x1100800e00) at ../sources/drivers/net/intel/e1000/base/e1000_osdep.h:106
> > #3 e1000_id_led_init_generic (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/base/e1000_mac.c:1844
> > #4 0x000062aaf653c85f in e1000_init_hw_82540 (hw=0x1586788c0)
> > at ../sources/drivers/net/intel/e1000/base/e1000_82540.c:308
> > #5 0x000062aaf6db8227 in em_hardware_init (hw=hw@entry=0x1586788c0)
> > at ../sources/drivers/net/intel/e1000/em_ethdev.c:920
> > #6 0x000062aaf65340ff in em_hw_init (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/em_ethdev.c:445
> > #7 eth_em_dev_init (eth_dev=eth_dev@entry=0x62aaff346000 <rte_eth_devices>)
> > at ../sources/drivers/net/intel/e1000/em_ethdev.c:314
> > #8 0x000062aaf6db8b71 in rte_eth_dev_pci_generic_probe (private_data_size=11240,
> > dev_init=0x62aaf6db8310 <eth_em_dev_init>, pci_dev=0x62ab2853dd90) at ../sources/lib/ethdev/ethdev_pci.h:150
> > #9 eth_em_pci_probe (pci_drv=<optimized out>, pci_dev=0x62ab2853dd90)
> > at ../sources/drivers/net/intel/e1000/em_ethdev.c:365
> > #10 0x000062aaf646adf5 in rte_pci_probe_one_driver (dr=dr@entry=0x62aaf82d8020 <rte_em_pmd>,
> > dev=dev@entry=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:299
> > #11 0x000062aaf6a15f7d in pci_probe_all_drivers (dev=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:383
> > #12 pci_probe () at ../sources/drivers/bus/pci/pci_common.c:410
> > #13 0x000062aaf7a485f3 in rte_bus_probe () at ../sources/lib/eal/common/eal_common_bus.c:84
> > #14 0x000062aaf670585d in rte_eal_init (argc=argc@entry=146, argv=argv@entry=0x7fffca468898)
> > at ../sources/lib/eal/linux/eal.c:1253
>
> The crash is linked to the use of gcc-13: under Ubuntu-24.04 testpmd
> compiled with gcc-11 from the same DPDK tree works as expected.
>
> The perfect solution would be for someone to investigate why the
> PMD crashes. However, this depends on Maintainer availability.
>
Hi,
can you test with [1]. It's still a workaround while we investigate more,
but a less severe one!
/Bruce
[1] https://patches.dpdk.org/project/dpdk/patch/20251010125848.965340-1-ciara.loftus@intel.com/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [V2] net/intel/e1000: reduce the optimization level for gcc > 11
2025-10-10 13:20 ` Bruce Richardson
@ 2025-10-10 13:23 ` Thierry Herbelot
0 siblings, 0 replies; 10+ messages in thread
From: Thierry Herbelot @ 2025-10-10 13:23 UTC (permalink / raw)
To: Bruce Richardson
Cc: dev, Thomas Monjalon, David Marchand, Stephen Hemminger, Olivier Matz
On 10/10/25 15:20, Bruce Richardson wrote:
> On Mon, Oct 06, 2025 at 03:02:57PM +0200, Thierry Herbelot wrote:
>> The e1000 PMD stopped working under Ubuntu-24.04 (using gcc-13) when
>> compiled with -O3 (default level for all DPDK code). There is a crash
>> when starting testpmd:
>>
>>> (gdb) bt
>>> #0 rte_read32_relaxed (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:290
>>> #1 rte_read32 (addr=0x1100800e00) at ../sources/lib/eal/include/generic/rte_io.h:345
>>> #2 e1000_read_addr (addr=0x1100800e00) at ../sources/drivers/net/intel/e1000/base/e1000_osdep.h:106
>>> #3 e1000_id_led_init_generic (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/base/e1000_mac.c:1844
>>> #4 0x000062aaf653c85f in e1000_init_hw_82540 (hw=0x1586788c0)
>>> at ../sources/drivers/net/intel/e1000/base/e1000_82540.c:308
>>> #5 0x000062aaf6db8227 in em_hardware_init (hw=hw@entry=0x1586788c0)
>>> at ../sources/drivers/net/intel/e1000/em_ethdev.c:920
>>> #6 0x000062aaf65340ff in em_hw_init (hw=0x1586788c0) at ../sources/drivers/net/intel/e1000/em_ethdev.c:445
>>> #7 eth_em_dev_init (eth_dev=eth_dev@entry=0x62aaff346000 <rte_eth_devices>)
>>> at ../sources/drivers/net/intel/e1000/em_ethdev.c:314
>>> #8 0x000062aaf6db8b71 in rte_eth_dev_pci_generic_probe (private_data_size=11240,
>>> dev_init=0x62aaf6db8310 <eth_em_dev_init>, pci_dev=0x62ab2853dd90) at ../sources/lib/ethdev/ethdev_pci.h:150
>>> #9 eth_em_pci_probe (pci_drv=<optimized out>, pci_dev=0x62ab2853dd90)
>>> at ../sources/drivers/net/intel/e1000/em_ethdev.c:365
>>> #10 0x000062aaf646adf5 in rte_pci_probe_one_driver (dr=dr@entry=0x62aaf82d8020 <rte_em_pmd>,
>>> dev=dev@entry=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:299
>>> #11 0x000062aaf6a15f7d in pci_probe_all_drivers (dev=0x62ab2853dd90) at ../sources/drivers/bus/pci/pci_common.c:383
>>> #12 pci_probe () at ../sources/drivers/bus/pci/pci_common.c:410
>>> #13 0x000062aaf7a485f3 in rte_bus_probe () at ../sources/lib/eal/common/eal_common_bus.c:84
>>> #14 0x000062aaf670585d in rte_eal_init (argc=argc@entry=146, argv=argv@entry=0x7fffca468898)
>>> at ../sources/lib/eal/linux/eal.c:1253
>>
>> The crash is linked to the use of gcc-13: under Ubuntu-24.04 testpmd
>> compiled with gcc-11 from the same DPDK tree works as expected.
>>
>> The perfect solution would be for someone to investigate why the
>> PMD crashes. However, this depends on Maintainer availability.
>>
> Hi,
>
> can you test with [1]. It's still a workaround while we investigate more,
> but a less severe one!
Hello,
Thanks for the quick turnaround.
The compilation is ongoing. I will post ASAP, when the test has run.
Thierry>
> /Bruce
>
> [1] https://patches.dpdk.org/project/dpdk/patch/20251010125848.965340-1-ciara.loftus@intel.com/
--
Thierry Herbelot
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-10-10 13:23 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-06 12:45 [PATCH] net/intel/e1000: reduce the optimization level for gcc > 11 Thierry Herbelot
2025-10-06 12:55 ` David Marchand
2025-10-06 13:01 ` Thierry Herbelot
2025-10-06 13:03 ` David Marchand
2025-10-06 13:02 ` [V2] " Thierry Herbelot
2025-10-08 8:38 ` Bruce Richardson
2025-10-08 10:10 ` Thomas Monjalon
2025-10-08 11:25 ` Thierry Herbelot
2025-10-10 13:20 ` Bruce Richardson
2025-10-10 13:23 ` Thierry Herbelot
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).