Re: [PATCH net-next 2/7] bng_en: query PHY capabilities and report link status

From: Bhargava Chenna Marreddy

Date: Thu Feb 26 2026 - 09:46:55 EST


On Wed, Feb 25, 2026 at 8:05 AM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Mon, 23 Feb 2026 22:06:36 +0530 Bhargava Marreddy wrote:
> > + /* To protect link related settings during link changes and
> > + * ethtool settings changes.
> > + */
> > + struct mutex link_lock;
> > + struct bnge_link_info link_info;
>
> Why does link deserve its own lock? Are the operations slow?
>
> bnxt was written before the netdev instance lock existed, if you're
> just trying to avoid taking rtnl_lock the instance lock would do.

Hi Jakub, thanks for the feedback.

Agreed. I will replace link_lock with the netdev instance lock in the
next spin.

These link operations are relatively slow as they involve firmware HWRM
mailbox round-trips (PHY query/config). Since the firmware latency is
the main factor in hold time, the instance lock is sufficient and
avoids extra complexity.

Thanks,
Bhargava Marreddy

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature