[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aIs1eXkuez-sZtfH@lore-desk>
Date: Thu, 31 Jul 2025 11:20:57 +0200
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org
Subject: Re: [PATCH net] net: airoha: Fix PPE table access in
airoha_ppe_debugfs_foe_show()
> On Mon, 28 Jul 2025 13:58:08 +0200 Lorenzo Bianconi wrote:
> > +struct airoha_foe_entry *
> > +airoha_ppe_foe_get_entry_locked(struct airoha_ppe *ppe, u32 hash)
>
> Hm, could be just me, but the way we/I used _locked in the core was
> the opposite. _locked means the caller's already taken the lock.
> Here you seem to be saying that the "callee is locked"..
> Can we stick to core's interpretation?
sure, that's fine.
>
> > + struct airoha_foe_entry *hwe;
> > +
> > + spin_lock_bh(&ppe_lock);
> > + hwe = airoha_ppe_foe_get_entry(ppe, hash);
> > + spin_unlock_bh(&ppe_lock);
> > +
> > + return hwe;
>
> Is the lifetime of the hwe object somehow guaranteed in the debugfs
> code? Looks questionable..
PPE table entries are allocated at driver load and never freed, the hw is just
writing into this DMA area when the entry is binded.
Regards,
Lorenzo
> --
> pw-bot: cr
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists