Subject: Re: [PATCH net-next RFC v4 4/5] net: Let the active time stamping layer be selectable.

From: Jakub Kicinski <[email-masked]>
Date: Thu, 11 May 2023 08:36:20 -0700

On Thu, 11 May 2023 16:48:07 +0300 Vladimir Oltean wrote:
> > Ok, right you move it on to dsa stub. What do you think of our case, should we
> > continue with netdev notifier?   
> 
> I don't know.
> 
> AFAIU, the plan forward with this patch set is that, if the active
> timestamping layer is the PHY, phy_mii_ioctl() gets called and the MAC
> driver does not get notified in any way of that. That is an issue
> because if it's a switch, it will want to trap PTP even if it doesn't
> timestamp it, and with this proposal it doesn't get a chance to do that.
> 
> What is your need for this? Do you have this scenario? If not, just drop
> this part from the patch.
> 
> Jakub, you said "nope" to netdev notifiers, what would you suggest here
> instead? ndo_change_ptp_traps()?

More importantly "monolithic" drivers have DMA/MAC/PHY all under 
the NDO so assuming that SOF_PHY_TIMESTAMPING implies a phylib PHY
is not going to work.

We need a more complex calling convention for the NDO.