Re: [PATCH net-next 1/2] dpaa2-eth: use the DPMAC id as the devlink physical port number

From: Vincent Jardin

Date: Mon Sep 28 2026 - 07:30:33 EST


Hi M. Bot,

See below

> > +void dpaa2_eth_dl_port_check(struct dpaa2_eth_priv *priv)
> > +{
> > + u32 registered = priv->devlink_port.attrs.phys.port_number;
> > + u32 current_number = dpaa2_eth_dl_port_number(priv);
>
> [Severity: Low]
> Can this read of priv->devlink_port.attrs race with probe and remove?

Yes, see v2. I did add the port number in priv under mac_lock.

> [Severity: Low]
> Does the "current" value used by dpaa2_eth_dl_port_check() really
> reflect the firmware endpoint?

Yes, it does. The 0: non was missleading.

The prints is updated following the reiews and Iona's comments, see v2.

> [Severity: High]
> This is a pre-existing issue and was not introduced by this patch, but
> the new dpaa2_eth_dl_port_check() call adds another priv access on this
> path. Can dpni_irq0_handler_thread() run after priv has been freed?

I could be, it was there before, so let's avoid unfocusing this serie.

Best regards,
Vincent