Re: [PATCH net-next v5] net: ethernet: mtk_eth_soc: ppe: add support for multiple PPEs

From: Elad Yifee
Date: Thu Jun 06 2024 - 01:57:12 EST


On Thu, Jun 6, 2024 at 5:43 AM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Sun, 2 Jun 2024 20:32:40 +0300 Elad Yifee wrote:
> > struct mtk_mac {
> > int id;
> > + u8 ppe_idx;
>
> I thought Daniel's suggestion was to remove this field.
> I don't see your rebuke to that point or how it's addressed in the code.
> Also it would be good if you CCed Daniel, always CC people who gave you
> feedback.
I talked to Daniel in private, I should have done that publicly.
Relying solely on ifindex%ppe_num could potentially lead to more than
one GMAC assigned to the same PPE.
Since the ingress device could be a non mtk type, I added that sanity check.
I think the additional field is a small price to keep things clear and simple.
(sorry for the previous HTML tags)