netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Matej Zachar <zachar.matej@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [DSA] fallback PTP to master port when switch does not support it
Date: Tue, 5 Apr 2022 00:04:30 +0200	[thread overview]
Message-ID: <YktrbtbSr77bDckl@lunn.ch> (raw)
In-Reply-To: <25688175-1039-44C7-A57E-EB93527B1615@gmail.com>

On Mon, Apr 04, 2022 at 09:28:08PM +0200, Matej Zachar wrote:
>  Hi,
> 
> in my embedded setup I have CPU (master) port with full PTP support
> connected to the onboard switch (without PTP support) through
> DSA. As the ioctl and ts_info is passed to the switch driver I made
> small change to fallback to the master net_device.

Did you try just running PTP on the master device? I'm wondering if
the DSA headers get in the way?

What i don't like about your proposed fallback is that it gives the
impression the slave ports actually support PTP, when they do not. And
maybe you want to run different ports in different modes, one upstream
towards a grand master and one downstream? I suspect the errors you
get are not obvious. Where as if you just run PTP on the master, the
errors would be more obvious.

> This however requires that the switch which does not support PTP
> must not implement .get_ts_info and .port_hwtstamp_get/set from
> dsa_switch_ops struct.

And this is another advantage of just using master directly. You can
even use master when the switch ports do support PTP.

       Andrew


  reply	other threads:[~2022-04-04 22:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 19:28 [DSA] fallback PTP to master port when switch does not support it Matej Zachar
2022-04-04 22:04 ` Andrew Lunn [this message]
2022-04-05 14:21   ` Matej Zachar
2022-04-05 19:48   ` Jakub Kicinski
2022-04-07  9:44     ` Vladimir Oltean
2022-05-25 15:00       ` Rodolfo Giometti
2022-05-25 15:55         ` Vladimir Oltean
2022-05-26  7:45           ` Rodolfo Giometti
2022-05-26 12:31             ` Vladimir Oltean
2022-05-25 18:18         ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YktrbtbSr77bDckl@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=netdev@vger.kernel.org \
    --cc=zachar.matej@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).