* [PATCH] net/e1000: fix crash when built with GCC 13
@ 2025-10-10 12:58 Ciara Loftus
2025-10-10 13:31 ` Thierry Herbelot
0 siblings, 1 reply; 3+ messages in thread
From: Ciara Loftus @ 2025-10-10 12:58 UTC (permalink / raw)
To: dev; +Cc: thierry.herbelot, bruce.richardson, Ciara Loftus, stable
The e1000 PMD crashes during initialisation in a Ubuntu 24.04 VM when
compiled with gcc-13 with -O3 optimisations. This patch introduces a
compiler barrier after the register read that was causing the issue.
Bugzilla ID: 1691
Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/e1000/base/e1000_mac.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/intel/e1000/base/e1000_mac.c b/drivers/net/intel/e1000/base/e1000_mac.c
index 2fa97d12a9..41aae86ffe 100644
--- a/drivers/net/intel/e1000/base/e1000_mac.c
+++ b/drivers/net/intel/e1000/base/e1000_mac.c
@@ -1842,6 +1842,7 @@ s32 e1000_id_led_init_generic(struct e1000_hw *hw)
return ret_val;
mac->ledctl_default = E1000_READ_REG(hw, E1000_LEDCTL);
+ rte_compiler_barrier();
mac->ledctl_mode1 = mac->ledctl_default;
mac->ledctl_mode2 = mac->ledctl_default;
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/e1000: fix crash when built with GCC 13
2025-10-10 12:58 [PATCH] net/e1000: fix crash when built with GCC 13 Ciara Loftus
@ 2025-10-10 13:31 ` Thierry Herbelot
2025-10-16 14:48 ` Bruce Richardson
0 siblings, 1 reply; 3+ messages in thread
From: Thierry Herbelot @ 2025-10-10 13:31 UTC (permalink / raw)
To: Ciara Loftus, dev; +Cc: bruce.richardson, stable
On 10/10/25 14:58, Ciara Loftus wrote:
> The e1000 PMD crashes during initialisation in a Ubuntu 24.04 VM when
> compiled with gcc-13 with -O3 optimisations. This patch introduces a
> compiler barrier after the register read that was causing the issue.
>
> Bugzilla ID: 1691
> Fixes: af75078fece3 ("first public release")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Tested-by: Thierry Herbelot <thierry.herbelot@6wind.com>
The patch fixes the crash at startup.
Thanks
Thierry
> ---
> drivers/net/intel/e1000/base/e1000_mac.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/intel/e1000/base/e1000_mac.c b/drivers/net/intel/e1000/base/e1000_mac.c
> index 2fa97d12a9..41aae86ffe 100644
> --- a/drivers/net/intel/e1000/base/e1000_mac.c
> +++ b/drivers/net/intel/e1000/base/e1000_mac.c
> @@ -1842,6 +1842,7 @@ s32 e1000_id_led_init_generic(struct e1000_hw *hw)
> return ret_val;
>
> mac->ledctl_default = E1000_READ_REG(hw, E1000_LEDCTL);
> + rte_compiler_barrier();
> mac->ledctl_mode1 = mac->ledctl_default;
> mac->ledctl_mode2 = mac->ledctl_default;
>
--
Thierry Herbelot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/e1000: fix crash when built with GCC 13
2025-10-10 13:31 ` Thierry Herbelot
@ 2025-10-16 14:48 ` Bruce Richardson
0 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2025-10-16 14:48 UTC (permalink / raw)
To: Thierry Herbelot; +Cc: Ciara Loftus, dev, stable
On Fri, Oct 10, 2025 at 03:31:51PM +0200, Thierry Herbelot wrote:
> On 10/10/25 14:58, Ciara Loftus wrote:
> > The e1000 PMD crashes during initialisation in a Ubuntu 24.04 VM when
> > compiled with gcc-13 with -O3 optimisations. This patch introduces a
> > compiler barrier after the register read that was causing the issue.
> >
> > Bugzilla ID: 1691
> > Fixes: af75078fece3 ("first public release")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
>
> Tested-by: Thierry Herbelot <thierry.herbelot@6wind.com>
>
> The patch fixes the crash at startup.
>
> Thanks
>
> Thierry
>
> > ---
> > drivers/net/intel/e1000/base/e1000_mac.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/intel/e1000/base/e1000_mac.c b/drivers/net/intel/e1000/base/e1000_mac.c
> > index 2fa97d12a9..41aae86ffe 100644
> > --- a/drivers/net/intel/e1000/base/e1000_mac.c
> > +++ b/drivers/net/intel/e1000/base/e1000_mac.c
> > @@ -1842,6 +1842,7 @@ s32 e1000_id_led_init_generic(struct e1000_hw *hw)
> > return ret_val;
> > mac->ledctl_default = E1000_READ_REG(hw, E1000_LEDCTL);
> > + rte_compiler_barrier();
> > mac->ledctl_mode1 = mac->ledctl_default;
> > mac->ledctl_mode2 = mac->ledctl_default;
>
Since adding a compiler barrier is still a workaround (all-be-it a fairly
unintrusive one), I'm going to hold off this patch until rc2 or rc3 in the
hopes we get more details as to the exact root cause and why gcc-13 is
producing code that crashes.
/Bruce
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-16 14:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-10 12:58 [PATCH] net/e1000: fix crash when built with GCC 13 Ciara Loftus
2025-10-10 13:31 ` Thierry Herbelot
2025-10-16 14:48 ` Bruce Richardson
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).